Can't build with IL2CPP in Unity 5.3.2f1

Part of editor.log that seems relevant:

@XT7

I’ve not seen this error before. Is there any other part of the Editor log file that might contain more information? It does not look like we can tell too much about the cause of the error from this information alone.

Not that I can see. I have another machine where the same project is working just fine, and the log looks exactly identical up to that point, including the arguments to the call to UnusedBytecodeStripper2.exe that fails (?)

What’s weird is that if I open a command prompt and call UnusedBytecodeStripper2 with those arguments manually, it works just fine. Furthermore, if I replace UnusedBytecodeStripper2 with a wrapper exe that just sleeps a bit before calling the original, the log still shows it aborts after 3 or 4 ms. This leads me to believe something in the IL2CPP build process is jumping the gun and for some reason trying to get the exit code before the process finishes executing?

If I can provide some other sort of information that may help, please let me know.

@XT7

That is odd. If the same project works on another machine, then I suspect something is wonky with the Unity installation on the machine that has the problem. Can you try installing again in a new directory?

Thanks for the suggestion. Installing Unity in a new directory did get past that step, but I got a different error immediately afterwards. I did confirm building for Mono still works fine in the new installation. The log is fairly long, so I have attached it here. Once again let me know if there is any further info I may provide.

2504112–173117–il2cpp_log.txt (47.8 KB)

@XT7

So now it seems that clang is failing to compile the generated C++ code. I’m not entirely sure why though. Are you able to build an empty project for Android/IL2CPP? If so, that would rule out something being wrong with the Android NDK installation.

Thanks for the help, I managed to fix it. The issue was this machine had 64-bit Android NDK installed. Between the default NDK path being identical and the obtuse error messages, I missed that all along. Replacing it with the 32-bit version fixed all the issues. Given that (at least at this point in time) IL2CPP doesn’t seem to support the 64
-bit NDK, perhaps it would be nice if Unity could detect the situation and give a warning of some sort.

@XT7 : we will actually move IL2CPP on Android to 64-bit NDK on Windows quite soon. This solves some issues on big projects. It will also improve the version detection. Thanks for the heads up!