constexpr-everything icon indicating copy to clipboard operation
constexpr-everything copied to clipboard

Error when running

Open mraggi opened this issue 5 years ago • 13 comments

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.

mraggi avatar Jun 27 '19 12:06 mraggi

I was able to fix this problem by adding target_link_libraries(${PROJECT_NAME} LLVM) to the CMakeLists.txt.

mraggi avatar Jun 27 '19 12:06 mraggi

Same thing trying to run it with fedora 30. @mraggi your fix did not work for me.

SyedAmerGilani avatar Jun 28 '19 10:06 SyedAmerGilani

Also changing find_package(LLVM REQUIRED CONFIG) to find_package(LLVM REQUIRED CONFIG HINTS ${LLVM_LIBRARY_DIRS}) helped me

SyedAmerGilani avatar Jun 28 '19 10:06 SyedAmerGilani

Both fixes suggested above don't work for me.

sikmir avatar Jul 03 '19 09:07 sikmir

@mraggi which llvm version do you use?

ScorrMorr avatar Jul 17 '19 18:07 ScorrMorr

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)

pseyfert avatar Aug 09 '19 09:08 pseyfert

I believe this is stale. Let me know if it isn't, and I'll reopen.

woodruffw avatar Apr 02 '21 16:04 woodruffw

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

SyedAmerGilani avatar Apr 07 '21 13:04 SyedAmerGilani

Thanks for the report. Reopening, and I'll investigate a bit this afternoon.

woodruffw avatar Apr 07 '21 14:04 woodruffw

I built from source in a Google Colab and encountered the same error

Skylion007 avatar Jul 20 '21 15:07 Skylion007

@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.

Skylion007 avatar Jul 28 '21 15:07 Skylion007

It's failing with the same error message even when you run the binary constexpr-everything as part of GitHub actions:

cs3

https://github.com/mmd-osm/constexpr-everything/runs/6147801714?check_suite_focus=true

mmd-osm avatar Apr 24 '22 16:04 mmd-osm

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).

schenker avatar Jul 24 '22 13:07 schenker