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

Linker errors when building with Xcode 12 and CocoaPods — building for iOS Simulator, but linking in dylib built for iOS #2665

Closed
1ec5 opened this issue Sep 30, 2020 · 5 comments · Fixed by #2667
Assignees
Labels
build Issues related to builds and dependency management. release blocker Needs to be resolved before the release.
Milestone

Comments

@1ec5
Copy link
Contributor

1ec5 commented Sep 30, 2020

Xcode 12 raises linker errors about architectures when building the navigation SDK using CocoaPods. These warnings also cause CocoaPods to reject any attempt to push the MapboxCoreNavigation or MapboxNavigation pod to CocoaPods trunk.

Problem details

To validate the fix in #2662 for the CocoaPods linter error in #2646 (comment), I tried pushing to a throwaway pod on CocoaPods trunk and ran into errors doing so with the combination of CocoaPods 1.10.0.rc.1 and Xcode 12:

$ pod trunk push test-1ec5-MapboxCoreNavigation.podspec 
Updating spec repo `trunk`
Validating podspec
 -> test-1ec5-MapboxCoreNavigation (1.0.0)
    - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - NOTE  | xcodebuild:  note: Using new build system
    - NOTE  | xcodebuild:  note: Building targets in parallel
    - NOTE  | xcodebuild:  note: Using codesigning identity override: -
    - NOTE  | [iOS] xcodebuild:  note: Planning build
    - NOTE  | [iOS] xcodebuild:  note: Constructing build description
    - NOTE  | [iOS] xcodebuild:  warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'Polyline' from project 'Pods')
    - NOTE  | xcodebuild:  clang: error: linker command failed with exit code 1 (use -v to see invocation)
    - NOTE  | [iOS] xcodebuild:  warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'MapboxMobileEvents' from project 'Pods')
    - NOTE  | [iOS] xcodebuild:  warning: Skipping code signing because the target does not have an Info.plist file and one is not being generated automatically. (in target 'App' from project 'App')

[!] The spec did not pass validation, due to 1 error.

