I am having a problem finding the reason my iOS cloud code build is failing when it was working previously.
The short version is I have a working build, I change a few small things in the code, such as an index check in a function that already exists, then I push the updates, do a cloud build and the build now fails with a “clang: error: linker command failed with exit code 1 (use -v to see invocation)” . No xcode changes, configuration changes, etc.
Nothing I changed should have affected the cloud build in any way. I’ve made a couple new repos off the last successful build, build them successfully, then add small changes and then build again. My first attempt, I just added a delegate to an Action, build worked. I then added some index checking code to already existing methods, build fails.
I’ve looked through the logs, disabled post script, etc and can’t figure out what’s going on. I’ve spent 2 days over the holiday weekend trying to figure this out as we need to have a build in the app store by the end of the month (approved).
I’ve pasted below the areas where the successful vs failed are different, and attached a successful log and the following unsuccessful log if it helps. Please ignore the upload errors as I did not change the version id as I was just testing to see if the build worked and it gives that error if you try to upload a build with an existing version id.
Any help would be much appreciated.
Edit 1:
Well, it’s somehow related to firebase. I removed it and it built fine. I’m not sure if changing that code is an issue as it had nothing to do with firebase messaging. Do the external dependency manager settings matter for an iOS cloud build? If so, what should they be set to.
Edit 2:
I uninstalled everything firebase except messaging and it seems to build fine now
SUCCESS
[warning] [2024-05-27T14:04:22.250Z] - 7.4.5.2.7.4 - INFO: ▸ ld: ignoring duplicate libraries: ‘-lc++’
[warning] [2024-05-27T14:04:55.644Z] - 7.4.5.2.7.4 - INFO: ▸ Run script build phase ‘Run Script’ will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking “Based on dependency analysis” in the script phase. (in target ‘GameAssembly’ from project ‘Unity-iPhone’)
[warning] [2024-05-27T14:05:38.164Z] - 7.4.5.2.7.4 - WARN: Attempted to override a protected variable. The environment variable “CI” cannot be overridden.
[warning] [2024-05-27T14:05:38.164Z] - 7.4.5.2.7.4 - INFO: Setting the environment variable “SKIP_SLOW_FASTLANE_WARNING”.
FAILED
[warning] [2024-05-27T14:48:39.610Z] - 7.4.5.2.7.4 - INFO: ld: ignoring duplicate libraries: ‘-lc++’
[error] [2024-05-27T14:48:39.611Z] - 7.4.5.2.7.4 - INFO: clang: error: linker command failed with exit code 1 (use -v to see invocation)
[warning] [2024-05-27T14:48:39.611Z] - 7.4.5.2.7.4 - INFO: Run script build phase ‘Run Script’ will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking “Based on dependency analysis” in the script phase. (in target ‘GameAssembly’ from project ‘Unity-iPhone’)
[warning] [2024-05-27T14:48:39.619Z] - 7.4.5.2.7.4 - INFO: ▸ /BUILD_PATH/samhain323.worldofwords.singleton-ios/temp20240527-3272-1v0vh94/Pods/Pods.xcodeproj: warning: The iOS deployment target ‘IPHONEOS_DEPLOYMENT_TARGET’ is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.0.99. (in target ‘FirebaseCoreInternal’ from project ‘Pods’)
[warning] [2024-05-27T14:48:39.619Z] - 7.4.5.2.7.4 - INFO: ▸ /BUILD_PATH/samhain323.worldofwords.singleton-ios/temp20240527-3272-1v0vh94/Pods/Pods.xcodeproj: warning: The iOS deployment target ‘IPHONEOS_DEPLOYMENT_TARGET’ is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.0.99. (in target ‘FirebaseCore’ from project ‘Pods’)
[warning] [2024-05-27T14:48:39.620Z] - 7.4.5.2.7.4 - INFO: ▸ warning: Run script build phase ‘Run Script’ will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking “Based on dependency analysis” in the script phase. (in target ‘GameAssembly’ from project ‘Unity-iPhone’)
[warning] [2024-05-27T14:48:39.620Z] - 7.4.5.2.7.4 - INFO: ▸ /BUILD_PATH/samhain323.worldofwords.singleton-ios/temp20240527-3272-1v0vh94/Pods/Pods.xcodeproj: warning: The iOS deployment target ‘IPHONEOS_DEPLOYMENT_TARGET’ is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.0.99. (in target ‘GoogleAppMeasurement’ from project ‘Pods’)
[warning] [2024-05-27T14:48:39.620Z] - 7.4.5.2.7.4 - INFO: ▸ /BUILD_PATH/samhain323.worldofwords.singleton-ios/temp20240527-3272-1v0vh94/Pods/Pods.xcodeproj: warning: The iOS deployment target ‘IPHONEOS_DEPLOYMENT_TARGET’ is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.0.99. (in target ‘FirebaseAnalytics’ from project ‘Pods’)
[error] [2024-05-27T14:48:39.644Z] - 7.4.5.2.7.4 - ERROR: xcode build failed
[error] RuntimeError (Build Failure):
[error] /BUILD_PATH/.rvm/gems/ruby-2.7.4/gems/bvr-7.4.5.2.7.4/lib/bvr/build/handlers/platform/xcode_compiler.rb:319:in `block in exec_fastlane’: Build Failure (RuntimeError)
[warning] [2024-05-27T14:48:40.838Z] - 7.4.5.2.7.4 - WARN: Attempted to override a protected variable. The environment variable “CI” cannot be overridden.
[warning] [2024-05-27T14:48:40.838Z] - 7.4.5.2.7.4 - INFO: Setting the environment variable “SKIP_SLOW_FASTLANE_WARNING”.
[error] 2024-05-27 14:48:47.185 *** Error: Error uploading ‘’.
9857742–1419843–successBuiild.txt (1.43 MB)
9857742–1419846–failBuild.txt (1.67 MB)