Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Question I'm able to build both Production and Development, but not script debugging on

Discussion in '2021.2 Beta' started by jGate99, Oct 23, 2021.

  1. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    Hi there,

    I'm able to build both Prod and Development build for Android but not when i check Script Debugging + Wait for Managed Debugger.

    Please advise


    Code (CSharp):
    1. Building Library\Bee\artifacts\Android\d8kzr\libil2cpp.so failed with output:
    2. Library/Bee/artifacts/Android/87lik/20dd_6_vm3.lump.o: In function `il2cpp::os::ThreadLocalValueImpl::GetValue(void**)':
    3. D:/Program Files\Unity Editors\2021.2.0b16\Editor\Data\il2cpp\libil2cpp\os\Posix/ThreadLocalValueImpl.h:51:(.text._ZN6il2cpp2vm6Domain10ContextSetEP16Il2CppAppContext+0x18): relocation truncated to fit: R_AARCH64_CALL26 against symbol `pthread_getspecific@@LIBC' defined in .text section in D:/Program Files/Unity Editors/2021.2.0b16/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/21/libc.so
    4. D:/Program Files\Unity Editors\2021.2.0b16\Editor\Data\il2cpp\libil2cpp\os\Posix/ThreadLocalValueImpl.h:51:(.text._ZN6il2cpp2vm6Thread7CurrentEv+0xc): relocation truncated to fit: R_AARCH64_JUMP26 against symbol `pthread_getspecific@@LIBC' defined in .text section in D:/Program Files/Unity Editors/2021.2.0b16/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/21/libc.so
    5. D:/Program Files\Unity Editors\2021.2.0b16\Editor\Data\il2cpp\libil2cpp\os\Posix/ThreadLocalValueImpl.h:51:(.text._ZN6il2cpp2vm6Domain10ContextGetEv+0x10): relocation truncated to fit: R_AARCH64_CALL26 against symbol `pthread_getspecific@@LIBC' defined in .text section in D:/Program Files/Unity Editors/2021.2.0b16/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/21/libc.so
    6. Library/Bee/artifacts/Android/87lik/20dd_6_vm3.lump.o: In function `il2cpp::vm::GlobalMetadata::GetTypeInfoFromTypeDefinitionIndex(int)':
    7. D:/Program Files\Unity Editors\2021.2.0b16\Editor\Data\il2cpp\libil2cpp\vm/GlobalMetadata.cpp:660:(.text._ZN6il2cpp2vm14GlobalMetadata34GetTypeInfoFromTypeDefinitionIndexEi+0x40c): relocation truncated to fit: R_AARCH64_CALL26 against symbol `_Unwind_Resume' defined in .text section in D:/Program Files/Unity Editors/2021.2.0b16/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x\libgcc_real.a(unwind-dw2.o)
    8. Library/Bee/artifacts/Android/87lik/20dd_6_vm3.lump.o: In function `~FastAutoLock':
    9. D:/Program Files\Unity Editors\2021.2.0b16\Editor\Data\il2cpp\libil2cpp\utils\..\os/Mutex.h:86:(.text._ZN6il2cpp2os12FastAutoLockD2Ev[_ZN6il2cpp2os12FastAutoLockD2Ev]+0x50): relocation truncated to fit: R_AARCH64_CALL26 against symbol `__clang_call_terminate' defined in .text.__clang_call_terminate[__clang_call_terminate] section in Library/Bee/artifacts/Android/d8kzr/yooz_-firstpass.o
    10. Library/Bee/artifacts/Android/87lik/20dd_6_vm3.lump.o: In function `il2cpp::vm::GlobalMetadata::GetCustomAttributeTypeToken(Il2CppImage const*, unsigned int)':
    11. D:/Program Files\Unity Editors\2021.2.0b16\Editor\Data\il2cpp\libil2cpp\vm/GlobalMetadata.cpp:928:(.text._ZN6il2cpp2vm14GlobalMetadata27GetCustomAttributeTypeTokenEPK11Il2CppImagej+0x44): relocation truncated to fit: R_AARCH64_CALL26 against symbol `bsearch@@LIBC' defined in .text section in D:/Program Files/Unity Editors/2021.2.0b16/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/21/libc.so
    12. Library/Bee/artifacts/Android/87lik/20dd_6_vm3.lump.o: In function `il2cpp::vm::GlobalMetadata::GetCustomAttributeDataRange(Il2CppImage const*, unsigned int)':
    13. D:/Program Files\Unity Editors\2021.2.0b16\Editor\Data\il2cpp\libil2cpp\vm/GlobalMetadata.cpp:941:(.text._ZN6il2cpp2vm14GlobalMetadata27GetCustomAttributeDataRangeEPK11Il2CppImagej+0x48): relocation truncated to fit: R_AARCH64_CALL26 against symbol `bsearch@@LIBC' defined in .text section in D:/Program Files/Unity Editors/2021.2.0b16/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/21/libc.so
    14. Library/Bee/artifacts/Android/87lik/20dd_6_vm3.lump.o: In function `il2cpp::vm::GlobalMetadata::GetCustomAttributeTypeToken(Il2CppImage const*, unsigned int)':
    15. D:/Program Files\Unity Editors\2021.2.0b16\Editor\Data\il2cpp\libil2cpp\vm/GlobalMetadata.cpp:928:(.text._ZN6il2cpp2vm14GlobalMetadata29GenerateCustomAttributesCacheEPK11Il2CppImagej+0x4c): relocation truncated to fit: R_AARCH64_CALL26 against symbol `bsearch@@LIBC' defined in .text section in D:/Program Files/Unity Editors/2021.2.0b16/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/21/libc.so
    16. Library/Bee/artifacts/Android/87lik/20dd_6_vm3.lump.o: In function `il2cpp::utils::CallOnce(il2cpp::utils::OnceFlag&, void (*)(void*), void*)':
    17. D:/Program Files\Unity Editors\2021.2.0b16\Editor\Data\il2cpp\libil2cpp\utils/CallOnce.h:44:(.text._ZL37GenerateCustomAttributesCacheInternalPK25Il2CppImageGlobalMetadatai+0x310): relocation truncated to fit: R_AARCH64_CALL26 against symbol `_Unwind_Resume' defined in .text section in D:/Program Files/Unity Editors/2021.2.0b16/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x\libgcc_real.a(unwind-dw2.o)
    18. Library/Bee/artifacts/Android/87lik/20dd_6_vm3.lump.o: In function `il2cpp::vm::GlobalMetadata::GetCustomAttributeTypeToken(Il2CppImage const*, unsigned int)':
    19. D:/Program Files\Unity Editors\2021.2.0b16\Editor\Data\il2cpp\libil2cpp\vm/GlobalMetadata.cpp:928:(.text._ZN6il2cpp2vm14GlobalMetadata12HasAttributeEPK11Il2CppImagejP11Il2CppClass+0x54): relocation truncated to fit: R_AARCH64_CALL26 against symbol `bsearch@@LIBC' defined in .text section in D:/Program Files/Unity Editors/2021.2.0b16/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/21/libc.so
    20. Library/Bee/artifacts/Android/87lik/20dd_6_vm3.lump.o: In function `std::__ndk1::__libcpp_allocate(unsigned long, unsigned long)':
    21. D:/Program Files\Unity Editors\2021.2.0b16\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\..\sysroot\usr\include\c++\v1/new:253:(.text._ZN6il2cpp2vm14GlobalMetadata20GetAllManagedMethodsERNSt6__ndk16vectorI19MethodDefinitionKeyNS2_9allocatorIS4_EEEE+0x160): additional relocation overflows omitted from the output
    22. clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    23. UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
    24. A
    25.  
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    This error usually means that the executable code in the project is too large. There is a bug in the Android NDK linker that causes this issue.

    You can work around this by changing the IL2CPP Code Generation option in the Build Settings window to a value of "Faster (smaller) builds". This will decrease the executable code size, and often can allow a script debugging enabled build to succeed when it fails like this.
     
    Altaireon, mrwellmann and jGate99 like this.
  3. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    Faster smaller builds actually start throwing AOT issues as im using Zenject + JsonDotNet a lot
    I tried using linker but that didnt solve the problem
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Can you let me know which AOT issues you see? This mode should actually do a better job of avoiding AOT issues, because it generates shared versions of all generic types.
     
    jGate99 likes this.
  5. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    A simple call like this was crashing the app on android while using faster builds
    var jData = JsonConvert.DeserializeObject<JToken>(json)["data"];
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Do you have a call stack or crash dump available when this crash happens?
     
    jGate99 likes this.
  7. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    I could get a player log right before it happens, for windows IL2CPP with script debugging on
    and this is where it crashes, i spent almost a day chasing this issue

    Let me provide it tomorrow
     
    JoshPeterson likes this.
  8. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    Here it is
     

    Attached Files:

  9. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Thanks! Can you submit a project that causes this along with a bug report? This looks like something we should investigate and correct.

    https://unity3d.com/unity/qa/bug-reporting
     
  10. renegadegd

    renegadegd

    Joined:
    Mar 23, 2014
    Posts:
    10
    Hi, I've just tried upgrading to unity 2021.2 from 2020.3.11 and I am noticing the same issue as the original post. Has there been any progress on this? Building for release or development is fine but building for development with allow debugging and wait for player connection throws me the following error...

    Code (CSharp):
    1. Building Library/Bee/artifacts/Android/d8kzr/libil2cpp.so failed with output:
    2. Library/Bee/artifacts/Android/87lik/1kkz_e_vm5.lump.o: In function `il2cpp::vm::Field::SetValueRaw(Il2CppType const*, void*, void*, bool)':
    I've attached a full build log if it's of any help diagnosing.

    It seems when allow debugging is selected the build takes significantly longer and uses up a lot more resources on my mac (Everything else grinds to a halt) before failing. Switching IL2CPP Code Generation to Faster (smaller) builds produces the same results.
     

    Attached Files:

  11. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Thanks for the information. We have not made any progress on this issue. Actually there seem to be two issues here.

    First, the linker error during a build when script debugging is enabled. This is a known issue with the Android NDK tools when the executable code size is too large. When script debugging is enabled, IL2CPP has to inject extra code into the generated code stream to support script debugging, so the code size can grow too large and trigger this problem in the Android NDK linker.

    Since switching IL2CPP Code Generation to Faster (smaller) builds does not correct the issue for your case, I don't have a good solution. We are working on an update to the Android NDK where the llvm linker will be used. I don't believe that linker has this same problem. Until that is ready though, your best option is to try to make the executable code in the project smaller, if at all possible.

    Second, there was an error at run time which occurred, but I don't believe that we received a bug report about that issue.
     
  12. kalineh

    kalineh

    Joined:
    Dec 23, 2015
    Posts:
    241
    We are also encountering this issue, the error changes with different settings but script debugging is a no go. Any timelines on a fix would be good, once the project expands a bit if we hit this on our final build scripts it will be quite troublesome.

    A sample of our build failures:

    Code (JavaScript):
    1. Building Library\Bee\artifacts\Android\19qtv\libil2cpp.so failed with output:
    2. C:/Program Files/Unity/Hub/Editor/2021.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(locale.o): In function `std::__ndk1::istreambuf_iterator<char, std::__ndk1::char_traits<char> > std::__ndk1::num_get<char, std::__ndk1::istreambuf_iterator<char, std::__ndk1::char_traits<char> > >::__do_get_floating_point<long double>(std::__ndk1::istreambuf_iterator<char, std::__ndk1::char_traits<char> >, std::__ndk1::istreambuf_iterator<char, std::__ndk1::char_traits<char> >, std::__ndk1::ios_base&, unsigned int&, long double&) const':
    3. /buildbot/src/android/ndk-release-r21/external/libcxx/include/locale:1015:(.text._ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE23__do_get_floating_pointIeEES4_S4_S4_RNS_8ios_baseERjRT_[_ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE23__do_get_floating_pointIeEES4_S4_S4_RNS_8ios_baseERjRT_]+0x54): relocation truncated to fit: R_AARCH64_CALL26 against symbol `std::__ndk1::__num_get<char>::__stage2_float_prep(std::__ndk1::ios_base&, char*, char&, char&)' defined in .text._ZNSt6__ndk19__num_getIcE19__stage2_float_prepERNS_8ios_baseEPcRcS5_[_ZNSt6__ndk19__num_getIcE19__stage2_float_prepERNS_8ios_baseEPcRcS5_] section in C:/Program Files/Unity/Hub/Editor/2021.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(locale.o)
    4. C:/Program Files/Unity/Hub/Editor/2021.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(locale.o): In function `std::__ndk1::_DeallocateCaller::__do_call(void*)':
    5. /buildbot/src/android/ndk-release-r21/external/libcxx/include/new:334:(.text._ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE23__do_get_floating_pointIeEES4_S4_S4_RNS_8ios_baseERjRT_[_ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE23__do_get_floating_pointIeEES4_S4_S4_RNS_8ios_baseERjRT_]+0x2d0): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)' defined in .text._ZdlPv section in C:/Program Files/Unity/Hub/Editor/2021.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o)
    6. /buildbot/src/android/ndk-release-r21/external/libcxx/include/new:334:(.text._ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE23__do_get_floating_pointIeEES4_S4_S4_RNS_8ios_baseERjRT_[_ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE23__do_get_floating_pointIeEES4_S4_S4_RNS_8ios_baseERjRT_]+0x2e0): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)' defined in .text._ZdlPv section in C:/Program Files/Unity/Hub/Editor/2021.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o)
    7. /buildbot/src/android/ndk-release-r21/external/libcxx/include/new:334:(.text._ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE23__do_get_floating_pointIeEES4_S4_S4_RNS_8ios_baseERjRT_[_ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE23__do_get_floating_pointIeEES4_S4_S4_RNS_8ios_baseERjRT_]+0x370): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)' defined in .text._ZdlPv section in C:/Program Files/Unity/Hub/Editor/2021.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o)
    8. /buildbot/src/android/ndk-release-r21/external/libcxx/include/new:334:(.text._ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE23__do_get_floating_pointIeEES4_S4_S4_RNS_8ios_baseERjRT_[_ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE23__do_get_floating_pointIeEES4_S4_S4_RNS_8ios_baseERjRT_]+0x380): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)' defined in .text._ZdlPv section in C:/Program Files/Unity/Hub/Editor/2021.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o)
    9. C:/Program Files/Unity/Hub/Editor/2021.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(locale.o): In function `void std::__ndk1::call_once<std::__ndk1::(anonymous namespace)::__fake_bind>(std::__ndk1::once_flag&, std::__ndk1::(anonymous namespace)::__fake_bind&&)':
    10. /buildbot/src/android/ndk-release-r21/external/libcxx/include/mutex:675:(.text._ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv[_ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv]+0xa4): relocation truncated to fit: R_AARCH64_CALL26 against symbol `std::__ndk1::__call_once(unsigned long volatile&, void*, void (*)(void*))' defined in .text._ZNSt6__ndk111__call_onceERVmPvPFvS2_E section in C:/Program Files/Unity/Hub/Editor/2021.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(mutex.o)
    11. C:/Program Files/Unity/Hub/Editor/2021.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(locale.o): In function `std::__ndk1::num_get<char, std::__ndk1::istreambuf_iterator<char, std::__ndk1::char_traits<char> > >::do_get(std::__ndk1::istreambuf_iterator<char, std::__ndk1::char_traits<char> >, std::__ndk1::istreambuf_iterator<char, std::__ndk1::char_traits<char> >, std::__ndk1::ios_base&, unsigned int&, void*&) const':
    12. /buildbot/src/android/ndk-release-r21/external/libcxx/include/locale:1094:(.text._ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv[_ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv]+0x2dc): relocation truncated to fit: R_AARCH64_CALL26 against symbol `std::__ndk1::__libcpp_sscanf_l(char const*, __locale_t*, char const*, ...)' defined in .text._ZNSt6__ndk117__libcpp_sscanf_lEPKcP10__locale_tS1_z[_ZNSt6__ndk117__libcpp_sscanf_lEPKcP10__locale_tS1_z] section in C:/Program Files/Unity/Hub/Editor/2021.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(locale.o)
    13. C:/Program Files/Unity/Hub/Editor/2021.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(locale.o): In function `std::__ndk1::_DeallocateCaller::__do_call(void*)':
    14. /buildbot/src/android/ndk-release-r21/external/libcxx/include/new:334:(.text._ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv[_ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv]+0x344): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)' defined in .text._ZdlPv section in C:/Program Files/Unity/Hub/Editor/2021.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o)
    15. /buildbot/src/android/ndk-release-r21/external/libcxx/include/new:334:(.text._ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv[_ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv]+0x354): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)' defined in .text._ZdlPv section in C:/Program Files/Unity/Hub/Editor/2021.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o)
    16. C:/Program Files/Unity/Hub/Editor/2021.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(locale.o): In function `std::__ndk1::__cloc()':
    17. /buildbot/src/android/ndk-release-r21/external/libcxx/src/locale.cpp:75:(.text._ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv[_ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv]+0x3d0): relocation truncated to fit: R_AARCH64_CALL26 against symbol `newlocale@@LIBC' defined in .text section in C:/Program Files/Unity/Hub/Editor/2021.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/21/libc.so
    18. C:/Program Files/Unity/Hub/Editor/2021.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(locale.o): In function `std::__ndk1::_DeallocateCaller::__do_call(void*)':
    19. /buildbot/src/android/ndk-release-r21/external/libcxx/include/new:334:(.text._ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv[_ZNKSt6__ndk17num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEE6do_getES4_S4_RNS_8ios_baseERjRPv]+0x454): additional relocation overflows omitted from the output
    20. clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    21. UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
    22. BuildAssetBundlesAutomatically:BuildPlayerHandler (UnityEditor.BuildPlayerOptions) (at Assets/00_Everything/ResourcesStatic/Scripts/AssetBundleSystem/BuildAssetBundlesAutomatically.cs:76)
    23. UnityEditor.GenericMenu:CatchMenu (object,string[],int)
    24.  
     
  13. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Right now we're targeting Unity 2022.2 for use of an updated NDK version and use of the lld linker, which should avoid these linker bugs.
     
    kalineh likes this.
  14. JeromeGodboutAmotus

    JeromeGodboutAmotus

    Joined:
    Apr 24, 2020
    Posts:
    40
    I'm using 2021.2.5f1 version and I got a similar error when the "script debugging" is checked (unchecking it solve the problem, cleaning all cache and build dir did not help):
    Code (CSharp):
    1. Building Library/Bee/artifacts/Android/d8kzr/libil2cpp.so failed with output:
    2. Library/Bee/artifacts/Android/87lik/2ad5_osix3.lump.o: In function `il2cpp::os::MarshalAlloc::Allocate(unsigned long)':
    3. /Applications/Unity/Hub/Editor/2021.2.5f1/Unity.app/Contents/il2cpp/libil2cpp/os/Posix/MarshalAlloc.cpp:14:(.text._ZN6il2cpp2os12MarshalAlloc8AllocateEm+0x0): relocation truncated to fit: R_AARCH64_JUMP26 against symbol `malloc@@LIBC' defined in .text section in /Applications/Unity/Hub/Editor/2021.2.5f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/21/libc.so
    4. Library/Bee/artifacts/Android/87lik/2ad5_osix3.lump.o: In function `il2cpp::os::MarshalAlloc::Free(void*)':
    5. /Applications/Unity/Hub/Editor/2021.2.5f1/Unity.app/Contents/il2cpp/libil2cpp/os/Posix/MarshalAlloc.cpp:24:(.text._ZN6il2cpp2os12MarshalAlloc4FreeEPv+0x0): relocation truncated to fit: R_AARCH64_JUMP26 against symbol `free@@LIBC' defined in .text section in /Applications/Unity/Hub/Editor/2021.2.5f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/21/libc.so
    6. Library/Bee/artifacts/Android/87lik/2ad5_osix3.lump.o: In function `il2cpp::os::MarshalAlloc::AllocateHGlobal(unsigned long)':
    7. /Applications/Unity/Hub/Editor/2021.2.5f1/Unity.app/Contents/il2cpp/libil2cpp/os/Posix/MarshalAlloc.cpp:29:(.text._ZN6il2cpp2os12MarshalAlloc15AllocateHGlobalEm+0x0): relocation truncated to fit: R_AARCH64_JUMP26 against symbol `malloc@@LIBC' defined in .text section in /Applications/Unity/Hub/Editor/2021.2.5f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/21/libc.so
    8. Library/Bee/artifacts/Android/87lik/2ad5_osix3.lump.o: In function `il2cpp::os::MarshalAlloc::FreeHGlobal(void*)':
    9. /Applications/Unity/Hub/Editor/2021.2.5f1/Unity.app/Contents/il2cpp/libil2cpp/os/Posix/MarshalAlloc.cpp:39:(.text._ZN6il2cpp2os12MarshalAlloc11FreeHGlobalEPv+0x0): relocation truncated to fit: R_AARCH64_JUMP26 against symbol `free@@LIBC' defined in .text section in /Applications/Unity/Hub/Editor/2021.2.5f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/21/libc.so
    10. Library/Bee/artifacts/Android/87lik/2ad5_osix3.lump.o: In function `il2cpp::os::Memory::AlignedAlloc(unsigned long, unsigned long)':
    11. /Applications/Unity/Hub/Editor/2021.2.5f1/Unity.app/Contents/il2cpp/libil2cpp/os/Posix/Memory.cpp:18:(.text._ZN6il2cpp2os6Memory12AlignedAllocEmm+0xc): relocation truncated to fit: R_AARCH64_JUMP26 against symbol `memalign@@LIBC' defined in .text section in /Applications/Unity/Hub/Editor/2021.2.5f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/21/libc.so
    12. Library/Bee/artifacts/Android/87lik/2ad5_osix3.lump.o: In function `il2cpp::os::Memory::AlignedReAlloc(void*, unsigned long, unsigned long)':
    13. /Applications/Unity/Hub/Editor/2021.2.5f1/Unity.app/Contents/il2cpp/libil2cpp/os/Posix/Memory.cpp:28:(.text._ZN6il2cpp2os6Memory14AlignedReAllocEPvmm+0x10): relocation truncated to fit: R_AARCH64_CALL26 against symbol `realloc@@LIBC' defined in .text section in /Applications/Unity/Hub/Editor/2021.2.5f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/21/libc.so
    14. Library/Bee/artifacts/Android/87lik/2ad5_osix3.lump.o: In function `il2cpp::os::Memory::AlignedAlloc(unsigned long, unsigned long)':
    15. /Applications/Unity/Hub/Editor/2021.2.5f1/Unity.app/Contents/il2cpp/libil2cpp/os/Posix/Memory.cpp:18:(.text._ZN6il2cpp2os6Memory14AlignedReAllocEPvmm+0x2c): relocation truncated to fit: R_AARCH64_CALL26 against symbol `memalign@@LIBC' defined in .text section in /Applications/Unity/Hub/Editor/2021.2.5f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/21/libc.so
    16. Library/Bee/artifacts/Android/87lik/2ad5_osix3.lump.o: In function `il2cpp::os::Memory::AlignedReAlloc(void*, unsigned long, unsigned long)':
    17. /Applications/Unity/Hub/Editor/2021.2.5f1/Unity.app/Contents/il2cpp/libil2cpp/os/Posix/Memory.cpp:36:(.text._ZN6il2cpp2os6Memory14AlignedReAllocEPvmm+0x3c): relocation truncated to fit: R_AARCH64_CALL26 against symbol `memcpy@@LIBC' defined in .text section in /Applications/Unity/Hub/Editor/2021.2.5f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/21/libc.so
    18. /Applications/Unity/Hub/Editor/2021.2.5f1/Unity.app/Contents/il2cpp/libil2cpp/os/Posix/Memory.cpp:37:(.text._ZN6il2cpp2os6Memory14AlignedReAllocEPvmm+0x44): relocation truncated to fit: R_AARCH64_CALL26 against symbol `free@@LIBC' defined in .text section in /Applications/Unity/Hub/Editor/2021.2.5f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/21/libc.so
    19. Library/Bee/artifacts/Android/87lik/2ad5_osix3.lump.o: In function `il2cpp::os::Memory::AlignedFree(void*)':
    20. /Applications/Unity/Hub/Editor/2021.2.5f1/Unity.app/Contents/il2cpp/libil2cpp/os/Posix/Memory.cpp:43:(.text._ZN6il2cpp2os6Memory11AlignedFreeEPv+0x0): relocation truncated to fit: R_AARCH64_JUMP26 against symbol `free@@LIBC' defined in .text section in /Applications/Unity/Hub/Editor/2021.2.5f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/21/libc.so
    21. Library/Bee/artifacts/Android/87lik/2ad5_osix3.lump.o: In function `PosixAutoLock':
    22. /Applications/Unity/Hub/Editor/2021.2.5f1/Unity.app/Contents/il2cpp/libil2cpp/os/Posix/PosixHelpers.h:44:(.text._ZN6il2cpp2os9MutexImpl6UnlockEv+0x24): additional relocation overflows omitted from the output
    23. clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    24. UnityEditor.EditorApplication:Internal_CallGlobalEventHandler () (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorApplication.cs:462)
    25.  
    I also have an issue with a shader when the "script debugging" option is checked:
    Code (CSharp):
    1. Shader error in 'Hidden/Universal/CoreBlit': invalid subscript 'positionCS' at /Users/godboutj/Code/gf-asbuiltdrawingapp/Library/PackageCache/com.unity.render-pipelines.core@12.1.2/Runtime/Utilities/Blit.hlsl(92) (on gles)
    2.  
    3. Compiling Vertex program
    4. Platform defines: SHADER_API_MOBILE UNITY_COLORSPACE_GAMMA UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_NO_CUBEMAP_ARRAY UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_RGBM UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3
    5. Disabled keywords: BLIT_SINGLE_SLICE DISABLE_TEXTURE2D_X_ARRAY SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING
    6.  
    7. Shader error in 'Hidden/kMotion/CameraMotionVectors': SV_VertexID semantic is not supported on GLES 2.0 at line 11 (on gles)
    8.  
    9. Compiling Vertex program
    10. Platform defines: SHADER_API_MOBILE UNITY_COLORSPACE_GAMMA UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_NO_CUBEMAP_ARRAY UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_RGBM UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3
    11. Disabled keywords: SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING
    12.  
    13.  
     
    itscozitime likes this.
  15. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    The shader error is not one I've seen before, so I can't offer any help there, unfortunately.

    The other error is the common one we see with projects on Android that get too large (in executable code size) when script debugging is enabled. Unity is planning an NDK update that will eliminate this issue, but I'm not sure yet which version of Unity will have it.
     
  16. JeromeGodboutAmotus

    JeromeGodboutAmotus

    Joined:
    Apr 24, 2020
    Posts:
    40
    That's sad that the 2021.1.x was generating smaller images then! cause If I take the same solution to the 2021.1.x I can debug it no problems where 2021.2.x choke on it! is the unity framework just getting just and we are so unlucky that we do cross a gap barely? If so we will soon have the problems into 2021.1.x build too, which will put our developer to an alt to debug under Android.

    I begin to regret all that Unity development, it's painful, bad player with CI, awful package manager and git integration, cloudy future with .Net version, now the debugger that doesn't work on some platform with a not so very large application at all.. Damn, I guess it's time to give 8thwall, Vuforia or Wikitude or something like it a shot to see if we can ditch Unity and stop the wasted time bleed.
     
    gsoros likes this.
  17. aromana

    aromana

    Joined:
    Nov 11, 2018
    Posts:
    137
    Any update on this? I cannot enable script debugging on my 2D mobile game for android, which is quite limiting to my workflow. I’m using Unity 2021.2.
     
  18. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    We have changes on the way to Unity 2022.2 that will use a newer version of the Android NDK and switch to use the lld linker, which seems to handle these large executables much better. But I don't have an ETA for those to be available yet.
     
    jGate99 likes this.
  19. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    atleast is is being solved, and that is good news :)
     
  20. aromana

    aromana

    Joined:
    Nov 11, 2018
    Posts:
    137
    Thanks for the quick reply. Any chance those changes would be backported to 2021?
     
  21. jonc113

    jonc113

    Joined:
    Mar 10, 2013
    Posts:
    22
    FYI, switching IL2CPP Code Generation to Faster solved the problem for me
     
    dtaddis and JoshPeterson like this.
  22. zaniocz

    zaniocz

    Joined:
    May 9, 2011
    Posts:
    24
    Which version of Unity 2021 are you using?
    From Unity 2021.1.0f1 the Android NDK was updated to r21d:
    - Android: Updated Android NDK to r21d.
     
  23. marcin-huuuge

    marcin-huuuge

    Joined:
    Sep 5, 2018
    Posts:
    15
    I have the same issue after switching from 2019 to 2021.3.0f1
    Neither of Faster options do the trick. I can build fine with Script debugging disabled.

    Code (JavaScript):
    1. Building Library/Bee/artifacts/Android/19qtv/libil2cpp.so failed with output:
    2. /Applications/Unity/Hub/Editor/2021.3.0f1/PlaybackEngines/AndroidPlayer/Variations/il2cpp/Development/StaticLibs/arm64-v8a/baselib.a(External_il2cpp_builds_external_baselib_Source_0_7joqh.o): In function `il2cpp_baselib::detail_AssertLog(char const*, ...)':
    3. /Users/bokken/buildslave/unity/build/./External/il2cpp/builds/external/baselib/Source/Assert.cpp:22:(.text._ZN14il2cpp_baselib16detail_AssertLogEPKcz+0x80): relocation truncated to fit: R_AARCH64_CALL26 against symbol `vfprintf@@LIBC' defined in .text section in /Applications/Unity/Hub/Editor/2021.3.0f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/22/libc.so
    4. /Applications/Unity/Hub/Editor/2021.3.0f1/PlaybackEngines/AndroidPlayer/Variations/il2cpp/Development/StaticLibs/arm64-v8a/baselib.a(External_il2cpp_builds_external_baselib_Source_0_7joqh.o): In function `il2cpp_baselib::detail::ExtraInformation::Write(char const*, std::__va_list)':
    5. /Users/bokken/buildslave/unity/build/./External/il2cpp/builds/external/baselib/Source/Baselib_ErrorState_Utils.cpp:21:(.text._ZN14il2cpp_baselib49Baselib_ErrorState_FormatAndStoreExtraInformationEPKcSt9__va_list+0xc8): relocation truncated to fit: R_AARCH64_CALL26 against symbol `vsnprintf@@LIBC' defined in .text section in /Applications/Unity/Hub/Editor/2021.3.0f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/22/libc.so
    6. /Applications/Unity/Hub/Editor/2021.3.0f1/PlaybackEngines/AndroidPlayer/Variations/il2cpp/Development/StaticLibs/arm64-v8a/baselib.a(External_il2cpp_builds_external_baselib_Source_0_7joqh.o): In function `il2cpp_baselib::detail::ExtraInformation::Get()':
    7. /Users/bokken/buildslave/unity/build/./External/il2cpp/builds/external/baselib/Source/Baselib_ErrorState_Utils.cpp:40:(.text._ZN14il2cpp_baselib49Baselib_ErrorState_FormatAndStoreExtraInformationEPKcSt9__va_list+0x110): relocation truncated to fit: R_AARCH64_CALL26 against symbol `__cxa_guard_acquire' defined in .text.__cxa_guard_acquire section in /Applications/Unity/Hub/Editor/2021.3.0f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/libc++abi.a(cxa_guard.o)
    8. /Applications/Unity/Hub/Editor/2021.3.0f1/PlaybackEngines/AndroidPlayer/Variations/il2cpp/Development/StaticLibs/arm64-v8a/baselib.a(External_il2cpp_builds_external_baselib_Source_0_7joqh.o): In function `il2cpp_baselib::omemstream::formatString(char const*, ...)':
    9. /Users/bokken/buildslave/unity/build/./External/il2cpp/builds/external/baselib/Source/omemstream.h:43:(.text._ZN14il2cpp_baselib10omemstream12formatStringEPKcz[_ZN14il2cpp_baselib10omemstream12formatStringEPKcz]+0x88): relocation truncated to fit: R_AARCH64_CALL26 against symbol `vsnprintf@@LIBC' defined in .text section in /Applications/Unity/Hub/Editor/2021.3.0f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/22/libc.so
    10. /Applications/Unity/Hub/Editor/2021.3.0f1/PlaybackEngines/AndroidPlayer/Variations/il2cpp/Development/StaticLibs/arm64-v8a/baselib.a(External_il2cpp_builds_external_baselib_Source_0_7joqh.o): In function `il2cpp_baselib::detail::ExtraInformation::Get()':
    11. /Users/bokken/buildslave/unity/build/./External/il2cpp/builds/external/baselib/Source/Baselib_ErrorState_Utils.cpp:40:(.text._ZN14il2cpp_baselib43Baselib_ErrorState_Explain_BaselibErrorCodeEPKNS_18Baselib_ErrorStateERNS_10omemstreamENS_35Baselib_ErrorState_ExplainVerbosityE+0x178): relocation truncated to fit: R_AARCH64_CALL26 against symbol `__cxa_guard_acquire' defined in .text.__cxa_guard_acquire section in /Applications/Unity/Hub/Editor/2021.3.0f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/libc++abi.a(cxa_guard.o)
    12. /Users/bokken/buildslave/unity/build/./External/il2cpp/builds/external/baselib/Source/Baselib_ErrorState_Utils.cpp:40:(.text._ZN14il2cpp_baselib43Baselib_ErrorState_Explain_BaselibErrorCodeEPKNS_18Baselib_ErrorStateERNS_10omemstreamENS_35Baselib_ErrorState_ExplainVerbosityE+0x1ac): relocation truncated to fit: R_AARCH64_CALL26 against symbol `__cxa_guard_release' defined in .text.__cxa_guard_release section in /Applications/Unity/Hub/Editor/2021.3.0f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/libc++abi.a(cxa_guard.o)
    13. /Applications/Unity/Hub/Editor/2021.3.0f1/PlaybackEngines/AndroidPlayer/Variations/il2cpp/Development/StaticLibs/arm64-v8a/baselib.a(External_il2cpp_builds_external_baselib_Platforms_Android_Source_0_7joqh.o): In function `omemstream':
    14. /Users/bokken/buildslave/unity/build/External/il2cpp/builds/external/baselib/Source/omemstream.h:16:(.text._ZN14il2cpp_baselib26Baselib_ErrorState_ExplainEPKNS_18Baselib_ErrorStateEPcjNS_35Baselib_ErrorState_ExplainVerbosityE+0x3c): relocation truncated to fit: R_AARCH64_CALL26 against symbol `memset@@LIBC' defined in .text section in /Applications/Unity/Hub/Editor/2021.3.0f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/22/libc.so
    15. /Applications/Unity/Hub/Editor/2021.3.0f1/PlaybackEngines/AndroidPlayer/Variations/il2cpp/Development/StaticLibs/arm64-v8a/baselib.a(External_il2cpp_builds_external_baselib_Platforms_Android_Source_0_7joqh.o): In function `C99Api::Baselib_Process_Abort(il2cpp_baselib::Baselib_ErrorCode)':
    16. /Users/bokken/buildslave/unity/build/External/il2cpp/builds/external/baselib/Source/C99/Baselib_Process_C99Api.inl.h:12:(.text._ZN6C99ApiL21Baselib_Process_AbortEN14il2cpp_baselib17Baselib_ErrorCodeE+0x4): relocation truncated to fit: R_AARCH64_CALL26 against symbol `abort@@LIBC' defined in .text section in /Applications/Unity/Hub/Editor/2021.3.0f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/22/libc.so
    17. /Applications/Unity/Hub/Editor/2021.3.0f1/PlaybackEngines/AndroidPlayer/Variations/il2cpp/Development/StaticLibs/arm64-v8a/baselib.a(External_il2cpp_builds_external_baselib_Platforms_Android_Source_0_7joqh.o): In function `PosixApi::Baselib_Thread_GetCurrentThreadId()':
    18. /Users/bokken/buildslave/unity/build/External/il2cpp/builds/external/baselib/Source/Posix/Baselib_Thread_PosixApi.inl.h:149:(.text._ZN14il2cpp_baselib33Baselib_Thread_GetCurrentThreadIdEv+0x0): relocation truncated to fit: R_AARCH64_JUMP26 against symbol `pthread_self@@LIBC' defined in .text section in /Applications/Unity/Hub/Editor/2021.3.0f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/22/libc.so
    19. /Applications/Unity/Hub/Editor/2021.3.0f1/PlaybackEngines/AndroidPlayer/Variations/il2cpp/Development/StaticLibs/arm64-v8a/baselib.a(External_il2cpp_builds_external_baselib_Platforms_Android_Source_0_7joqh.o): In function `PosixApi::Baselib_DynamicLibrary_OpenUtf8(char const*, il2cpp_baselib::Baselib_ErrorState*)':
    20. /Users/bokken/buildslave/unity/build/External/il2cpp/builds/external/baselib/Source/Posix/Baselib_DynamicLibrary_PosixApi.inl.h:33:(.text._ZN14il2cpp_baselib31Baselib_DynamicLibrary_OpenUtf8EPKcPNS_18Baselib_ErrorStateE+0x58): relocation truncated to fit: R_AARCH64_CALL26 against symbol `dlerror@@LIBC' defined in .text section in /Applications/Unity/Hub/Editor/2021.3.0f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/22/libdl.so
    21. /Users/bokken/buildslave/unity/build/External/il2cpp/builds/external/baselib/Source/Posix/Baselib_DynamicLibrary_PosixApi.inl.h:33:(.text._ZN14il2cpp_baselib40Baselib_DynamicLibrary_OpenProgramHandleEPNS_18Baselib_ErrorStateE+0x38): additional relocation overflows omitted from the output
    22. clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    23. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
    24.  
    This is not a solution. Unity 2021 is now in LTS and this bug is basically a blocker. Therefore it should also be fixed in 2021. Or you can drop this New-Year-New-Unity schema and focus on continuously developing a stable and well maintained Unity Engine like it used to be many years ago. What's the point of adding ton of new features if the core of your product is so broken that I'm not able to build a game to use those features?
     
    Last edited: Apr 21, 2022
  24. SauronDark

    SauronDark

    Joined:
    Mar 2, 2017
    Posts:
    16
    for me, it's solved by not using the "build and run" option, just use the "build" button and deploy apk manually (tested on android)
     
  25. vkapoor

    vkapoor

    Joined:
    Jan 1, 2022
    Posts:
    24
    But that didn't work for me. How is that even possible given the error is at link stage? If linker fails then the build stage is certain to fail.
     
  26. VolodymyrBS

    VolodymyrBS

    Joined:
    May 15, 2019
    Posts:
    150
    I use Unity 2021.3.3. I have faced the same problem with build with debugging support. I have tried to enable fast build but it ends up in compilation error:
    Code (csharp):
    1. Path/To/Project/Library/Bee/artifacts/Android/il2cppOutput/cpp/GenericMethods4.cpp(18020,10): error: cannot initialize return object of type 'Il2CppFullySharedGenericAny *' (aka 'void **') with an lvalue of type 'void *'
    2.                  return (L_2);
    Code that creates this problem is
    Code (CSharp):
    1.  
    2. // T& System.Runtime.CompilerServices.Unsafe::Unbox<Unity.IL2CPP.Metadata.__Il2CppFullySharedGenericType>(System.Object)
    3. IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR Il2CppFullySharedGenericAny* Unsafe_Unbox_TisIl2CppFullySharedGenericAny_m8E9A659194122C3CF91C69AC9DB96C38B0C89227_gshared (RuntimeObject* ___box0, const RuntimeMethod* method)
    4. {
    5.     il2cpp_rgctx_method_init(method);
    6.     // T
    7.     // sizeof(T)
    8.     const uint32_t SizeOf_T_t36936A148A04A18AAA19DB4A7AE9F6F8A40F7FD6 = il2cpp_codegen_sizeof(il2cpp_rgctx_data(method->rgctx_data, 0));
    9.     const Il2CppFullySharedGenericAny L_1 = alloca(SizeOf_T_t36936A148A04A18AAA19DB4A7AE9F6F8A40F7FD6);
    10.     DECLARE_METHOD_EXEC_CTX(methodExecutionContext, method, NULL, NULL, NULL);
    11.     CHECK_PAUSE_POINT;
    12.     {
    13.         RuntimeObject* L_0 = ___box0;
    14.         void* L_2 = UnBox_Any(L_0, il2cpp_rgctx_data(method->rgctx_data, 0), L_1);
    15.         return (L_2); // this line
    16.     }
    17. }
    18.  
    My project is using System.CompilerServices.Unsafe v5.0.0. it works with no problem with faster runtime and on older Unity versions
     
  27. VolodymyrBS

    VolodymyrBS

    Joined:
    May 15, 2019
    Posts:
    150
    @JoshPeterson
    I have reported a bug about this codegen. id IN-5128 on Unity Bug Reporting Portal. It also happened on Unity 2022.1 with any codegen option
     
  28. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Thanks, we will investigate this issue.
     
    VolodymyrBS likes this.
  29. dennis1123

    dennis1123

    Joined:
    Jul 1, 2020
    Posts:
    3
    I still have this problem in the 2021.3.4f1c1 version, I use script packaging.

    Building Library\Bee\artifacts\Android\d8kzr\libil2cpp.so failed with output:
    Library/Bee/artifacts/Android/87lik/12rr_r_os0.lump.o: In function `std::__ndk1::_DeallocateCaller::__do_call(void*)':
    D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/include/c++/v1/new:334:(.text._ZN6il2cpp2os12CrashHelpers5CrashEv+0x8c): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)' defined in .text._ZdlPv section in D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o)
    D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/include/c++/v1/new:334:(.text._ZN6il2cpp2os12CrashHelpers5CrashEv+0xa4): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)' defined in .text._ZdlPv section in D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o)
    D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/include/c++/v1/new:334:(.text._ZN6il2cpp2os12CrashHelpers5CrashEv+0xc4): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)' defined in .text._ZdlPv section in D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o)
    Library/Bee/artifacts/Android/87lik/12rr_r_os0.lump.o: In function `il2cpp::eek:s::CrashHelpers::Crash()':
    D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/include/c++/v1/new:(.text._ZN6il2cpp2os12CrashHelpers5CrashEv+0xcc): relocation truncated to fit: R_AARCH64_CALL26 against symbol `_Unwind_Resume' defined in .text section in D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x\libgcc_real.a(unwind-dw2.o)
    Library/Bee/artifacts/Android/87lik/12rr_r_os0.lump.o: In function `std::__ndk1::char_traits<char>::length(char const*)':
    D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/include/c++/v1/__string:217:(.text._ZNSt6__ndk1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_[_ZNSt6__ndk1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_]+0x28): relocation truncated to fit: R_AARCH64_CALL26 against symbol `strlen@@LIBC' defined in .text section in D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/22/libc.so
    Library/Bee/artifacts/Android/87lik/12rr_r_os0.lump.o: In function `std::__ndk1::char_traits<char>::copy(char*, char const*, unsigned long)':
    D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/include/c++/v1/__string:225:(.text._ZNSt6__ndk1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_[_ZNSt6__ndk1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_]+0x74): relocation truncated to fit: R_AARCH64_CALL26 against symbol `memcpy@@LIBC' defined in .text section in D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/22/libc.so
    Library/Bee/artifacts/Android/87lik/12rr_r_os0.lump.o: In function `std::__ndk1::__libcpp_allocate(unsigned long, unsigned long)':
    D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/include/c++/v1/new:253:(.text._ZNSt6__ndk1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_[_ZNSt6__ndk1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_]+0xb8): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator new(unsigned long)' defined in .text._Znwm section in D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o)
    Library/Bee/artifacts/Android/87lik/12rr_r_os0.lump.o: In function `std::__ndk1::_DeallocateCaller::__do_call(void*)':
    D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/include/c++/v1/new:334:(.text._ZNSt6__ndk1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_[_ZNSt6__ndk1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_]+0xec): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)' defined in .text._ZdlPv section in D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o)
    Library/Bee/artifacts/Android/87lik/12rr_r_os0.lump.o: In function `std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > std::__ndk1::eek:perator+<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >(char const*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&)':
    D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/include/c++/v1/new:(.text._ZNSt6__ndk1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_[_ZNSt6__ndk1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_]+0xf4): relocation truncated to fit: R_AARCH64_CALL26 against symbol `_Unwind_Resume' defined in .text section in D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x\libgcc_real.a(unwind-dw2.o)
    Library/Bee/artifacts/Android/87lik/12rr_r_os0.lump.o: In function `~ThreadLocalValueImpl':
    D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/il2cpp/libil2cpp\os/Posix/ThreadLocalValueImpl.h:29:(.text._ZN6il2cpp2os16ThreadLocalValueD2Ev[_ZN6il2cpp2os16ThreadLocalValueD2Ev]+0x10): relocation truncated to fit: R_AARCH64_CALL26 against symbol `pthread_key_delete@@LIBC' defined in .text section in D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/22/libc.so
    Library/Bee/artifacts/Android/87lik/12rr_r_os0.lump.o: In function `~ThreadLocalValue':
    D:/Program Files/Unity/Hub/Editor/2021.3.4f1c1/Editor/Data/il2cpp/libil2cpp\os/ThreadLocalValue.h:34:(.text._ZN6il2cpp2os16ThreadLocalValueD2Ev[_ZN6il2cpp2os16ThreadLocalValueD2Ev]+0x1c): additional relocation overflows omitted from the output
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    UnityEditor.BuildPipeline:BuildPlayer (UnityEditor.BuildPlayerOptions)
    ET.Packager:InternalBuildPkg (UnityEditor.BuildTargetGroup) (at Assets/Editor/BuildEditor/Packager.cs:384)
    ET.Packager:BuildAndroid () (at Assets/Editor/BuildEditor/Packager.cs:141)
     
  30. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    I think you will need to try Unity 2022.2, which uses a newer Android NDK that corrects this problem.
     
    mrwellmann and sebastiao_lucio like this.
  31. sebastiao_lucio

    sebastiao_lucio

    Joined:
    Mar 14, 2018
    Posts:
    17
    solved by deleting the Library folder and restarting the project again! in my case the problem arose when I activated the development Build option and then Script Debugging. Good luck to the new adventurers!
     
  32. reigota

    reigota

    Joined:
    Mar 23, 2010
    Posts:
    86
    @JoshPeterson
    This is still a beta version, I cant use that in production builds. I am using UCB, is there any other work around?
    upload_2022-9-7_13-4-48.png
     
  33. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    I don't have a good work around, unfortunately. Your best option is to try to lower the executable code size, so that this issue does not happen. In Unity 2021, you can try to change the "IL2CPP Code Generation" option in the Build Settings to be "Faster (smaller) builds".
     
  34. avictor_unity

    avictor_unity

    Joined:
    Sep 29, 2022
    Posts:
    1
    I'm having this issue already. I am just building a 3D URP template and including Oculus Integration package and created a bouncing sphere on a plane. That itself is already making this package too big?

    I change the IL2CPP Code Generation option to Faster (smaller) builds, and the build worked. I'm just not confident with Unity 2021.3.11f1 LTS any more. If I encounter this issue again, I might end up having to untick Script Debugging, which is very unfavorable.
     
  35. Fadjboy08

    Fadjboy08

    Joined:
    Jun 4, 2020
    Posts:
    5
    I've read through this thread carefully and seems as though there's basically no solution?
    I recently updated from Unity 2019 to 2021 only because I needed the Play Billing Library 4.

    Before I updated I could build apk's and production aab's with no problems. Now that I've updated I can't build at all. This is a major block for my project as we are in live production on both stores and I need to upload a new build. Desperate for a workaround here. Changing to IL2CPP Code Generation Faster (smaller) builds did not work in my case. Any updates on a fix timeframe?
     
  36. Fadjboy08

    Fadjboy08

    Joined:
    Jun 4, 2020
    Posts:
    5
    Through more googling and thread surfing I have found a solution that worked for me and allowed me to build apk's for testing and aab's for upload. This solution was provided by @JoshPeterson on a separate thread to this which deals with the same issue linked here https://forum.unity.com/threads/android-builds-failing-when-script-debugging-is-enabled.1027357/.

    The solution that worked for me was to increase the Managed Code Stripping https://docs.unity3d.com/Manual/ManagedCodeStripping.html. This reduces the executable code size and allows your project to complete it's build successfully. I increased mine to medium and it worked. Hope this helps!
     
  37. jpumpkinn

    jpumpkinn

    Joined:
    Feb 23, 2020
    Posts:
    1
    Fadjboy08 likes this.
  38. djhatvr

    djhatvr

    Joined:
    Sep 22, 2019
    Posts:
    53
    Thanks @Fadjboy08! Worked for me at 'medium'!
     
    Fadjboy08 likes this.
  39. aymankoo

    aymankoo

    Joined:
    May 13, 2020
    Posts:
    7
    For the only thing worked is adding a key store.
     
  40. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    501
    just changing to faster (smaller) builds worked here.
     
  41. wechat_os_Qy08tyqNsQ0R9MFKnf-Kipprg

    wechat_os_Qy08tyqNsQ0R9MFKnf-Kipprg

    Joined:
    Nov 1, 2021
    Posts:
    1
    This approach works for me, thanks for sharing
     
    hyondang2 likes this.
  42. daviddf1

    daviddf1

    Joined:
    Jan 19, 2018
    Posts:
    4
    solved by turning off script debugging
     
  43. mrstruijk

    mrstruijk

    Joined:
    Jan 24, 2018
    Posts:
    52
    For me it was solved by moving to "Faster (smaller) builds" and deselecting Script Debugging. Alternatively, it worked just fine in the non-Development Build.
     
  44. blessed_miracle

    blessed_miracle

    Joined:
    Apr 12, 2022
    Posts:
    2
    Just to mention here. I had the same issue on 2021.3.15f1, it build without debugging, but not with it. So, upgrading my project to 2021.3.26f1 solved that problem on my side.
     
  45. zaibi786

    zaibi786

    Joined:
    May 11, 2017
    Posts:
    4
    I tried following:
    - Deselected script debugging
    - Faster (smaller) builds
    - Deleting Library

    Nothing worked.
     
  46. Fadjboy08

    Fadjboy08

    Joined:
    Jun 4, 2020
    Posts:
    5
    Hi @zaibi786

    Have you tired increasing the Managed Code Stripping as mention in one of my comments above? It worked for a few people including myself. Good luck.

    https://docs.unity3d.com/Manual/ManagedCodeStripping.html.
     
  47. Tyke18

    Tyke18

    Joined:
    Oct 6, 2023
    Posts:
    17
    I'm late to this thread, I have this issue, to those saying turning off script debugging solves the issue, well it doesn't if you actually want to use script debugging which i do and think OP did! it's like saying i've solved my car breaking down by not using it lol!
     
    iddqd likes this.
  48. djhatvr

    djhatvr

    Joined:
    Sep 22, 2019
    Posts:
    53
    Ah ha ha!
     
  49. White_Wabbit

    White_Wabbit

    Joined:
    Aug 16, 2019
    Posts:
    11
    On my end, I changed the "Managed Stripping Level" from minimal to low