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
2.0.9 build hits "unexpected relocation type" in llvm #12934
Comments
Its a shame that error doesn't tel use what the unexpected relocation type is. Even though this is technically and upstream bug we can deal with it here I think since its a wasm-ld issue and I'm the maintainer of that. Is there any chance you attach a zip file containing a repro code (i.e. all the input files and shell script to try to link them (preferable directly with On a side note are you sure you want to be using |
I stripped down the number of .a files included down to two, put everything in a single directory, and created test.sh to perform the step that was crashing.
Here is the zip file with the file including the core from the run shown above: Let me know if you need anything else to help here. Your comment on -shared is noted. |
Any luck in fixing/avoiding this? Any additional information needed or workaround that we can use? I'd like to upgrade our EMSDK version for other fixes but can't if we can't build. |
I'm also seeing this issue. When we build one of our third party libraries - https://www.cryptopp.com/release820.html
The issue starts at 2.0.9, but 2.0.8 is ok. This output is from trying a 2.0.10 build: |
Incidentally, I noticed this libpthread.so in the stack trace: 0x00007f56c20b5295 SignalHandler(int) (/local/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x86c295) I experimented with changing CXXFLAGS, removing USE_PTHREADS=1. The library now compiles without the crash. So something is amiss with linking pthreads. Our primary app uses threads extensively, so this is a big blocker that's keeping us from upgrading and using the new debug features. |
Fix is in https://reviews.llvm.org/D93554 |
I had hoped this would have been included in 2.0.12 (although I knew this issue was still open and not closed), but I pulled 2.0.12, did a build, and see the same error. https://emscripten.org/docs/introducing_emscripten/release_notes.html listed But, it doesn't look like https://reviews.llvm.org/D93554 has made it into EMSDK yet. Is there any target on when that will be picked up? Is there some way to patch 2.0.12 to pick up that fix? |
I'm afraid https://reviews.llvm.org/D93554 has not yet landed in LLVM |
This is now landed. The change will be in 2.0.13, or "tot" in a few hours. |
When running in `-r/--relocatable` we output relocations but the new TLS relocations type was missing from `ObjFile::calcNewAddend` causing this combination of inputs/flags to crash the linker. Also avoid creating tls variables in relocatable mode. These variables are only needed when linking final executables. Fixes: emscripten-core/emscripten#12934 Fixes: PR48506 Differential Revision: https://reviews.llvm.org/D93554
When running in `-r/--relocatable` we output relocations but the new TLS relocations type was missing from `ObjFile::calcNewAddend` causing this combination of inputs/flags to crash the linker. Also avoid creating tls variables in relocatable mode. These variables are only needed when linking final executables. Fixes: emscripten-core/emscripten#12934 Fixes: PR48506 Differential Revision: https://reviews.llvm.org/D93554
We are currently building and running cleanly on 2.0.3. I am testing out 2.0.9 to see if we can move up to that version. The first part of that is making sure we can build and right now we cannot:
I went through this exercise once before with 2.0.5 and we built cleanly but then had runtime errors, so we decided to stay on 2.0.3 and see what would happen with a later update.
Is this something that has changed and needs to be addressed in the emscripten code or do I need to truly file a bug report with https://bugs.llvm.org/ directly?
The text was updated successfully, but these errors were encountered: