Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Unity IOS cloud build gives unexpected xcode error

Discussion in 'Unity Build Automation' started by plaarakkers, Nov 1, 2021.

  1. plaarakkers

    plaarakkers

    Joined:
    Oct 20, 2021
    Posts:
    4
    We have a Unity project where the IOS build on a local Mac creates a working build. When running the same build in the Unity cloud we get an unexpected error in the build. The Unity and Xcode version are set the same on both builds.

    Unity: 2021.1.20f1
    Xcode: 12.5.1

    The error for the build is:

    Linking UnityFramework
    27514: ❌; Undefined symbols for architecture arm64
    27515: > Symbol: _UnityARKit_FaceProvider_GetMaximumFaceCount
    27516: > Referenced from: _ARKitFaceSubsystem_UnityARKit_FaceProvider_GetMaximumFaceCount_m989B8F9A715B39D93A3B0C23D2CD3B0B0C794CD2 in Unity.XR.ARKit.FaceTracking.o
    27517: ❌; ld: symbol(s) not found for architecture arm64
    27518: ❌; clang: error: linker command failed with exit code 1 (use -v to see invocation)
    27519: ** ARCHIVE FAILED **
    27520: The following build commands failed:
    27521: Ld /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-cyvbguublwdhmxfoivudhtpbfuol/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/UnityFramework.framework/UnityFramework normal
    27522: (1 failure)
    27523: Exit status: 65
    27524: Maybe the error shown is caused by using the wrong version of Xcode
    27525: Found multiple versions of Xcode in '/APPLICATION_PATH/'
    27526: Make sure you selected the right version for your project
    27527: This build process was executed using '/APPLICATION_PATH/Xcode12_5_1.app'
    27528: If you want to update your Xcode path, either
    27529: - Specify the Xcode version in your Fastfile
    27530: ▸ xcversion(version: "8.1") # Selects Xcode 8.1.0
    27531: - Specify an absolute path to your Xcode installation in your Fastfile
    27532: ▸ xcode_select "/APPLICATION_PATH/Xcode8.app"
    27533: - Manually update the path using
    27534: ▸ sudo xcode-select -s /APPLICATION_PATH/Xcode.app
    27535: +-------------+-------------------------------+
    27536: | Build environment |
    27537: +-------------+-------------------------------+
    27538: | xcode_path | /APPLICATION_PATH/Xcode12_5_1.app |
    27539: | gym_version | 2.182.0 |
    27540: | sdk | iPhoneOS14.5.sdk |
    27541: +-------------+-------------------------------+
    27542: ▸ _ARKitFaceSubsystem_UnityARKit_FaceProvider_Initialize_mFEFCC10A1D16F6A553EC9480EE070081C8201070 in Unity.XR.ARKit.FaceTracking.o
    27543: ▸ _ARKitProvider__ctor_mF8ABBB36CFF4009240926841B45BBACD66DB52D9 in Unity.XR.ARKit.FaceTracking.o
    27544: ▸ (maybe you meant: _ARKitFaceSubsystem_UnityARKit_FaceProvider_Initialize_mFEFCC10A1D16F6A553EC9480EE070081C8201070)
    27545: ▸ ld: symbol(s) not found for architecture arm64
    27546: ▸ clang: error: linker command failed with exit code 1 (use -v to see invocation)
    27547: ⬆️ Check out the few lines of raw `xcodebuild` output above for potential hints on how to solve this error
    27548: For the complete and more detailed error log, check the full log at:
    27549: /BUILD_PATH/Library/Logs/gym/<Project>-Unity-iPhone.log
    27550: Looks like fastlane ran into a build/archive error with your project
    27551: It's hard to tell what's causing the error, so we wrote some guides on how
    27552: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
    27553: Before submitting an issue on GitHub, please follow the guide above and make
    27554: sure your project is set up correctly.
    27555: fastlane uses `xcodebuild` commands to generate your binary, you can see the
    27556: the full commands printed out in yellow in the above log.
    27557: Make sure to inspect the output above, as usually you'll find more error information there
    27558: +------------------+-----------+
    27559: | Lane Context |
    27560: +------------------+-----------+
    27561: | DEFAULT_PLATFORM | ios |
    27562: | PLATFORM_NAME | ios |
    27563: | LANE_NAME | ios build |
    27564: +------------------+-----------+
    27565: Error building the application - see the log above
    27566: +------+---------------------------------------------------------------+-------------+
    27567: | fastlane summary |
    27568: +------+---------------------------------------------------------------+-------------+
    27569: | Step | Action | Time (in s) |
    27570: +------+---------------------------------------------------------------+-------------+
    27571: | 1 | Verifying fastlane version | 0 |
    27572: | 2 | default_platform | 0 |
    27573: | 3 | set_info_plist_value | 0 |
    27574: | 4 | update_project_provisioning | 0 |
    27575: | 5 | sed -i '' '/PROVISIONING_PROFILE_SPECIFIER/d;/DEVELOPMENT_TEA | 0 |
    27576: | | gym | 1035 |
    27577: +------+---------------------------------------------------------------+-------------+
    27578: fastlane finished with errors
    27579: [!] Error building the application - see the log above
    27580: ! build of 'default-ios' failed. ! xcode build failed.
    27581: Publishing build 118 of 4034402/3e3834bf-96e9-4566-99a7-97152b63edfb for target 'default-ios'...
    27582: Uploading extra_data/artifacts/icon.png ...done
    27583: Uploading extra_data/build_report/summary.json ...done
    27584: Uploading extra_data/build_report/summary.reflected.json ...done
    27585: Uploading extra_data/build_report/steps.reflected.json ...done
    27586: Uploading extra_data/build_report/files.reflected.json
    27587: ...done


    I would expect that the cloud build to have the same result as a local build.

    Is there a solution so that the IOS build also works in the cloud build?
     
  2. rajivrao

    rajivrao

    Unity Technologies

    Joined:
    Feb 19, 2019
    Posts:
    111
    Hey @plaarakkers -- shared this with the team and they have a few hypotheses for what's going on. The best next step would be to submit a support ticket so they can look a bit closer at your logs.
     
  3. plaarakkers

    plaarakkers

    Joined:
    Oct 20, 2021
    Posts:
    4
    Hi @rajivrao, sorry or the late reply, I will create a request from the dashboard.
     
    rajivrao likes this.
  4. Qhuhuit

    Qhuhuit

    Joined:
    Feb 17, 2018
    Posts:
    39
    exact same issue here, same log messages. Any update @rajivrao ?
    Unity: 2020.3.26f1
    Xcode: 12.4.0
     
    Last edited: Jan 25, 2022
  5. ValeryNikulina

    ValeryNikulina

    Unity Technologies

    Joined:
    Oct 26, 2020
    Posts:
    138
    Hi,

    Could you please try to build with Xcode 13.0 in Cloud Build and let me know if this resolves the issue? Let us know if this doesn't resolve the issue though and I'll look into this further
     
  6. Qhuhuit

    Qhuhuit

    Joined:
    Feb 17, 2018
    Posts:
    39
    Bumped to Unity 2021.1.28 and Xcode 13.0, same issue.
    Also I can't build with higher Unity version on any target, crash at launch.

    Code (CSharp):
    1. 8623:;  Undefined symbols for architecture arm64
    2. 8624: > Symbol: __RequestGalleryAuthorization
    3. 8625: > Referenced from: _iOsUtils__RequestGalleryAuthorization_mBD2C5275062BA53610A50A8F4683B25EB81D3A63 in Assembly-CSharp9.o
    4. 8626:;  ld: symbol(s) not found for architecture arm64
    5. 8627:;  clang: error: linker command failed with exit code 1 (use -v to see invocation)
    6. 8628: ** ARCHIVE FAILED **
    7. 8629: The following build commands failed:
    8. 8630:     Ld /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-aaspwdisnkseuygsqdpvdylliyqe/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/UnityFramework.framework/UnityFramework normal (in target 'UnityFramework' from project 'Unity-iPhone')
    9. 8631: (1 failure)
    10. 8632: Exit status: 65
    11. 8633: Maybe the error shown is caused by using the wrong version of Xcode
    12. 8634: Found multiple versions of Xcode in '/APPLICATION_PATH/'
    13. 8635: Make sure you selected the right version for your project
    14. 8636: This build process was executed using '/APPLICATION_PATH/Xcode13_0_0.app'
    15. 8637: If you want to update your Xcode path, either
    16. 8638: - Specify the Xcode version in your Fastfile
    17. 8639: ▸ xcversion(version: "8.1") # Selects Xcode 8.1.0
    18. 8640: - Specify an absolute path to your Xcode installation in your Fastfile
    19. 8641: ▸ xcode_select "/APPLICATION_PATH/Xcode8.app"
    20. 8642: - Manually update the path using
    21. 8643: ▸ sudo xcode-select -s /APPLICATION_PATH/Xcode.app
    22. 8644: +-------------+-------------------------------+
    23. 8645: |              Build environment              |
    24. 8646: +-------------+-------------------------------+
    25. 8647: | xcode_path  | /APPLICATION_PATH/Xcode13_0_0.app |
    26. 8648: | gym_version | 2.182.0                       |
    27. 8649: | sdk         | iPhoneOS15.0.sdk              |
    28. 8650: +-------------+-------------------------------+
    29. 8651: ▸       _iOsUtils__AddImageToGallery_mE6ABA6C00DF9DA06889B7A428DE1AF2F04589641 in Assembly-CSharp9.o
    30. 8652: ▸       _iOsUtils_AddImageToGallery_m469B18281B4F123F31685F555708CC3A27F2DD3B in Assembly-CSharp9.o
    31. 8653: ▸      (maybe you meant: _iOsUtils__AddImageToGallery_mE6ABA6C00DF9DA06889B7A428DE1AF2F04589641)
    32. 8654: ▸ ld: symbol(s) not found for architecture arm64
    33. 8655: ▸ clang: error: linker command failed with exit code 1 (use -v to see invocation)
    34. 8656: ⬆️  Check out the few lines of raw `xcodebuild` output above for potential hints on how to solve this error
    35. 8657:   For the complete and more detailed error log, check the full log at:
    36. 8658:   /BUILD_PATH/Library/Logs/gym/MyProject-Unity-iPhone.log
    37. 8659: Looks like fastlane ran into a build/archive error with your project
    38. 8660: It's hard to tell what's causing the error, so we wrote some guides on how
    39. 8661: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
    40. 8662: Before submitting an issue on GitHub, please follow the guide above and make
    41. 8663: sure your project is set up correctly.
    42. 8664: fastlane uses `xcodebuild` commands to generate your binary, you can see the
    43. 8665: the full commands printed out in yellow in the above log.
    44. 8666: Make sure to inspect the output above, as usually you'll find more error information there
    45. 8667: +------------------+-----------+
    46. 8668: |         Lane Context         |
    47. 8669: +------------------+-----------+
    48. 8670: | DEFAULT_PLATFORM | ios       |
    49. 8671: | PLATFORM_NAME    | ios       |
    50. 8672: | LANE_NAME        | ios build |
    51. 8673: +------------------+-----------+
    52. 8674: Error building the application - see the log above
    53. 8675: +------+---------------------------------------------------------------+-------------+
    54. 8676: |                                  fastlane summary                                  |
    55. 8677: +------+---------------------------------------------------------------+-------------+
    56. 8678: | Step | Action                                                        | Time (in s) |
    57. 8679: +------+---------------------------------------------------------------+-------------+
    58. 8680: | 1    | Verifying fastlane version                                    | 0           |
    59. 8681: | 2    | default_platform                                              | 0           |
    60. 8682: | 3    | set_info_plist_value                                          | 0           |
    61. 8683: | 4    | update_project_provisioning                                   | 0           |
    62. 8684: | 5    | sed -i '' '/PROVISIONING_PROFILE_SPECIFIER/d;/DEVELOPMENT_TEA | 0           |
    63. 8685: |    | gym                                                           | 181         |
    64. 8686: +------+---------------------------------------------------------------+-------------+
    65. 8687: fastlane finished with errors
    66. 8688: [!] Error building the application - see the log above
    67. 8689: ! build of 'default-ios' failed. ! xcode build failed.
     
  7. ValeryNikulina

    ValeryNikulina

    Unity Technologies

    Joined:
    Oct 26, 2020
    Posts:
    138
    Hi,

    Thanks! Could you please let me know what Xcode version you're using to build locally? And what version of Cocoapods are you using locally?
     
  8. Qhuhuit

    Qhuhuit

    Joined:
    Feb 17, 2018
    Posts:
    39
    Thanks for your reply, I Don't build iOS locally because I don't have access to a Mac, that's why I rely on Cloud Build.
    I have iOS Resolver v1.2.168 with "Add cocoapods to the Xcode project" as part of EDM4U.

    Last successful cloud build was builded with Unity 2021.1.20f1 & Xcode 12.4
    Thing that changed since is I've upgraded Unity version to 2021.2.x and been unable to build so I rolled back to 2020 LTS and 2021.1.28f1, either are building on Android fine but not on iOS cloud build.

    Several plugins I use could also be responsible for messing things up (Odin, EasyMobilePro, GameAnalytics...) Kinda hard to find with this log.. Even it says "It's hard to tell what's causing the error" xD
     
  9. ValeryNikulina

    ValeryNikulina

    Unity Technologies

    Joined:
    Oct 26, 2020
    Posts:
    138
    Hi,

    Right, that doesn't sound good :)

    Could you please submit a support ticket for further investigation? I'll be able to grab a ticket and have a look.

    Also, please keep in mind that Cloud Build is not meant to be a replacement for a Mac and we always ask to test it locally to see if you run into any issues. But let's see the log first and see what's going on :)