The verbose output contains additional details about the linker errors:

    Ld /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/test-1ec5-MapboxCoreNavigation.build/Objects-normal/arm64/Binary/MapboxCoreNavigation normal arm64 (in target 'test-1ec5-MapboxCoreNavigation' from project 'Pods')
        cd /var/folders/cl/8cgpg37n5cl78pjkbpgml94w0000gn/T/CocoaPods-Lint-20200929-14149-gxhgse-test-1ec5-MapboxCoreNavigation/Pods
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios10.0-simulator -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk -L/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/test-1ec5-MapboxCoreNavigation -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/test-1ec5-MapboxCoreNavigation -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/MapboxDirections -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/MapboxMobileEvents -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/Polyline -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/Turf -F/var/folders/cl/8cgpg37n5cl78pjkbpgml94w0000gn/T/CocoaPods-Lint-20200929-14149-gxhgse-test-1ec5-MapboxCoreNavigation/Pods/MapboxAccounts -F/var/folders/cl/8cgpg37n5cl78pjkbpgml94w0000gn/T/CocoaPods-Lint-20200929-14149-gxhgse-test-1ec5-MapboxCoreNavigation/Pods/MapboxCommon -F/var/folders/cl/8cgpg37n5cl78pjkbpgml94w0000gn/T/CocoaPods-Lint-20200929-14149-gxhgse-test-1ec5-MapboxCoreNavigation/Pods/MapboxNavigationNative -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/XCFrameworkIntermediates/MapboxCommon -filelist /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/test-1ec5-MapboxCoreNavigation.build/Objects-normal/arm64/MapboxCoreNavigation.LinkFileList -install_name @rpath/MapboxCoreNavigation.framework/MapboxCoreNavigation -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/test-1ec5-MapboxCoreNavigation.build/Objects-normal/arm64/MapboxCoreNavigation_lto.o -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/test-1ec5-MapboxCoreNavigation.build/Objects-normal/arm64/MapboxCoreNavigation.swiftmodule -framework MapboxAccounts -framework MapboxCommon -framework MapboxNavigationNative -framework Foundation -framework MapboxDirections -framework MapboxMobileEvents -framework Turf -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/test-1ec5-MapboxCoreNavigation.build/Objects-normal/arm64/MapboxCoreNavigation_dependency_info.dat -o /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/test-1ec5-MapboxCoreNavigation.build/Objects-normal/arm64/Binary/MapboxCoreNavigation
    ld: building for iOS Simulator, but linking in dylib built for iOS, file '/var/folders/cl/8cgpg37n5cl78pjkbpgml94w0000gn/T/CocoaPods-Lint-20200929-14149-gxhgse-test-1ec5-MapboxCoreNavigation/Pods/MapboxAccounts/MapboxAccounts.framework/MapboxAccounts' for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    Ld /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/arm64/Binary/App normal arm64 (in target 'App' from project 'App')
        cd /var/folders/cl/8cgpg37n5cl78pjkbpgml94w0000gn/T/CocoaPods-Lint-20200929-14149-gxhgse-test-1ec5-MapboxCoreNavigation
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios10.0-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk -L/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/MapboxDirections -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/MapboxMobileEvents -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/Polyline -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/Turf -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/test-1ec5-MapboxCoreNavigation -F/var/folders/cl/8cgpg37n5cl78pjkbpgml94w0000gn/T/CocoaPods-Lint-20200929-14149-gxhgse-test-1ec5-MapboxCoreNavigation/Pods/MapboxAccounts -F/var/folders/cl/8cgpg37n5cl78pjkbpgml94w0000gn/T/CocoaPods-Lint-20200929-14149-gxhgse-test-1ec5-MapboxCoreNavigation/Pods/MapboxCommon -F/var/folders/cl/8cgpg37n5cl78pjkbpgml94w0000gn/T/CocoaPods-Lint-20200929-14149-gxhgse-test-1ec5-MapboxCoreNavigation/Pods/MapboxNavigationNative -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/XCFrameworkIntermediates/MapboxCommon -filelist /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/arm64/App.LinkFileList -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/arm64/App_lto.o -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/arm64/App.swiftmodule -lc++ -lz -framework CoreLocation -framework MapboxAccounts -framework MapboxCommon -framework MapboxCoreNavigation -framework MapboxDirections -framework MapboxMobileEvents -framework MapboxNavigationNative -framework Polyline -framework Turf -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/App.app-Simulated.xcent -framework Foundation -framework Pods_App -Xlinker -dependency_info -Xlinker /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/arm64/App_dependency_info.dat -o /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/arm64/Binary/App
    ld: framework not found MapboxCoreNavigation
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    Ld /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/x86_64/Binary/App normal x86_64 (in target 'App' from project 'App')
        cd /var/folders/cl/8cgpg37n5cl78pjkbpgml94w0000gn/T/CocoaPods-Lint-20200929-14149-gxhgse-test-1ec5-MapboxCoreNavigation
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-ios10.0-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk -L/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/MapboxDirections -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/MapboxMobileEvents -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/Polyline -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/Turf -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/test-1ec5-MapboxCoreNavigation -F/var/folders/cl/8cgpg37n5cl78pjkbpgml94w0000gn/T/CocoaPods-Lint-20200929-14149-gxhgse-test-1ec5-MapboxCoreNavigation/Pods/MapboxAccounts -F/var/folders/cl/8cgpg37n5cl78pjkbpgml94w0000gn/T/CocoaPods-Lint-20200929-14149-gxhgse-test-1ec5-MapboxCoreNavigation/Pods/MapboxCommon -F/var/folders/cl/8cgpg37n5cl78pjkbpgml94w0000gn/T/CocoaPods-Lint-20200929-14149-gxhgse-test-1ec5-MapboxCoreNavigation/Pods/MapboxNavigationNative -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/XCFrameworkIntermediates/MapboxCommon -filelist /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/x86_64/App.LinkFileList -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/x86_64/App_lto.o -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/x86_64/App.swiftmodule -lc++ -lz -framework CoreLocation -framework MapboxAccounts -framework MapboxCommon -framework MapboxCoreNavigation -framework MapboxDirections -framework MapboxMobileEvents -framework MapboxNavigationNative -framework Polyline -framework Turf -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/App.app-Simulated.xcent -framework Foundation -framework Pods_App -Xlinker -dependency_info -Xlinker /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/x86_64/App_dependency_info.dat -o /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/x86_64/Binary/App
    ld: framework not found MapboxCoreNavigation
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    Ld /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/i386/Binary/App normal i386 (in target 'App' from project 'App')
        cd /var/folders/cl/8cgpg37n5cl78pjkbpgml94w0000gn/T/CocoaPods-Lint-20200929-14149-gxhgse-test-1ec5-MapboxCoreNavigation
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target i386-apple-ios10.0-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk -L/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/MapboxDirections -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/MapboxMobileEvents -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/Polyline -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/Turf -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/test-1ec5-MapboxCoreNavigation -F/var/folders/cl/8cgpg37n5cl78pjkbpgml94w0000gn/T/CocoaPods-Lint-20200929-14149-gxhgse-test-1ec5-MapboxCoreNavigation/Pods/MapboxAccounts -F/var/folders/cl/8cgpg37n5cl78pjkbpgml94w0000gn/T/CocoaPods-Lint-20200929-14149-gxhgse-test-1ec5-MapboxCoreNavigation/Pods/MapboxCommon -F/var/folders/cl/8cgpg37n5cl78pjkbpgml94w0000gn/T/CocoaPods-Lint-20200929-14149-gxhgse-test-1ec5-MapboxCoreNavigation/Pods/MapboxNavigationNative -F/Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Products/Release-iphonesimulator/XCFrameworkIntermediates/MapboxCommon -filelist /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/i386/App.LinkFileList -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/i386/App_lto.o -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/i386/App.swiftmodule -lc++ -lz -framework CoreLocation -framework MapboxAccounts -framework MapboxCommon -framework MapboxCoreNavigation -framework MapboxDirections -framework MapboxMobileEvents -framework MapboxNavigationNative -framework Polyline -framework Turf -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/App.app-Simulated.xcent -framework Foundation -framework Pods_App -Xlinker -dependency_info -Xlinker /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/i386/App_dependency_info.dat -o /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/i386/Binary/App
    ld: framework not found MapboxCoreNavigation
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    ** BUILD FAILED **
    
    
    The following build commands failed:
    	Ld /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/test-1ec5-MapboxCoreNavigation.build/Objects-normal/arm64/Binary/MapboxCoreNavigation normal arm64
    	Ld /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/arm64/Binary/App normal arm64
    	Ld /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/x86_64/Binary/App normal x86_64
    	Ld /Users/mxn/Library/Developer/Xcode/DerivedData/App-benotumsmncznfanmwdstljxbjmd/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/i386/Binary/App normal i386
    (4 failures)

Workarounds

As a temporary workaround, I xcode-selected Xcode 11.7 and tried again, this time successfully: CocoaPods/Specs@23ef623.

$ pod trunk push test-1ec5-MapboxCoreNavigation.podspec --allow-warnings
Updating spec repo `trunk`
Validating podspec
 -> test-1ec5-MapboxCoreNavigation (1.0.0)
    - NOTE  | xcodebuild:  note: Using new build system
    - NOTE  | xcodebuild:  note: Building targets in parallel
    - NOTE  | [iOS] xcodebuild:  note: Planning build
    - NOTE  | [iOS] xcodebuild:  note: Constructing build description
    - NOTE  | [iOS] xcodebuild:  note: Execution policy exception registration failed and was skipped: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (in target 'Polyline' from project 'Pods')
    - NOTE  | [iOS] xcodebuild:  note: Execution policy exception registration failed and was skipped: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (in target 'MapboxMobileEvents' from project 'Pods')
    - NOTE  | [iOS] xcodebuild:  note: Execution policy exception registration failed and was skipped: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (in target 'Turf' from project 'Pods')
    - NOTE  | [iOS] xcodebuild:  note: Execution policy exception registration failed and was skipped: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (in target 'MapboxDirections' from project 'Pods')
    - NOTE  | [iOS] xcodebuild:  note: Execution policy exception registration failed and was skipped: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (in target 'test-1ec5-MapboxCoreNavigation' from project 'Pods')
    - NOTE  | [iOS] xcodebuild:  note: Execution policy exception registration failed and was skipped: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (in target 'Pods-App' from project 'Pods')
    - NOTE  | [iOS] xcodebuild:  note: Execution policy exception registration failed and was skipped: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (in target 'App' from project 'App')
    - NOTE  | [iOS] xcodebuild:  warning: Skipping code signing because the target does not have an Info.plist file and one is not being generated automatically. (in target 'App' from project 'App')

Updating spec repo `trunk`

--------------------------------------------------------------------------------
 🎉  Congrats

 🚀  test-1ec5-MapboxCoreNavigation (1.0.0) successfully published
 📅  September 29th, 18:13
 🌎  https://cocoapods.org/pods/test-1ec5-MapboxCoreNavigation
 👍  Tell your friends!
--------------------------------------------------------------------------------

However, this workaround only makes it possible to push the pod to CocoaPods trunk; application developers using Xcode 12 are still affected by the linker errors. A more robust workaround requires modifying the podspecs to exclude Apple Silicon from the valid architectures: CocoaPods/CocoaPods#10065 (comment) CocoaPods/CocoaPods#10104 (comment).

Solution

A more long-term solution will require rebuilding MapboxAccounts with all the architectures required by Xcode 12. In the meantime, we should apply the workaround in CocoaPods/CocoaPods#10065 (comment) CocoaPods/CocoaPods#10104 (comment) to the podspecs in this repository.

/cc @mapbox/navigation-ios @mapbox/core-sdk

@1ec5 1ec5 added build Issues related to builds and dependency management. release blocker Needs to be resolved before the release. CocoaPods labels Sep 30, 2020
@1ec5 1ec5 added this to the v1.0.0 milestone Sep 30, 2020
@1ec5
Copy link
Contributor Author

1ec5 commented Sep 30, 2020

Tracking the minimum deployment target warnings above in #2666.

@1ec5 1ec5 self-assigned this Sep 30, 2020
@1ec5
Copy link
Contributor Author

1ec5 commented Sep 30, 2020

Locally, I tried adding both these lines to the test podspec:

s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }

and it linted and pushed successfully: CocoaPods/Specs@fdd6fa9.

The CocoaPods maintainers are against modifying user_target_xcconfig: CocoaPods/CocoaPods#10065 (comment). However, it’s the only way to get the library to build under these circumstances until we get a build of MapboxAccounts that supports the arm64 simulator.

@zugaldia
Copy link
Member

@1ec5 with the workaround successfully in place, does this mean that this is no longer a release blocker (but still worth keeping open)?

@1ec5
Copy link
Contributor Author

1ec5 commented Sep 30, 2020

with the workaround successfully in place, does this mean that this is no longer a release blocker (but still worth keeping open)?

I’ve only applied the workaround to a throwaway podspec that’s based on the ones in this repository, to prove that it’ll work. The next step is to apply it to the podspecs in this repository. The release is still blocked on making that change.

The more correct fix in MapboxAccounts – rebuilding it to include an arm64 simulator slice – will have to wait until after the v1.0.0 release. Once that more correct fix is in place, we can remove the workaround from this repository. That’ll be highly desirable – in general, we don’t want to toy with the application target’s build settings – but will have to wait until v1.0.1.

@1ec5
Copy link
Contributor Author

1ec5 commented Oct 1, 2020

The more correct fix in MapboxAccounts – rebuilding it to include an arm64 simulator slice – will have to wait until after the v1.0.0 release. Once that more correct fix is in place, we can remove the workaround from this repository.

#2672 tracks removing the workaround when it’s safe to do so.

@1ec5 1ec5 closed this as completed in #2667 Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues related to builds and dependency management. release blocker Needs to be resolved before the release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants