My builds are failing and I’m trying to track down the exact problem. It appears to be missing macOS support libraries that I believe are installed by default.
Some notes up front: I am running on CircleCI only after a major change to my iOS project as I move it from CocoaPods to Swift Package Manager. On my local machine the Fastlane script will run successfully, build the project and perform the testing.
- My machine is macOS version 13.1 & Xcode version 14.2 (14C18)
- This release of CircleCI is macOS version 12.6 & Xcode version 14.2 (14C18)
The new project structure is based on using Swift Package Manager. One of the packages my project includes also contains SPM plugins to run a command line executable. That executable is also a Swift Package which is compiled for macOS. In other words, my project compiles and runs a macOS Swift command line executable.
When this executable runs it fails with the error:
dyld[13671]: Library not loaded: ‘/usr/lib/swift/libswift_StringProcessing.dylib’
Referenced from: ‘/Users/distiller/project/CanvasDx/DerivedData/SourcePackages/checkouts/cognoa-mac-tools/.build/x86_64-apple-macosx/debug/cbt’
Reason: tried: ‘/usr/lib/swift/libswift_StringProcessing.dylib’ (no such file), ‘/usr/local/lib/libswift_StringProcessing.dylib’ (no such file), ‘/usr/lib/libswift_StringProcessing.dylib’ (no such file)
Ordinarily when running through my workflow this executable is compiled and run by xcodebuild
. I was concerned that there may have been some environment variables that could cause various paths to be wrong causing the dynamic linking error. But I was able to rule this out by building this executable directly on the CircleCI machine using swift build
. I get the same error when it is run.
I searched for a libswift_StringProcessing.dylib
on the CircleCI machine and only found libraries for other platforms (iOS, tvOS, watchOS, CoreSimulator, iOS.Simulator)
/Library/Developer/CoreSimulator/Volumes/watchOS_20S75/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS 9.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswift_StringProcessing.dylib
/Library/Developer/CoreSimulator/Volumes/tvOS_20K67/Library/Developer/CoreSimulator/Profiles/Runtimes/tvOS 16.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswift_StringProcessing.dylib
/System/Volumes/Data/Library/Developer/CoreSimulator/Volumes/watchOS_20S75/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS 9.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswift_StringProcessing.dylib
/System/Volumes/Data/Library/Developer/CoreSimulator/Volumes/tvOS_20K67/Library/Developer/CoreSimulator/Profiles/Runtimes/tvOS 16.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswift_StringProcessing.dylib
/System/Volumes/Data/Applications/Xcode-14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswift_StringProcessing.dylib
/Applications/Xcode-14.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswift_StringProcessing.dylib
My local macOS 13.1 machine includes macOS builds:
/System/Volumes/Data/Users/brian/Library/Developer/Xcode/macOS DeviceSupport/13.1 (22C65) x86_64/Symbols/usr/lib/swift/libswift_StringProcessing.dylib
/System/Volumes/Data/Users/brian/Library/Developer/Xcode/iOS DeviceSupport/16.0 (20A362) arm64e/Symbols/usr/lib/swift/libswift_StringProcessing.dylib
/System/Volumes/Data/Users/brian/Library/Developer/Xcode/iOS DeviceSupport/16.2 (20C65) arm64e/Symbols/usr/lib/swift/libswift_StringProcessing.dylib
/System/Volumes/Data/Users/brian/Library/Developer/Xcode/iOS DeviceSupport/16.1.1 (20B101) arm64e/Symbols/usr/lib/swift/libswift_StringProcessing.dylib
/System/Volumes/Data/Users/brian/Library/Developer/Xcode/iOS DeviceSupport/16.0 (20A5356a) arm64e/Symbols/usr/lib/swift/libswift_StringProcessing.dylib
/System/Volumes/Data/Users/brian/Library/Developer/Xcode/iOS DeviceSupport/16.1 (20B82) arm64e/Symbols/usr/lib/swift/libswift_StringProcessing.dylib
/System/Volumes/Data/Applications/Xcode-14.1.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswift_StringProcessing.dylib
/System/Volumes/Data/Applications/Xcode-14.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswift_StringProcessing.dylib
/Users/brian/Library/Developer/Xcode/macOS DeviceSupport/13.1 (22C65) x86_64/Symbols/usr/lib/swift/libswift_StringProcessing.dylib
/Users/brian/Library/Developer/Xcode/iOS DeviceSupport/16.0 (20A362) arm64e/Symbols/usr/lib/swift/libswift_StringProcessing.dylib
/Users/brian/Library/Developer/Xcode/iOS DeviceSupport/16.2 (20C65) arm64e/Symbols/usr/lib/swift/libswift_StringProcessing.dylib
/Users/brian/Library/Developer/Xcode/iOS DeviceSupport/16.1.1 (20B101) arm64e/Symbols/usr/lib/swift/libswift_StringProcessing.dylib
/Users/brian/Library/Developer/Xcode/iOS DeviceSupport/16.0 (20A5356a) arm64e/Symbols/usr/lib/swift/libswift_StringProcessing.dylib
/Users/brian/Library/Developer/Xcode/iOS DeviceSupport/16.1 (20B82) arm64e/Symbols/usr/lib/swift/libswift_StringProcessing.dylib
/Applications/Xcode-14.1.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswift_StringProcessing.dylib
/Applications/Xcode-14.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswift_StringProcessing.dylib
I admit it is possible that the problem is that I am using a different macOS version, but I don’t expect so.
It appears that macOS device support is not download with the CircleICI Xcode install. That doesn’t make sense to me because I understand that to be included by default. There are obviously aspects to how this container is built, and how support files are installed, that I don’t understand.
Does anyone understand what might be going on?