Skip to content

Xcode 14.3 compatibility needed to resolve error: libarclite_iphonesimulator.a file not found #106

@jordanhbuiltbyhq

Description

@jordanhbuiltbyhq

TrueTime is a dependency of our SDK we distribute via CocoaPods. When we build an XCFramework using xcodebuild from the 14.3 command line tools and run pod lib lint it fails with the following error:

Ld /Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/TrueTime.build/Objects-normal/x86_64/Binary/TrueTime normal x86_64 (in target 'TrueTime' from project 'Pods')
    cd /var/folders/4t/7g326jh57pg0k71lf8fbhmf80000gn/T/CocoaPods-Lint-20230419-87560-1sy6dj0-OurSDKNameHere/Pods
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -reproducible -target x86_64-apple-ios8.0-simulator -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.4.sdk -L/Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Intermediates.noindex/EagerLinkingTBDs/Release-iphonesimulator -L/Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Products/Release-iphonesimulator/TrueTime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.4.sdk/usr/lib/swift -F/Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Intermediates.noindex/EagerLinkingTBDs/Release-iphonesimulator -F/Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Products/Release-iphonesimulator/TrueTime -filelist /Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/TrueTime.build/Objects-normal/x86_64/TrueTime.LinkFileList -install_name @rpath/TrueTime.framework/TrueTime -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/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/TrueTime.build/Objects-normal/x86_64/TrueTime_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/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/TrueTime.build/Objects-normal/x86_64/TrueTime.swiftmodule -framework Foundation -Xlinker -no_adhoc_codesign -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/TrueTime.build/Objects-normal/x86_64/TrueTime_dependency_info.dat -o /Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/TrueTime.build/Objects-normal/x86_64/Binary/TrueTime
ld: file not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a

... more logs here ...

** BUILD FAILED **
    
    The following build commands failed:
    	Ld /Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/TrueTime.build/Objects-normal/x86_64/Binary/TrueTime normal x86_64 (in target 'TrueTime' from project 'Pods')
    (1 failure)
   Testing with `xcodebuild`. 
 -> OurSDKNameHere (5.0.0)
    - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.

Flutter had this same error (issue) and fixed it (pull request) by updating transitive dependencies to a minimum version of at least iOS 9. It seems TrueTime needs to do the same. Explained in that PR, it happens because:

Xcode 14.3 (released March 30, 2023) stopped building automatic reference counted (ARC) code targeting < iOS 9 or < macOS 10.11 by removing a libarclite_* library from the toolchain that was needed to link for these older targets.

I also recommend filing issues with any pods you see hitting this to suggest they updated to a minimum of at least iOS 9 and macOS 10.11. For example openid/AppAuth-iOS#761

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions