Bug 36718 - Undefined symbols for architecture arm64: "_SecTrustEvaluate", referenced from:
Summary: Undefined symbols for architecture arm64: "_SecTrustEvaluate", referenced ...
Status: RESOLVED ANSWERED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.TVOS.dll ()
Version: XI 9.3 (xcode 7.1 previews)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-12-08 16:37 UTC by jeroen
Modified: 2015-12-09 14:24 UTC (History)
3 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 ANSWERED

Description jeroen 2015-12-08 16:37:36 UTC
Building: TVFrameWork (Release)

Build started 8-12-2015 16:32:23.
__________________________________________________
Build succeeded.
	 0 Warning(s)
	 0 Error(s)

Time Elapsed 00:00:00.2282350

Build started 8-12-2015 16:32:23.

	
	Target _CreateAssetPackManifest:
		CreateAssetPackManifest Task
		  AppBundleDir: bin/iPhone/Release/TVFSXEX.app
		  InitialInstallTags: <null>
		  OutputPath: bin/iPhone/Release/
		  PrefetchOrder: <null>
	
	Target _CompileEntitlements:
		CompileEntitlements Task
		  AppBundleDir: bin/iPhone/Release/TVFSXEX.app
		  AppIdentifier: B5WJ567HZS.com.positiongames.aircreationtv
		  BundleIdentifier: com.positiongames.aircreationtv
		  CompiledEntitlements: obj/iPhone/Release/Entitlements.xcent
		  Entitlements: Entitlements.plist
		  IsAppExtension: False
		  ProvisioningProfile: af60ae78-a6d4-4c28-86ff-b43052e2344f
		  SdkVersion: 9.0
	
	Target _CompileAppManifest:
	Skipping target "_CompileAppManifest" because its outputs are up-to-date.
	
	Target _GetNativeExecutableName:
		GetNativeExecutableName Task
		  AppManifest: bin/iPhone/Release/TVFSXEX.app/Info.plist
	
	Target _CompileToNative:
		MTouch Task
		  AppBundleDir: bin/iPhone/Release/TVFSXEX.app
		  AppExtensionReferences:
		  AppManifest: bin/iPhone/Release/TVFSXEX.app/Info.plist
		  Architectures: ARM64
		  CompiledEntitlements: obj/iPhone/Release/Entitlements.xcent
		  Debug: False
		  EnableGenericValueTypeSharing: True
		  Entitlements: Entitlements.plist
		  ExecutableName: TVFSXEX
		  ExtraArgs: --bitcode=asmonly
		  FastDev: False
		  I18n: <null>
		  IntermediateOutputPath: obj/iPhone/Release/mtouch-cache
		  IsAppExtension: False
		  LinkMode: SdkOnly
		  MainAssembly: /tvos/TVFSXEX/bin/iPhone/Release//TVFSXEX.exe
		  NativeReferences: <null>
		  OutputPath: bin/iPhone/Release/
		  Profiling: False
		  ProjectDir: /tvos/TVFSXEX
		  References:
		    /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.TVOS/System.dll
		    /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.TVOS/System.Xml.dll
		    /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.TVOS/Xamarin.TVOS.dll
		    /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.TVOS/System.Core.dll
		    /cj/iOS/PositionGamesFSX/FSXPanels/bin/Release//TVFSXPanel.dll
		    /cj/iOS/LocationClient/bin/Release//TVLocationClient.dll
		    /cj/iOS/PositionGamesFSX/FSX/bin/Release//TVFSX.dll
		    /cb/web/Framework/bin/Release//TVFrameWork.dll
		    /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.TVOS/mscorlib.dll
		    /cj/iOS/PositionGamesFSX/FSXPanels/bin/Release//TVFSXPanel.dll
		    /cj/iOS/LocationClient/bin/Release//TVLocationClient.dll
		    /cj/iOS/PositionGamesFSX/FSX/bin/Release//TVFSX.dll
		    /cb/web/Framework/bin/Release//TVFrameWork.dll
		  SdkIsSimulator: False
		  SdkRoot: /Applications/Xcode.app/Contents/Developer
		  SdkVersion: 9.0
		  SymbolsList: obj/iPhone/Release/mtouch-symbols.list
		  TargetFrameworkIdentifier: Xamarin.TVOS
		  UseLlvm: False
		  UseRefCounting: True
		  UseSGen: True
		  UseThumb: False
		Tool /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch execution started with arguments: --cache /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache --dev /tvos/TVFSXEX/bin/iPhone/Release/TVFSXEX.app --executable TVFSXEX --linksdkonly --sdkroot /Applications/Xcode.app/Contents/Developer --sdk 9.0 --targetver 9.0 --new-refcount --abi=arm64 --symbollist /tvos/TVFSXEX/obj/iPhone/Release/mtouch-symbols.list --dsym=no --bitcode=asmonly -r /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.TVOS/System.dll -r /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.TVOS/System.Xml.dll -r /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.TVOS/Xamarin.TVOS.dll -r /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.TVOS/System.Core.dll -r /cj/iOS/PositionGamesFSX/FSXPanels/bin/Release/TVFSXPanel.dll -r /cj/iOS/LocationClient/bin/Release/TVLocationClient.dll -r /cj/iOS/PositionGamesFSX/FSX/bin/Release/TVFSX.dll -r /cb/web/Framework/bin/Release/TVFrameWork.dll -r /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.TVOS/mscorlib.dll -r /cj/iOS/PositionGamesFSX/FSXPanels/bin/Release/TVFSXPanel.dll -r /cj/iOS/LocationClient/bin/Release/TVLocationClient.dll -r /cj/iOS/PositionGamesFSX/FSX/bin/Release/TVFSX.dll -r /cb/web/Framework/bin/Release/TVFrameWork.dll --target-framework Xamarin.TVOS,v1.0 /tvos/TVFSXEX/bin/iPhone/Release//TVFSXEX.exe 
		Xamarin.iOS 9.3.1 Business Edition using framework: /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.0.sdk
		Process exited with code 1, command:
		/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang  -fembed-bitcode -arch arm64 -mtvos-version-min=9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.0.sdk /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/TVFSXEX.exe.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/Xamarin.TVOS.dll.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/mscorlib.dll.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/System.dll.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/System.Xml.dll.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/System.Core.dll.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/TVFSXPanel.dll.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/TVLocationClient.dll.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/TVFrameWork.dll.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/TVFSX.dll.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/registrar.arm64.o /tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/main.arm64.o -o /tvos/TVFSXEX/bin/iPhone/Release/TVFSXEX.app/TVFSXEX -framework CoreGraphics -framework CoreLocation -framework Foundation -framework StoreKit -framework SystemConfiguration -framework UIKit -framework AVFoundation -framework CFNetwork -lz -liconv /Library/Frameworks/Xamarin.iOS.framework/Versions/9.3.1.63/SDKs/Xamarin.AppleTVOS.sdk/usr/lib/libmonosgen-2.0.a /Library/Frameworks/Xamarin.iOS.framework/Versions/9.3.1.63/SDKs/Xamarin.AppleTVOS.sdk/usr/lib/libxamarin.a /Library/Frameworks/Xamarin.iOS.framework/Versions/9.3.1.63/SDKs/Xamarin.AppleTVOS.sdk/usr/lib/libapp.a -dead_strip
		Undefined symbols for architecture arm64:
		  "_SecTrustEvaluate", referenced from:
		      wrapper_managed_to_native_System_Security_Cryptography_X509Certificates_OSX509Certificates_SecTrustEvaluate_intptr_System_Security_Cryptography_X509Certificates_OSX509Certificates_SecTrustResult_ in System.dll.arm64.o
		  "_GetNetworkParams", referenced from:
		      wrapper_managed_to_native_System_Net_NetworkInformation_Win32_FIXED_INFO_GetNetworkParams_byte___int_ in System.dll.arm64.o
		  "_SecPolicyCreateSSL", referenced from:
		      wrapper_managed_to_native_System_Security_Cryptography_X509Certificates_OSX509Certificates_SecPolicyCreateSSL_bool_intptr in System.dll.arm64.o
		  "_SecTrustCreateWithCertificates", referenced from:
		      wrapper_managed_to_native_System_Security_Cryptography_X509Certificates_OSX509Certificates_SecTrustCreateWithCertificates_intptr_intptr_intptr_ in System.dll.arm64.o
		  "_SecCertificateCreateWithData", referenced from:
		      wrapper_managed_to_native_System_Security_Cryptography_X509Certificates_OSX509Certificates_SecCertificateCreateWithData_intptr_intptr in System.dll.arm64.o
		  "_SecRandomCopyBytes", referenced from:
		      wrapper_managed_to_native_Crimson_CommonCrypto_Cryptor_SecRandomCopyBytes_intptr_intptr_byte__ in mscorlib.dll.arm64.o
		ld: symbol(s) not found for architecture arm64
		clang: error: linker command failed with exit code 1 (use -v to see invocation)
		
