constexpr-everything
constexpr-everything copied to clipboard
Error when running
Compiled following instructions from README.
When running I get the following error:
: CommandLine Error: Option 'help-list' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
I'm using manjaro linux. Tried compiling both with clang 8.0 and gcc 8.3.
I was able to fix this problem by adding target_link_libraries(${PROJECT_NAME} LLVM)
to the CMakeLists.txt
.
Same thing trying to run it with fedora 30. @mraggi your fix did not work for me.
Also changing find_package(LLVM REQUIRED CONFIG)
to find_package(LLVM REQUIRED CONFIG HINTS ${LLVM_LIBRARY_DIRS})
helped me
Both fixes suggested above don't work for me.
@mraggi which llvm version do you use?
same here with llvm version 8.0.1 (out of the box) and llvm 9.0.0 (after applying the compilation fixes from https://github.com/trailofbits/constexpr-everything/issues/2#issuecomment-514994122)
I believe this is stale. Let me know if it isn't, and I'll reopen.
The Error is still appearing for me. I just followed the build steps in the ci.yml in an clean ubuntu focal docker image to the point and i still get this runtime error. I tried with clang-9 and clang-10
Thanks for the report. Reopening, and I'll investigate a bit this afternoon.
I built from source in a Google Colab and encountered the same error
@woodruffw Here is a colab cell to replicate:
!wget https://apt.llvm.org/llvm.sh
!chmod +x llvm.sh
!sudo ./llvm.sh 9
!apt-get remove --purge llvm clang libclang-dev libclang1-6.0-dev libclang-common-6.0-dev
!apt autoremove
!sudo apt-get install libclang-9-dev
%cd /content/
!git clone https://github.com/trailofbits/constexpr-everything
%cd constexpr-everything
!rm -rf build
!mkdir build
%cd build
%env LLVM_DIR=/usr/lib/llvm-9/lib/cmake/llvm
%env Clang_DIR=/usr/lib/llvm-9/lib/cmake/clang
!cmake -DCMAKE_BUILD_TYPE=Debug ../.
!cmake --build .
!/content/constexpr-everything/build/constexpr-everything
Running it still generates the error. I tried to copy the CI settings as best I can, but could not figure out the error.
It's failing with the same error message even when you run the binary constexpr-everything
as part of GitHub actions:
https://github.com/mmd-osm/constexpr-everything/runs/6147801714?check_suite_focus=true
removing these lines:
target_link_libraries(
${PROJECT_NAME}
LLVMTransformUtils
LLVMAnalysis
LLVMTarget
LLVMOption # Support
LLVMObject # BitReader, Core, Support
LLVMBitReader # Core, Support
LLVMCore # Support
LLVMSupport)
from CMakeLists.txt
solved the "registered more than once" problem for me (llvm 10.0.0).