[llvm-dev] Question on symbol lookup error (VersionTuple) (original) (raw)
Lorenz Braun via llvm-dev llvm-dev at lists.llvm.org
Mon Feb 10 05:48:54 PST 2020
- Previous message: [llvm-dev] Question on symbol lookup error (VersionTuple)
- Next message: [llvm-dev] atomic ops are optimized with incorrect semantics .
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I was able to solve the problem by rebuilding llvm with the cmake flag BUILD_SHARED_LIBS=ON. I am not entirely sure why this works because i did not link against the LLVMSupport.so. For any readers that are trying to solve a similar problem, be aware that i am building my pass out-of-source.
Any additional comments on why excatly this works are very welcome ;)
Best Regards Lorenz
On 10.02.20 11:46, Lorenz Braun via llvm-dev wrote:
Hi,
i am currently working on an out-of-source pass to manipulate CUDA applications. Because since CUDA 9.2 the launch mechanism has changed, i check the CUDA SDK version from within my module pass. My pass fails when i use opt to run it on IR code:
symbol lookup error: /opt/cuda-flux/lib/libcudafluxpass.so:_ _undefined symbol: ZN4llvmlsERNS11rawostreamERKNS12VersionTupleE
This error does not happen when i register my pass with clang. When looking up the symbol tables with nm it shows me that the symbol is not found (which i expected from the error i got):_ _$ nm --dynamic /opt/cuda-flux/lib/libcudafluxpass.so | grep_ _ZN4llvmlsERNS11rawostreamERKNS12VersionTupleE_ _U ZN4llvmlsERNS11rawostreamERKNS12VersionTupleE_ _
When makingĀ the same lookup on the clang binary the symbol is found. However, it is not found when doing the lookup on the opt binary. Is this on purpose? If yes, what would be the best way to fix this? Linking the LLVMSupport lib does not really work because this will lead to command line option registered multiple times. Here some additional info to give some context info: - using llvm 10.0 tag from github - cmake config: cmake -DLLVMENABLEPROJECTS="clang;openmp" -DCMAKEINSTALLPREFIX=/opt/llvm-10.0 -DCMAKEBUILDTYPE=Release -DLLVMENABLEASSERTIONS=ON -DLLVMENABLEDOXYGEN=OFF -DLLVMBUILDDOCS=OFF -GNinja -DLLVMINSTALLBINUTILSSYMLINKS=ON ../llvm Best Regards Lorenz
LLVM Developers mailing list llvm-dev at lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
- Previous message: [llvm-dev] Question on symbol lookup error (VersionTuple)
- Next message: [llvm-dev] atomic ops are optimized with incorrect semantics .
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]