After upgrading to Xcode 14.3, build fails to link libarclite_iphoneos.a

My project was building fine with Xcode 14.1. After upgrading Xcode to 14.3 (and MacOS to Ventura), the project at first reported that build succeeded. But then when I tried to run the project, it suddenly reported that build failed, with the following error:

ld: file not found: /Applications/Xcode 14.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a clang: error: linker command failed with exit code 1 (use -v to see invocation)

The build fails while trying to link a cocoa pod library we use called SVProgressHUD. The full link command as found in the build log is as follows:

Ld /Users/username/Library/Developer/Xcode/DerivedData/Dudleys-awqewehuamgjgrfgdpuqcillyxfo/Build/Products/Debug-iphoneos/SVProgressHUD/SVProgressHUD.framework/SVProgressHUD normal (in target 'SVProgressHUD' from project 'Pods')
cd /Users/username/lineskip_dev/ios_apps/dudleys/Pods
/Applications/Xcode\ 14.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -reproducible -target arm64-apple-ios8.0 -dynamiclib -isysroot /Applications/Xcode\ 14.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk -L/Users/username/Library/Developer/Xcode/DerivedData/Dudleys-awqewehuamgjgrfgdpuqcillyxfo/Build/Intermediates.noindex/EagerLinkingTBDs/Debug-iphoneos -L/Users/username/Library/Developer/Xcode/DerivedData/Dudleys-awqewehuamgjgrfgdpuqcillyxfo/Build/Products/Debug-iphoneos/SVProgressHUD -F/Users/username/Library/Developer/Xcode/DerivedData/Dudleys-awqewehuamgjgrfgdpuqcillyxfo/Build/Intermediates.noindex/EagerLinkingTBDs/Debug-iphoneos -F/Users/username/Library/Developer/Xcode/DerivedData/Dudleys-awqewehuamgjgrfgdpuqcillyxfo/Build/Products/Debug-iphoneos/SVProgressHUD -filelist /Users/username/Library/Developer/Xcode/DerivedData/Dudleys-awqewehuamgjgrfgdpuqcillyxfo/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/SVProgressHUD.build/Objects-normal/arm64/SVProgressHUD.LinkFileList -install_name @rpath/SVProgressHUD.framework/SVProgressHUD -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/username/Library/Developer/Xcode/DerivedData/Dudleys-awqewehuamgjgrfgdpuqcillyxfo/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/SVProgressHUD.build/Objects-normal/arm64/SVProgressHUD_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -framework QuartzCore -framework Foundation -framework QuartzCore -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/username/Library/Developer/Xcode/DerivedData/Dudleys-awqewehuamgjgrfgdpuqcillyxfo/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/SVProgressHUD.build/Objects-normal/arm64/SVProgressHUD_dependency_info.dat -o /Users/username/Library/Developer/Xcode/DerivedData/Dudleys-awqewehuamgjgrfgdpuqcillyxfo/Build/Products/Debug-iphoneos/SVProgressHUD/SVProgressHUD.framework/SVProgressHUD

What's strange is that we are successfully building other projects with Xcode 14.3 that use this same library. And I can't find the reason why the linker is trying to link to the file libarclite_iphoeos.a in the first place.

Replies

I currently have hazzled with this in my Flutter project.

In my project the FMDB was linking to version 8.0, so I suggest you try to force everything to a certain version. Add these lines at the end of your Podfile:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
     end
  end
end

I take no credits for this, it was an stackoverflow page that helped me out. Hopefully it will work for you :)

I have the same problem, can't figure it out the proper solution.. Thanks apple again for breaking stuff and letting devs suffer

Here is the fixed of above code version

post_install do |installer|
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
      end
    end
  end