Linux 2019.4.10f1 IL2CPP Build Error

I’m running into an issue building IL2CPP with Unity 2019.4.10f1 on Linux (Ubuntu 16.04 LTS). I get this output from the build log:

/home/builder/jenkins/repositories/.snowbreed.Linuxx64/Library/il2cpp_cache/libil2cpp/D9027D56079E3650F8F0CAEE7F2B3ECB.o: In function `il2cpp::os::Image::InitializeManagedSection()':
/home/builder/Unity/Hub/Editor/2019.4.10f1/Editor/Data/il2cpp/libil2cpp/os/Posix/Image.cpp:44: undefined reference to `__stop_il2cpp'
/home/builder/Unity/Hub/Editor/2019.4.10f1/Editor/Data/il2cpp/libil2cpp/os/Posix/Image.cpp:44: undefined reference to `__start_il2cpp'

I’ve tried running clang directly and I get the same output. This used to work with 2019.3.11f1, so I’m not sure what has changed between the 2 versions. I’m really not sure what to do here because this seems like an internal issue to the Unity version, but I could of course be wrong.

Any info regarding this would be a tremendous help!

Seems that it works fine in an empty project, so it’s either a setting that we have in our project that is now messing this up or the empty project simply doesn’t make use of code that requires the Image.cpp file to be used.

This is definitely an internal issue in the IL2CPP runtime code. However, I’m surprised that it does not happen with an empty project. I don’t think anything here is project-specific.

Can you submit a bug report and include the project that causes this issue?

Hmm very strange indeed. I’ll work on getting a bug report made and include the project (if possible).

1 Like

Alright, so I continued to do some testing because, unfortunately, we can’t send our project and I was able to reproduce the issue in an empty, brand new project. So I’ll create an issue for this.

1 Like

For anyone else coming across this thread, this is the issue that I was linked after reporting this bug: Unity Issue Tracker - Linux IL2CPP build fails when "clang" system package is not installed

Although related, I’m uncertain whether or not they are directly related. I suppose once the issue is fixed I will find out.