MTOUCH: error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
		System.NullReferenceException: Object reference not set to an instance of an object
		  at MonoTouch.Target.GetMemberForSymbol (System.String symbol) [0x00000] in <filename unknown>:0 
		  at MonoTouch.Application.ProcessNativeLinkerOutput (MonoTouch.Target target, System.String output, IList`1 inputs, System.Collections.Generic.List`1 errors, Boolean error) [0x00000] in <filename unknown>:0 
		  at MonoTouch.Target.NativeLink () [0x00000] in <filename unknown>:0 
		  at MonoTouch.Application.BuildApp () [0x00000] in <filename unknown>:0 
		  at MonoTouch.Application.Build () [0x00000] in <filename unknown>:0 
		  at MTouch.Main2 (System.String[] args) [0x00000] in <filename unknown>:0 
		  at MTouch.Main (System.String[] args) [0x00000] in <filename unknown>:0 
	Task "MTouch" execution -- FAILED
	Done building target "_CompileToNative" in project "/tvos/TVFSXEX/TVFSXAirCreation.csproj".-- FAILED
	
Done building project "/tvos/TVFSXEX/TVFSXAirCreation.csproj".-- FAILED

Build FAILED.

Warnings:

/tvos/TVFSXEX/TVFSXAirCreation.csproj (Build) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets (_CoreCompileImageAssets target) ->

	Resources/Assets.xcassets: actool warning : The image set "Content" has an unassigned child.
	Resources/Assets.xcassets: actool warning : The image set "Content" has an unassigned child.
	Resources/Assets.xcassets: actool warning : The image set "Content" has an unassigned child.
	Resources/Assets.xcassets: actool warning : The image set "Content" has an unassigned child.
	Resources/Assets.xcassets: actool warning : The image set "Top Shelf Image" has an unassigned child.
	Resources/Assets.xcassets: actool warning : The app icon set "AppIcons" has an unassigned child.

