-
Notifications
You must be signed in to change notification settings - Fork 89
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
LLVM ERROR: inconsistency in registered CommandLine options #102
Comments
|
The $ bin/castxml --version
castxml version 0.1-g90d4abc
...
clang version 5.0.1-2 (tags/RELEASE_501/final)
...
$ ldd bin/castxml
linux-vdso.so.1 (0x00007ffe0de65000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f7f46863000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7f4665f000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f7f46435000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7f46217000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f7f45ffd000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7f45c7e000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7f4596b000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7f45754000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7f453b1000)
/lib64/ld-linux-x86-64.so.2 (0x00007f7f4aad0000)
$ bin/castxml --help
...works...I wonder how you ended up linking against a shared |
|
Thing is, this is not tied to the As regard to the linked LLVM library, I’m building CastXML on an Archlinux using the following PKGBUILD so it really boils down to the The only thing I added is a dependency on |
|
I've never tried linking to LLVM/Clang using anything but the static libraries. Maybe use of the single |
|
I will try to recompile my |
|
Ok, after trying to understand how to get LLVM static libraries on my system, I figured out they are already provided by the So I checked how CastXML was built by adding status messages in Which seems to list all required static libraries (and only the static ones). However, the linking process involves the following command: Which, for an unknown reason, also add However I have no clue as how to get rid of this library from the linker command. I tried to remove the lines relevant to this library from Any idea as what to try next? |
|
Just went the other way around and removed linking against the static llvm libs by removing a line in a CMakeList.txt. CastXML compiled and linked fine; and seems to be working (I produced an XML file from some testing code). Still not sure as to why (and when) the |
|
According to a post on the llvm-dev mailing list, the @Kniyl: When the LLVM/Clang 6 packages are released in Arch, you will need to replace |
|
I ran into the same error above when building tip with LLVM/clang 6.0.1 (release candidate 2). As @foutrelis (thank you so much for leaving that comment!) commented above, the fix is to modify src/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b1acad3..1064c41 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -67,7 +67,7 @@ add_executable(castxml
)
target_link_libraries(castxml
${clang_libs}
- ${llvm_libs}
+ LLVM
)
set_property(SOURCE Utils.cxx APPEND PROPERTY COMPILE_DEFINITIONS
"CASTXML_INSTALL_DATA_DIR=\"${CastXML_INSTALL_DATA_DIR}\"") |
This patch fixes "registered more than once" issue when importing tvm.so built with LLVM>=5.0 Original issue discussion: https://discuss.tvm.ai/t/llvm-error-option-registered-more-than-once-while-loading-libtvm-so/269/3 Reference: CastXML/CastXML#102 (comment)
|
I think this was fixed by #132. |
I just built castxml and tried to run it but:
CastXML was built using
When searching about this error, I found other tools whose support for recent LLVM version was not perfect, so including it as well:
The text was updated successfully, but these errors were encountered: