Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[XM] Undefined symbols for architecture x86_64: ... after 2019-02 merge #5954

Closed
spouliot opened this issue Apr 26, 2019 · 6 comments
Closed
Assignees
Labels
bug If an issue is a bug or a pull request a bug fix macOS Issues affecting macOS
Milestone

Comments

@spouliot
Copy link
Contributor

spouliot commented Apr 26, 2019

Steps to Reproduce

  1. Build SubmissionSamples/MacCoolApp_DontLink/MacCoolApp.sln

Expected Behavior

Success

Actual Behavior

Build started 2019-04-26 2:04:37 PM.
Project "/Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp.sln" on node 1 (Build target(s)).
ValidateSolutionConfiguration:
  Building solution configuration "Release|Any CPU".
Project "/Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp.sln" (1) is building "/Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp/MacCoolApp.csproj" (2) on node 1 (default targets).
_BeforeCoreCompileImageAssets:
  Deleting file "obj/Release/actool/_PartialAppManifest.items".
  Deleting file "obj/Release/actool/_BundleResourceWithLogicalName.items".
  Removing directory "obj/Release/actool".
_CoreCompileImageAssets:
  Tool /Applications/Xcode102.app/Contents/Developer/usr/bin/actool execution started with arguments: --errors --warnings --notices --output-format xml1 --minimum-deployment-target 10.10 --platform macosx --compile /Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp/obj/Release/actool/bundle /Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp/obj/Release/actool/cloned-assets/Resources/Media.xcassets
/Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp/obj/Release/actool/cloned-assets/Resources/Media.xcassets : actool warning : The app icon set "AppIcon" has an unassigned child. [/Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp/MacCoolApp.csproj]
_CoreCompileInterfaceDefinitions:
    BundleResources Output:
      obj/Release/ibtool/MainWindow.nib
      obj/Release/ibtool/MainMenu.nib
    OutputManifests Output:
      obj/Release/ibtool-manifests/MainWindow.nib
      obj/Release/ibtool-manifests/MainMenu.nib
_CoreCompileColladaAssets:
Skipping target "_CoreCompileColladaAssets" because it has no inputs.
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreCompile:
Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
CopyFilesToOutputDirectory:
  MacCoolApp -> /Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp/bin/Release/MacCoolApp.exe
_DetectSigningIdentity:
  Detected signing identity:
    Code Signing Key: "3rd Party Mac Developer Application: Luis Aguilera (DPXCPAGVTZ)" (6231B24B25962F871E6EEB2D703BFED04D963C61)
    Provisioning Profile: "Mac Cool App - Distribution Profile" (e51a03c3-496c-4437-a6a6-e3697f291a8f)
    Bundle Id: com.xamarin.mac-publish-workflow
    App Id: DPXCPAGVTZ.com.xamarin.mac-publish-workflow
_CopyContentToBundle:
Skipping target "_CopyContentToBundle" because all output files are up-to-date with respect to the input files.
_CompileToNative:
  /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/bin/mmp @/Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp/obj/Release/response-file.rsp -linkplatform 
  Process exited with code 1, command:
  xcrun -sdk macosx clang -mmacosx-version-min=10.10 -arch x86_64 -fobjc-runtime=macosx -Wno-unguarded-availability-new -ObjC -framework Security -framework CoreServices -framework AppKit -framework Foundation -framework CoreFoundation -framework SystemConfiguration -framework Carbon -u _SystemNative_ConvertErrorPlatformToPal -u _SystemNative_ConvertErrorPalToPlatform -u _SystemNative_StrErrorR -u _SystemNative_GetNonCryptographicallySecureRandomBytes -u _SystemNative_OpenDir -u _SystemNative_GetReadDirRBufferSize -u _SystemNative_ReadDirR -u _SystemNative_CloseDir -u _SystemNative_FStat2 -u _SystemNative_Stat2 -u _SystemNative_LStat2 -u _SystemNative_ChMod -u _SystemNative_CopyFile -u _SystemNative_GetEGid -u _SystemNative_GetEUid -u _SystemNative_Link -u _SystemNative_MkDir -u _SystemNative_Rename -u _SystemNative_RmDir -u _SystemNative_UTime -u _SystemNative_UTimes -u _SystemNative_Unlink -u _xamarin_timezone_get_names -u _xamarin_timezone_get_data -u _NetSecurityNative_ReleaseGssBuffer -u _NetSecurityNative_DisplayMinorStatus -u _NetSecurityNative_DisplayMajorStatus -u _NetSecurityNative_ImportUserName -u _NetSecurityNative_ImportPrincipalName -u _NetSecurityNative_ReleaseName -u _NetSecurityNative_InitiateCredSpNego -u _NetSecurityNative_InitiateCredWithPassword -u _NetSecurityNative_ReleaseCred -u _NetSecurityNative_InitSecContext -u _NetSecurityNative_AcceptSecContext -u _NetSecurityNative_DeleteSecContext -u _NetSecurityNative_Wrap -u _NetSecurityNative_Unwrap -u _mono_pal_init -u _xamarin_find_protocol_wrapper_type -u _xamarin_get_block_descriptor /Users/poupou/git/xamarin/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/libxammac.a -o /Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp/bin/Release/MacCoolApp.app/Contents/MacOS/MacCoolApp -D_THREAD_SAFE -I/Users/poupou/git/xamarin/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/pkgconfig/../../include/mono-2.0   /Users/poupou/git/xamarin/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/pkgconfig/../../lib/libmonosgen-2.0.a /Users/poupou/git/xamarin/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/pkgconfig/../../lib/libmono-system-native.a -u _SystemNative_RealPath -liconv -lc++ -x objective-c++ -stdlib=libc++ -I/Users/poupou/git/xamarin/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/include /Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp/obj/Release/mmp-cache/registrar.m -fno-caret-diagnostics -fno-diagnostics-fixit-info -isysroot /Applications/Xcode102.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk /Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp/obj/Release/mmp-cache/main.m
  Undefined symbols for architecture x86_64:
    "_NetSecurityNative_AcceptSecContext", referenced from:
       -u command line option
    "_NetSecurityNative_DeleteSecContext", referenced from:
       -u command line option
    "_NetSecurityNative_DisplayMajorStatus", referenced from:
       -u command line option
    "_NetSecurityNative_DisplayMinorStatus", referenced from:
       -u command line option
    "_NetSecurityNative_ImportPrincipalName", referenced from:
       -u command line option
    "_NetSecurityNative_ImportUserName", referenced from:
       -u command line option
    "_NetSecurityNative_InitSecContext", referenced from:
       -u command line option
    "_NetSecurityNative_InitiateCredSpNego", referenced from:
       -u command line option
    "_NetSecurityNative_InitiateCredWithPassword", referenced from:
       -u command line option
    "_NetSecurityNative_ReleaseCred", referenced from:
       -u command line option
    "_NetSecurityNative_ReleaseGssBuffer", referenced from:
       -u command line option
    "_NetSecurityNative_ReleaseName", referenced from:
       -u command line option
    "_NetSecurityNative_Unwrap", referenced from:
       -u command line option
    "_NetSecurityNative_Wrap", referenced from:
       -u command line option
    "_SystemNative_GetEGid", referenced from:
       -u command line option
    "_SystemNative_GetEUid", referenced from:
       -u command line option
    "_SystemNative_UTime", referenced from:
       -u command line option
    "_SystemNative_UTimes", referenced from:
       -u command line option
  ld: symbol(s) not found for architecture x86_64
clang : error : linker command failed with exit code 1 (use -v to see invocation) [/Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp/MacCoolApp.csproj]
  
MMP : error MM5109: Native linking failed with error code 1.  Check build log for details. [/Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp/MacCoolApp.csproj]
Done Building Project "/Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp/MacCoolApp.csproj" (default targets) -- FAILED.
Done Building Project "/Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp.sln" (Build target(s)) -- FAILED.

Build FAILED.

"/Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp.sln" (Build target) (1) ->
"/Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp/MacCoolApp.csproj" (default target) (2) ->
(_CoreCompileImageAssets target) -> 
  /Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp/obj/Release/actool/cloned-assets/Resources/Media.xcassets : actool warning : The app icon set "AppIcon" has an unassigned child. [/Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp/MacCoolApp.csproj]


"/Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp.sln" (Build target) (1) ->
"/Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp/MacCoolApp.csproj" (default target) (2) ->
(_CompileToNative target) -> 
  clang : error : linker command failed with exit code 1 (use -v to see invocation) [/Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp/MacCoolApp.csproj]
  MMP : error MM5109: Native linking failed with error code 1.  Check build log for details. [/Users/poupou/git/master/SubmissionSamples/MacCoolApp_DontLink/MacCoolApp/MacCoolApp.csproj]

    1 Warning(s)
    2 Error(s)

Time Elapsed 00:00:13.00

Environment

master - after mono-2019-02 merge

@spouliot spouliot added bug If an issue is a bug or a pull request a bug fix macOS Issues affecting macOS labels Apr 26, 2019
@spouliot spouliot added this to the Future milestone Apr 26, 2019
@spouliot
Copy link
Contributor Author

spouliot commented May 8, 2019

References are coming from System.dll

file external/mono//external/corefx/src/Common/src/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.cs

[DllImport] points to

external/mono//external/corefx/src/Common/src/Interop/Unix//Interop.Libraries.cs:        internal const string NetSecurityNative = "System.Net.Security.Native";

but it seems remapped to libmono-native-[unified|compat].[dylib|a]

@spouliot
Copy link
Contributor Author

with a newer build I only had failures for

Undefined symbols for architecture x86_64:
    "_SystemNative_GetEGid", referenced from:
       -u command line option
    "_SystemNative_GetEUid", referenced from:
       -u command line option
  ld: symbol(s) not found for architecture x86_64

I need to double check that since this is not what I was testing...

@spouliot
Copy link
Contributor Author

The above also happens when using a new (6.0'ish) system mono to build an XM app, e.g. mlaunch.app

  Undefined symbols for architecture x86_64: (TaskId:105)
    "_SystemNative_GetEGid", referenced from: (TaskId:105)
       -u command line option (TaskId:105)
    "_SystemNative_GetEUid", referenced from: (TaskId:105)
       -u command line option (TaskId:105)
  ld: symbol(s) not found for architecture x86_64 (TaskId:105)
clang : error : linker command failed with exit code 1 (use -v to see invocation) [/Users/poupou/git/master/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Launcher/Xamarin.Launcher.csproj]
   (TaskId:105)
MMP : error MM5109: Native linking failed with error code 1.  Check build log for details. [/Users/poupou/git/master/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Launcher/Xamarin.Launcher.csproj]
  The command exited with code 1. (TaskId:105)
  Output Item(s): _NativeLibrary= (TaskId:105)
Done executing task "Mmp" -- FAILED. (TaskId:105)

@alexischr alexischr self-assigned this May 20, 2019
@spouliot
Copy link
Contributor Author

@alexischr have you been able to reproduce it ?

I got the same error on another test, one that worked on bots. It turns out it was caused by some local stale files. Right now I'm not sure if this happens (for real) on the submission tests. I'll re-test them and update (or close) the bug.

@alexischr
Copy link
Contributor

We are now thinking this is a local issue, caused by a stale libmono-system-native.a (the old name of the mono-native library). @spouliot Feel free to close if you confirm that is the case.

@spouliot
Copy link
Contributor Author

I can't duplicate this with a clean d16-2 build.
Submission tests worked without any negative emails
Closing

@ghost ghost locked as resolved and limited conversation to collaborators May 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug If an issue is a bug or a pull request a bug fix macOS Issues affecting macOS
Projects
None yet
Development

No branches or pull requests

2 participants