/tvos/TVFSXEX/TVFSXAirCreation.csproj (Build) ->
/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.CSharp.targets (CoreCompile target) ->

	AppDelegate.cs(107,10): warning CS0219: The variable `n' is assigned but its value is never used

Errors:

-------------------- Afgerond --------------------

Bouw: 1 foutmelding, 175 waarschuwingen
Comment 1 Sebastien Pouliot 2015-12-08 16:55:31 UTC
Native linking needs to be done differently, at least until Xcode 7.2 (which cannot be used today for submitting), which implements `-u` for bitcode linking.

The workaround is to add

> -gcc_flags="-framework Security"

in the "Additional mtouch arguments" of your main project's options.

Let me know you still hit a NullReferenceException (after the current errors). If so I'll give you a more recent build.
Comment 2 jeroen 2015-12-08 17:29:32 UTC
I get an different error. Which platform target do i have to set?  x68, x64?

/tvos/TVFSXEX/TVFSXAirCreation.csproj (Build) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets (_CompileToNative target) ->

	MTOUCH: error MT5209: Native linking error: building for tvOS, but linking in object file built for iOS, file '/tvos/TVFSXEX/obj/iPhone/Release/mtouch-cache/TVFSXEX.exe.arm64-llvm.o' for architecture arm64
	MTOUCH: error MT5201: Native linking failed. Please review the build log and the user flags provided to gcc: -framework Security
	MTOUCH: error MT5202: Native linking failed. Please review the build log.

	 6 Warning(s)
	 3 Error(s)

Time Elapsed 00:00:22.6559420
Comment 4 jeroen 2015-12-09 13:44:41 UTC
Thanks, it works now
Comment 5 Sebastien Pouliot 2015-12-09 14:24:20 UTC
Glad to hear this :-)

Please re-open the bug report with additional details if you hit further issues, e.g. trying to submit the application to the App Store.