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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

I got this error when i build xcodeproj

Discussion in 'iOS and tvOS' started by sans108, Aug 1, 2022.

  1. sans108

    sans108

    Joined:
    Apr 1, 2021
    Posts:
    13
    Code (CSharp):
    1. [2022-07-28 18:05:44]:[TRIDENT-INFO][Worker]: [U3D-XcodeArchive]: Undefined symbols for architecture arm64:
    2.  
    3. [2022-07-28 18:05:44]:[TRIDENT-INFO][Worker]: [U3D-XcodeArchive]:   "_sqlite3_get_debug_flag", referenced from:
    4. [2022-07-28 18:05:44]:[TRIDENT-INFO][Worker]: [U3D-XcodeArchive]:       _SQLite3_GetDebugFlag_m77285226C1756607F44B5C60A8B058DB931D03F8 in Sqlite.o
    5. [2022-07-28 18:05:46]:[TRIDENT-INFO][Worker]: [U3D-XcodeArchive]:   "_sqlite3_get_offset", referenced from:
    6. [2022-07-28 18:05:46]:[TRIDENT-INFO][Worker]: [U3D-XcodeArchive]:       _SQLite3_GetOffset_m57E4D860BDA7638C5EC29494D5D549828239970C in Sqlite.o
    7. [2022-07-28 18:05:46]:[TRIDENT-INFO][Worker]: [U3D-XcodeArchive]:   "_sqlite3_set_offset", referenced from:
    8. [2022-07-28 18:05:46]:[TRIDENT-INFO][Worker]: [U3D-XcodeArchive]:       _SQLite3_SetOffset_m1DA8223EFDEB9BC75CE85C772C8DA26077F3A07A in Sqlite.o
    9.  
    10. [2022-07-28 18:05:46]:[TRIDENT-INFO][Worker]: [U3D-XcodeArchive]: ld: symbol(s) not found for architecture arm64

    Unity Version : 2021.3.3f1
    XCode Version : 13.2.1

    I know this error is because these function was undefined. But it built successed by using Unity2019.4.16f1. And they also not be used or referenced. I wondering there is an option to setting "do not build undefined function" in xcode.
     
  2. sans108

    sans108

    Joined:
    Apr 1, 2021
    Posts:
    13
    Ok, I found the answer myself

    The key issue was from here: "Project Settings - Player - Optimization - Strip Engine Code - Managed Stripping Level"

    upload_2022-8-5_15-10-7.png

    There are only 'low medium high' three options in Unity2019. But they add a 'minimal' option in Unity2021 !

    The lowest enum value is 0 represents 'low' in unity2019. But unity won't change it automatically in Unity2021, which is still 0, but represent 'minimal', and has a different mean.

    So I changed it to "low", and solved my problem.
     

    Attached Files:

  3. mike-voorhees

    mike-voorhees

    Unity Technologies

    Joined:
    Aug 9, 2016
    Posts:
    45
    Hi,

    Thanks for reporting this. Our goal was that projects created prior to 2021.3 retain their Managed Stripping Level values. I poked around and found a bug that is likely what you encountered.

    The Managed Stripping Level value is not stored in the project until it is changed from the default value. This means that a project that never changed from the default value will continue to have the managedStrippingLevel value serialized as empty. When the project is opened in 2021.3 or newer, the Editor sees an empty managedStrippingLevel and initializes with the default value, which starting with 2021.3 is now Minimal.

    We'll take care of getting this fixed.

    As you found out, the workaround is to change the value back to `Low`.

    Thanks,
    Mike
     
    sans108 likes this.