Unable to build Xamarin.iOS samples on Visual Studio for Mac using 100.14.1

1138
4
Jump to solution
08-04-2022 05:44 PM
ChrisDalla_Piazza
New Contributor III

Hello,

I attempted to build the Xamarin.iOS sample project from here:

https://github.com/Esri/arcgis-runtime-samples-dotnet/tree/main/src/iOS/Xamarin.iOS

The build fails with this:

MTOUCH : error MT5202: Native linking failed. Please review the build log.
MTOUCH : error MT5217: Native linking failed because the linker command line was too long (360687 characters).

I ran into this problem in my own project when attempting to upgrade references to ArcGIS.  I found that a prior ArcGIS samples project builds ok when using 100.12.0.  When I upgrade the references in that project to 100.13.0 the build error occurs.

I can see further up in the build log a huge command with lots 'o stuff from CoreRT as a command argument.  Below is a sample:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang

......

-u _CoreRT_ArcGISMapServiceSublayerInfo_getParentLayerInfo -u _CoreRT_ArcGISMapServiceSublayerInfo_getRelationshipInfos -u _CoreRT_ArcGISMapServiceSublayerInfo_getServiceLayerId -u _CoreRT_ArcGISMapServiceSublayerInfo_getServiceLayerName -u _CoreRT_ArcGISMapServiceSublayerInfo_getSublayerInfos -u _CoreRT_ArcGISMapServiceSublayerInfo_getSublayerType -u _CoreRT_ArcGISMapServiceSublayerInfo_getSubtypeField -u _CoreRT_ArcGISMapServiceSublayerInfo_getSupportsAdvancedQueries -u _CoreRT_ArcGISMapServiceSublayerInfo_getSupportsStatistics -u _CoreRT_ArcGISMapServiceSublayerInfo_getTimeInfo -u _CoreRT_ArcGISMapServiceSublayerInfo_getTypeIdFieldName -u _CoreRT_ArcGISMapServiceSublayerInfo_getURL -u _CoreRT_ArcGISMapServiceSublayerInfo_getUnknownJSON -u _CoreRT_ArcGISMapServiceSublayerInfo_getUnsupportedJSON -u _CoreRT_ArcGISMapServiceSublayerInfo_getUseStandardizedQueries -u _CoreRT_ArcGISMapServiceSublayerInfo_getVersion -u _CoreRT_ArcGISMapServiceSublayerInfo_toJSON -u _CoreRT_ArcGISRuntimeEnvironment_enableBreakOnException

......

 

Does anybody else have this problem or a solution?  Thanks for any ideas!

0 Kudos
1 Solution

Accepted Solutions
dotMorten_esri
Esri Notable Contributor

See https://docs.microsoft.com/en-us/xamarin/ios/troubleshooting/mtouch-errors#mt5217-native-linking-pos...
Could you try some of the options presented, like `--dynamic-symbol-mode=code` or disabling incremental linking?

View solution in original post

4 Replies
dotMorten_esri
Esri Notable Contributor

See https://docs.microsoft.com/en-us/xamarin/ios/troubleshooting/mtouch-errors#mt5217-native-linking-pos...
Could you try some of the options presented, like `--dynamic-symbol-mode=code` or disabling incremental linking?

ChrisDalla_Piazza
New Contributor III

Thank you so much for the tip.  --dynamic-symbol-mode=code nailed the problem!

0 Kudos
dotMorten_esri
Esri Notable Contributor

Thanks for confirming. We'll look into whether we can somehow address this out of the box in a future release.

0 Kudos
MarcAlx
New Contributor II

Found a similar issue, to me the solution was to adjust the path which was specified as relative using ~ e.g --framework:"~/.nuget/packages/esri.arcgisruntime.runtimes.ios/100.15.0/... 

Expliciting the path with an absolute value fix the problem, e.g /Users/username/.nuget/packages/esri.arcgisruntime.runtimes.ios/100.15.0/...

0 Kudos