[llvm-dev] LLVM source compilation Error: CommandLine Error: Option 'mc-relax-all' registered more than once!

K Jelesnianski via llvm-dev llvm-dev at lists.llvm.org
Sat Jul 11 16:28:26 PDT 2020


Dear All,

Recently, I wanted to reinstall a fresh copy of llvm for a new project
I am working on.
However I ran into the following issue when attempting to build a vanilla copy.

CommandLine Error: Option 'mc-relax-all' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
make[2]: *** [unittests/Support/DynamicLibrary/CMakeFiles/DynamicLibraryLib.dir/build.make:85:
lib/libDynamicLibraryLib.a] Error 1
make[2]: *** Deleting file 'lib/libDynamicLibraryLib.a'
make[1]: *** [CMakeFiles/Makefile2:137325:
unittests/Support/DynamicLibrary/CMakeFiles/DynamicLibraryLib.dir/all]
Error 2
make[1]: *** Waiting for unfinished jobs....

I am working on the following platform:
Linux XXXX 5.0.16-100.fc28.x86_64 #1 SMP Tue May 14 18:22:28 UTC 2019
x86_64 x86_64 x86_64 GNU/Linux

My steps were:
$ git clone git at github.com:llvm/llvm-project.git
$ cd llvm-project/
$ git checkout llvmorg-9.0.0
(I later tried with releases llvmorg-8.0.0 AND llvm-10.0.0 but still
got the same error)
$ mkdir build && cd build
$ cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug
-DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS=clang -G "Unix
Makefiles" ../llvm
(No errors so far)
$ make -j40
(This is where error happens)

I have worked with llvm for over 6 years now and still never ran into
something so bizarre. Any help is appreciated. I have looked online
for a few hours now and found similar postings but no clear replies or
 solutions for this.

Sincerely,

Christopher Jelesnianski


More information about the llvm-dev mailing list