Skip to content

[LLVM] interoperability with std:vector: LLVMFunction _Znwm cannot be found #6491

Answered by rschatz
bademux asked this question in Q&A
Discussion options

You must be logged in to vote

This is using the wrong C++ standard library. It's compiling for libstdc++, you need to compile for libc++ instead. Also, this does not link against the C++ library, so Sulong is not going to load it.

Try compiling your bitcode with the LLVM toolchain wrappers provided by Sulong, instead of vanilla clang. You can get the path to them with lli --print-toolchain-path. Also, don't use -emit-llvm. The toolchain wrappers will produce standard ELF files with embedded bitcode. That way, the dependency to the C++ library is visible to Sulong.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@bademux
Comment options

@rschatz
Comment options

Answer selected by bademux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants