New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Closed
iouared opened this issue
Apr 1, 2021
· 8 comments
Comments
Describe the bug
Hello, i’m new to AR Foundation and i just tried to build samples of SimpleAR. I tried this with two different computer but the issue is the same: when i build to my android tablet, the building is stuck at «Building native binary with IL2CPP». I search a long time for different solutions like change computer, on change the PATH, i tried to rename folder to have ASCII character but i’m still stuck at this stage.
Thank you in advance for your help (and sorry for my bad english, i’m french)
Editor.log
Editor.log
Smartphone (please complete the following information):
- Device: Samsung Galaxy Tab A7
- OS: Android Nougat
- Unity 2020.3.2f1
- ARFoundation version 4.0
iouared
added
the
bug
A bug in an ARFoundation-related package
label
Apr 1, 2021
Are you able to build a vanilla Android project for Arm 32 and 64 with the IL2CPP backend enabled? That is, without any AR Foundation related packages?
Hello tdmowrer, thanks for your answer. Yes i already build android project without any AR Foundation related packages, this afternoon for exemple with a simple app.
I tried building main
of this repo for Android using Unity 2020.3.2f1 on both Mac and Windows without issue. Your Editor log doesn’t reveal anything; have you tried to build on more than one machine?
I have two computer, one laptop and one desktop both on Windows 10. I tried two build with the two of them. I already reinstall unity several times. Each build i wait like 30/40 minutes, unity froze. On the task manager i can see that the proc and the RAM are well use and unity editor status is «no answer» and still stuck on «Building native binary with IL2CPP». When I build a new project with the AR template that unity 2020.3.2f1 offer, it works perfectly and i don’t understand why; Maybe some packages related to ar foundation sample ?
Hello, I tried for the past days to resolve these and here is my conclusion :
I try to build the project with my friend’s computer (a gamer config) and it succeed. Actually my computer at home were too old to build this in short time and it takes several hours (I never wait so long and my proc and my ram were so low that it feel like a bug). To optimize the building time I desactivated the «Baked Global Illumination» option in Window -> Rendering -> Lighting.
I’m sorry for this newbie mistake. I hope it may help some people in the futur and sorry for my bad English.
Thanks again for your time.
tdmowrer
removed
the
bug
A bug in an ARFoundation-related package
label
Apr 8, 2021
That is a very long time to bake lighting, but I’m glad that you figured it out
I just found this same issue collaborating with another developer using 2020.3.12f1 and AR Foundation 4.1.7. The project was working fine, then some very minor changes were made in the background color of the UI and an extra image was added to a panel. On the other developer’s windows machine (building for Android), build times went from 2min to hours. It hangs in»Building native binary with IL2CPP» if «Build and Run» is clicked. If just build is clicked, the build gets past that but then hangs in «stripping assemblies». I loaded a git repo of the project to a newer mac pro and it compiles in 2-3min but is slow on the steps where it hangs on the windows machine. It is a very simple SLAM app that just displays a couple of 2D artworks in AR and has 2 scripts.
Search Issue Tracker
How to reproduce:
1. Open attached project
2. In the menu choose Platform > Android — Google Play
3. Change directory to Keystore (so you can successfully compile the project for Android)
4. Build the project
Actual result: Editor freezes on «Building native binary with IL2CPP». Unable to cancel the build, the only way to do that is to terminate the whole Editor.
Expected results: Unity editor should build the project and not get stuck while building.
Reproduced with: 2017.2.2p3, 2017.3.2f1, 2017.4.1f1; 2018.1.0f1; 2018.2.0b2
Note: similar to case 1004743
Today I’ve encounterd a problem that broke the building process of my Unity project. The console shows Exception: Unity.IL2CPP.Building.BuilderFailedException. There are some solutions that may solve the problem.
Exception: Unity.IL2CPP.Building.BuilderFailedException: Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\Admin\AppData\Local\Temp\tmpE289.tmp" -o "Library\il2cpp_android_arm64-v8a\il2cpp_cache\linkresult_DAF7E0933C9498037BADEA28E59AEDC7\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id -stdlib=libc++ -static-libstdc++ -target aarch64-linux-android21 -Wl,--wrap,sigaction "Data\PlaybackEngines\AndroidPlayer\Variations\il2cpp\Development\StaticLibs\arm64-v8a\baselib.a" -llog -rdynamic -fuse-ld=bfd.exe
Data\il2cpp\libil2cpp\vm/Thread.cpp:500:(.text._ZN6il2cpp2vm6Thread8RegisterEP12Il2CppThread+0x144): additional relocation overflows omitted from the output
The first solution is to disable the Script Debugging option in Build Settings. I’ve tried this solution and it really solved the problem. Script Debugging will significantly increase the code size and will lead to problems for the native linker in Android NDK. If you want script debugging, you can set Scripting Backend to Mono.
If IL2CPP must be enabled in your project, you can try the following solutions which I have not tested, hope they can help.
One soulution is to set C++ Compiler Configuration mode to Debug.
Another soulution is to set IL2CPP Code Generation mode to Faster (smaller) builds.
Post Views: 616
Go to Unity3D
r/Unity3D
r/Unity3D
A subreddit for News, Help, Resources, and Conversation regarding Unity, a game engine first released on June 8, 2005. Later discontinued on September 12, 2023.
Members
Online
•
by
JournalistIll7275
Build stuck at building native binary with il2cpp
Noob Question
So, I’m trying to build an html5 version for my game and it is stuck. I think I have desktop development with C++ installed with visual studio, and I can’t find a solution
I compared the preference settings of different projects and reduced my app to half its size to diagnose the issue. It became clear that the existing android app, into which Unity was being exported, was the cause of the problem. To resolve the issue, I had to uncheck «Export Project» and «Custom _» options in Build Settings and Publishing Settings respectively. Moreover, I had to rewrite my custom android implementation to identify the problem. Although the issue was not specifically identified, the build failed multiple times and requested new permissions for new scripts until it eventually succeeded.
Unity Editor — stuck at building native binary with IL2CPP
Solution 1:
I am uncertain of the method used, but it resolved the problem I was facing.
- Windows Key + R
- Type in «regedit»
If it is stuck, performing this action may cause it to begin functioning once more.
Solution 2:
If you’re utilizing Visual Studio for Unity and need a solution, simply install the «Desktop development with C++» module through the Visual Studio Installer.
Unity WebGL stuck at 90% load Itchi.io etc, Hey guys, I had some issues with the base setup of
unity
/playmaker and the
WebGL
version. Perhaps it helps you guys!Discord:https://discord.gg/gZTT8FQCheers,
Unity WebGL stuck at 90% load Itchi.io etc
Hey guys, I had some issues with the base setup of
unity
/playmaker and the
WebGL
version. Perhaps it helps you guys!Discord:https://discord.gg/gZTT8FQCheers,
Unity throwing IL2CPP build error at run time when building for Android? 2018.4.5f1
Solution:
The problem encountered by some users was due to Catalina’s security features that blocked certain scripts from running. To resolve this, I reinstalled r16 NDK and then ensured that whenever I faced errors like «[script name] blocked from running» after clicking BUILD in unity, I clicked the «Allow Anyway…» button in Security & Privacy before choosing either «Cancel» or «Open» on the error modals.
The build may encounter multiple failures, but each time it will prompt for new permissions for additional scripts. After going through all the required scripts, the build will eventually be successful.
Unity throwing IL2CPP build error at run time when, I’m trying to build a project for deployment to the play store, but getting the dreaded IL2CPP errors at build-time. Below are the errors, both relate to the same file il2cppcore.dll.Any help is appreciated. Unity version 2018.
Cannot Build with IL2CPP
Solution 1:
Success! I attempted Unity’s updated version, 2019.1.11f1, and it functioned accordingly.
I hope that someday this will be useful to someone.
Solution 2:
Ensure that you choose the ndk installation option from the drop-down menu under the Android section. Failure to do so will result in encountering the same error caused by using the outdated 16b version of ndk. Additionally, upgrading to the latest version manually in preferences will not be possible. I personally faced this issue and was only able to successfully compile and eliminate errors after two days of troubleshooting. Ultimately, the problem was resolved.
Unity stuck on building native with IL2CPP Code, Windows Key + R Type in «regedit» Do this while it is stuck and it should start working again. xxxxxxxxxx. 1. If webGL build gets stuck here 2. 3. Windows Key + R. 4. Type in «regedit».
Exception: IL2CPP.exe did not run properly! Unity 3D build issue
Solution 1:
The issue lies in the name of the Unity Assets folder, which is called «VacuumShaders» and appears in your project. Once I removed these Assets, my IL2CPP Project build was successful.
Solution 2:
I wanted to mention that I encountered this error due to a mistake in the build settings where the architecture was set to x86 instead of x86_64.
Solution 3:
After dedicating several days to the issue, I eventually found a straightforward solution. However, I took the time to document my entire process with the intention of assisting other developers in saving their valuable time.
- Needed to acquire the 64-bit variant of sqlite for utilization in this project.
- Needed to obtain a 64bit variant of Newtonsoft.Json for handling web-based JSON data.
- To fix the SetLastWin32Error bug while building android64 with il2cpp, it was necessary to upgrade Unity to a version higher than 2021.2.11. As of now, the latest version available is 2021.2.15f1.
Still getting build errors so I
- Successfully exported a newly created project to Android64.
- Examined the differences in Android configurations across various projects.
- Examined the package configurations across different projects.
- Analyzed the preference settings across various projects.
- I divided my app into halves and stripped it down to its bare minimum.
In the end, it was clear that the problem resided in my current android application, which was the platform for exporting Unity.
- The build errors related to il2cpp were resolved only when the «Custom _» options were unchecked in the Publishing Settings > Build and the Export Project option was unchecked in the Build Settings > Android while directly building to APK.
- To identify the culprits, I had to start over and rewrite my custom Android implementation.
Although I couldn’t identify the exact issue, I believe it was related to the unity base in my previous custom application. My suggestion would be to begin anew by creating a fresh 64 build from Android and then gradually transferring your custom application.
Unity Editor — stuck at building native binary with IL2CPP, Not sure how, but this solved the issue for me: Windows Key + R. Type in «regedit». Do this while it is stuck and it should start working again. Share. Improve this answer. edited May 4 at 20:00. answered May 3 …