Skip to content
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

Link error #2786

Closed
stefanhusmann opened this issue Sep 12, 2014 · 7 comments
Closed

Link error #2786

stefanhusmann opened this issue Sep 12, 2014 · 7 comments
Labels

Comments

@stefanhusmann
Copy link

Under Arch Linux I get a link error

../../lib/libLLVMSupport.a(Allocator.cpp.o): In function llvm::BumpPtrAllocator::Allocate(unsigned long, unsigned long)': /home/haawda/paketierung/maintained_by_me/emscripten-git/src/emscripten-fastcomp/lib/Support/Allocator.cpp:(.text+0x286): undefined reference to__msan_allocated_memory'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
utils/TableGen/CMakeFiles/llvm-tblgen.dir/build.make:887: recipe for target 'bin/llvm-tblgen' failed

Unrelated to this error, I think there is a typo in emscripten-fastcomp/lib/Bitcode/NaCl/Writer/CMakeLists.txt

sed -i 's+intinsics_gen+intrinsics_gen+'
$srcdir/emscripten-fastcomp/lib/Bitcode/NaCl/Writer/CMakeLists.txt

@kripken
Copy link
Member

kripken commented Sep 12, 2014

Can you build llvm and clang (non-emscripten) on that machine? I don't think emscripten modifies anything related to that error, nor that possible typo.

@stefanhusmann
Copy link
Author

It was a little difficult, but yes, LLVM and Clang were buildable. Also were former versions of emscripten, e.g. 1.22.1.330.g1c49a75.

@kripken
Copy link
Member

kripken commented Sep 14, 2014

Since a previous version built ok, bisection would be useful here, to see which changeset made it stop building for your system.

@stefanhusmann
Copy link
Author

I should have mentioned, that I used clang for building. If I explitely set cc to gcc, emscripten builds fine.

@adembo
Copy link

adembo commented Dec 16, 2014

I don't know anything about emscripten, but I ran into this same issue while working on a different project. The problem was that I was building LLVM 3.4 sources with clang 3.5. This doesn't work.

Why? Because llvm/include/Support/Compiler.h will include msan_interface.h unconditionally, and msan_interface.h from clang 3.5 (on my local machine) also defines its symbols unconditionally (without a __has_feature(memory_sanitizer) check that would ensure that -fsanitize=memory is set on the link line). The net result is that references to msan leak into the build even though -fsanitize=memory was never set, and those references are not satisfied by clang during linking.

@CoolOppo
Copy link

I have the same issue when building with Clang version 3.5.1-1~exp1~gd~u on Ubuntu 14.10. I will have to try using GCC I guess, although it would be nice to be able to build this without it.

@stale
Copy link

stale bot commented Aug 31, 2019

This issue has been automatically marked as stale because there has been no activity in the past 2 years. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.

@stale stale bot added the wontfix label Aug 31, 2019
@stale stale bot closed this as completed Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants