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
Building with LLVM and cling doesn't work #1473
Comments
Hum never seen this. Note that the only way to get cling with conda is
The conda-forge channel's cling is not functional. |
Yes, that's what I did.
|
According to root-project/cling#201, this error shouldn't happen if symengine links to llvm statically. |
Hmm, looks like libsymengine.so still exports LLVM symbols. If I use a linker version script to strip out the LLVM symbols, it works. (ref https://www.ibm.com/developerworks/aix/library/au-aix-symbol-visibility/index.html) |
Adding |
I see, this only happens if symengine is built with LLVM support. What is the root of the problem? That even if symengine links to LLVM statically, the symengine.so still exports LLVM symbols that then clash with the cling's llvm symbols? Is this a problem with LLVM, that it exports symbols? What are the possible solutions? One is to strip out the LLVM symbols from symengine.so (either by a linker script or by a compiler dependent linker flag). Is there another solution? Perhaps using shared LLVM and link to the same version from both cling and symengine? |
I think the issue is that LLVM dynamically looks at the symbols loaded in the current process to figure out which LLVM passes to register and since cling and symengine both have the two symbols corresponding to the same pass, that same pass is added twice which results in an LLVM error when the library is loaded.
I think you mentioned all of the options available. |
@SylvainCorlay you have the most experience with cling: what do you think we should do here? |
I don't know. cc-ing Vassil Vassilev who is a co-author of cling. @vgvassilev you may be interested in this! |
The error usually shows up when you have linked some of the llvm libraries twice: first in an executable and second in a shared library which gets PS: dlopen-ing libCling with RTLD_LOCAL may help. |
Cling kernel dies with
cc @SylvainCorlay
The text was updated successfully, but these errors were encountered: