<br>On Monday, February 15, 2016, Ismail Donmez via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Recently I started getting some weird errors from multiple tools (on<br>
Linux x86-64):<br>
<br>
λ lld<br>
lld: ../lib/Support/CommandLine.cpp:202: void (anonymous<br>
namespace)::CommandLineParser::registerCategory(llvm::cl::OptionCategory<br>
*): Assertion `std::count_if(RegisteredOptionCategories.begin(),<br>
RegisteredOptionCategories.end(), [cat](const OptionCategory<br>
*Category) { return cat->getName() == Category->getName(); }) == 0 &&<br>
"Duplicate option categories"' failed.<br>
[1] 25383 abort (core dumped) lld<br>
<br>
<br>
λ lldb-server<br>
: CommandLine Error: Option 'debug' registered more than once!<br>
LLVM ERROR: inconsistency in registered CommandLine options<br></blockquote><div> </div><div><font size="2"><span style="background-color:rgba(255,255,255,0)">Seems related to <a href="http://llvm.org/pr22952">llvm.org/pr22952</a> - the way cl::opt works fundamentally doesn't play well with shared libs.</span></font><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
llvm is built with:<br>
<br>
cmake -G "Ninja" \<br>
-DLLVM_BUILD_LLVM_DYLIB=ON \<br>
-DLLVM_LINK_LLVM_DYLIB=ON \<br>
-DCMAKE_BUILD_TYPE=RelWithDebInfo \<br>
-DCMAKE_INSTALL_PREFIX=/usr \<br>
-DLLVM_LIBDIR_SUFFIX=64 \<br>
-DCMAKE_C_FLAGS="-fuse-ld=gold -fPIC" \<br>
-DCMAKE_CXX_FLAGS="-fuse-ld=gold -fPIC" \<br>
-DLLVM_REQUIRES_RTTI=ON \<br>
-DLLVM_ENABLE_TIMESTAMPS=OFF \<br>
-DLLVM_ENABLE_ASSERTIONS=ON \<br>
-DLLVM_ENABLE_PIC=ON \<br>
-DLLVM_BINUTILS_INCDIR=/usr/include \<br>
-DLLVM_TARGETS_TO_BUILD=all \<br>
-DCLANG_DEFAULT_CXX_STDLIB=libc++ \<br>
-DLLVM_ENABLE_LIBCXX=ON \<br>
..<br>
<br>
Wonder if anyone hit the same problem?<br>
<br>
Thanks,<br>
ismail<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'llvm-dev@lists.llvm.org')">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote>