Search Unity

Bug Build failed after Unity update

Discussion in 'Editor & General Support' started by magsoftware, Oct 21, 2022.

  1. magsoftware

    magsoftware

    Joined:
    Feb 7, 2019
    Posts:
    123
    Hello, I've updated my project to Unity 2022.1.19f1. I cannot build my game anymore.. I receive these errors:

    Code (CSharp):
    1. Building Library\Bee\artifacts\Android\fy9m9\libil2cpp.so failed with output:
    2. C:/Users/magst/AppData/Local/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin\ld.gold.exe: internal error in arm_branch_common, at /buildbot/src/android/binutils/toolchain/binutils/binutils-2.27/gold/arm.cc:4063
    3. clang++: error: linker command failed with exit code 1 (use -v to see invocation)

    If I change C++ COMPILER SETTINGS from MASTER to RELEASE in Player Settings I can build my game but there is a huge delay between scenes. The game starts after 1 minute, changing scenes takes over 30-40 seconds and other issues.


    How to fix it?
    Thanks.
     
    Last edited: Oct 29, 2022
  2. krishna_vincellstudios

    krishna_vincellstudios

    Joined:
    Oct 19, 2020
    Posts:
    6
    Same issue with Unity 2021.3.11f1 LTS. Did you find any solution?
    Thanks.
     
  3. magsoftware

    magsoftware

    Joined:
    Feb 7, 2019
    Posts:
    123
    No, I did not find any solution..
    If I change in Build Settings -> Player Settings -> Other Settings -> C++ Compiler Configuration from MASTER to RELEASE, Unity builds my game but I have a big delay between scenes.
     
  4. krishna_vincellstudios

    krishna_vincellstudios

    Joined:
    Oct 19, 2020
    Posts:
    6
    So we can't release the game with this work around.
     
  5. magsoftware

    magsoftware

    Joined:
    Feb 7, 2019
    Posts:
    123
    You can try it.. maybe it works for you..
    Did you manage to build it with C++ compiler configuration set to RELEASE?
     
    Last edited: Oct 29, 2022
  6. krishna_vincellstudios

    krishna_vincellstudios

    Joined:
    Oct 19, 2020
    Posts:
    6
    Hi,
    I can make build after changing C++ compiler configuration to RELEASE. It looks like build fails because of a bug in android r21 NDK. Unity 2022.2 and later, where Unity uses the r23 NDK and the lld linker. This bug is not present in that version.
     
  7. magsoftware

    magsoftware

    Joined:
    Feb 7, 2019
    Posts:
    123
    I still cannot build my project with Unity v2022.2. Glad to hear that you solved it. I will try to fix my project too. Cheers!