Bug 34594 - SIMD builtins not supported ("call to '__tg_XXXX' is ambiguous")
Summary: SIMD builtins not supported ("call to '__tg_XXXX' is ambiguous")
Status: RESOLVED FIXED
Alias: None
Product: Objective Sharpie
Classification: Desktop
Component: General ()
Version: 3.1
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Aaron Bockover [MSFT]
URL:
: 41305 ()
Depends on:
Blocks:
 
Reported: 2015-10-06 13:30 UTC by Mike Bluestein
Modified: 2017-10-11 20:42 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Mike Bluestein 2015-10-06 13:30:14 UTC
Here's the output shown in terminal:

https://gist.github.com/mikebluestein/0d0e9223b664288df588
Comment 3 baramuse 2016-04-19 06:02:33 UTC
I've got the exact same problem when trying from cocoapod, xcodeproj or manually..
Any update/hint on this problem ?
Comment 4 Aaron Bockover [MSFT] 2016-06-01 03:02:47 UTC
*** Bug 41305 has been marked as a duplicate of this bug. ***
Comment 5 Aaron Bockover [MSFT] 2016-06-01 03:07:48 UTC
I have yet to track down the root cause, but I suspect this is due to a difference in the Apple fork of Clang that Xcode ships and the upstream Clang that Objective Sharpie ships.

This problem most notably manifests with anything that uses SIMD on iOS and Mac.

As a possible workaround, you can try the following hack. I am reluctant to build this in to Objective Sharpie until I can really confirm the root cause as it is a pretty egregious hack.

Pass the following extra compiler arguments to bind -c:

  sharpie bind ... -c \
    -DINFINITY=1e500 \
    -D__SIMD_MATH_HEADER__ \
    -D__SIMD_LOGIC_HEADER__ \
    -D__SIMD_GEOMETRY_HEADER__ \
    -D__SIMD_BOOLEAN_TYPE__=_Bool
Comment 6 kochizufan 2016-06-21 02:42:10 UTC
I tried, but error occurs like this.

=====
$ sharpie bind -framework NMAKit.framework -sdk iphoneos 8.3 -c \
>     -DINFINITY=1e500 \
>     -D__SIMD_MATH_HEADER__ \
>     -D__SIMD_LOGIC_HEADER__ \
>     -D__SIMD_GEOMETRY_HEADER__ \
>     -D__SIMD_BOOLEAN_TYPE__=_Bool

Submitting usage data to Xamarin...
  Submitted - thank you for helping to improve Objective Sharpie!

Done. Exiting with error code 1.
error: sources cannot be specified when the -framework option is used
=====

May I misunderstand?
Comment 7 Aaron Bockover [MSFT] 2016-06-22 02:42:17 UTC
You have a space between "iphoneos" and "8.3" for the -sdk argument, so Sharpie thinks you are passing "8.3" as a source, which is not allowed.

The -sdk argument should look like:

  -sdk iphoneos8.3
Comment 8 kochizufan 2016-06-26 14:52:43 UTC
OMG sorry for silly question... and after that, sharpie causes another error like this:

> $ sharpie bind -framework NMAKit.framework -sdk iphoneos8.3 -c \
> >      -DINFINITY=1e500 \
> >     -D__SIMD_MATH_HEADER__ \
> >     -D__SIMD_LOGIC_HEADER__ \
> >     -D__SIMD_GEOMETRY_HEADER__ \
> >     -D__SIMD_BOOLEAN_TYPE__=_Bool
> [ERROR] FATAL UNHANDLED EXCEPTION: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Sharpie.Tooling.Tool+ExitException: Exception of type 'Sharpie.Tooling.Tool+ExitException' was thrown.
>    at Sharpie.ParseTool+ParseOptionSection.SetTargetSdk (System.String sdkIdentifier) in <filename unknown>:line 0
>    at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
>    at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) in <filename unknown>:line 0
>   --- End of inner exception stack trace ---
>    at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) in <filename unknown>:line 0
>    at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) in <filename unknown>:line 0
>    at Sharpie.Tooling.ReflectionBoundOption.Bind (System.String value) in <filename unknown>:line 0
>    at Sharpie.Tooling.Tool.ProcessArgument () in <filename unknown>:line 0
>    at Sharpie.ParseTool.ProcessArgument () in <filename unknown>:line 0
>    at Sharpie.Tooling.Tool.ProcessArguments () in <filename unknown>:line 0
>    at Sharpie.Tooling.Tool.Run (IEnumerable`1 args) in <filename unknown>:line 0
>    at Sharpie.Tooling.ToolRunnerTool.Run () in <filename unknown>:line 0
>    at Sharpie.Entry+SharpieToolRunnerTool.Run () in <filename unknown>:line 0
>    at Sharpie.Tooling.Tool.Run (IEnumerable`1 args) in <filename unknown>:line 0
>    at Sharpie.Tooling.ToolRunnerTool.Run (IEnumerable`1 args, System.Action`1 aboutToRunToolHandler) in <filename unknown>:line 0
>    at Sharpie.Entry.Main (System.String[] args) in <filename unknown>:line 0

This error looks other problem, should I report this as another ticket?
Comment 9 Aaron Bockover [MSFT] 2017-10-11 20:42:18 UTC
Should be fixed in 3.4.0