[llvm-dev] CommandLineParser problems with llvm trunk?

Justin Bogner via llvm-dev llvm-dev at lists.llvm.org
Mon Feb 15 09:07:21 PST 2016


On Monday, February 15, 2016, Ismail Donmez via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi,
>
> Recently I started getting some weird errors from multiple tools (on
> Linux x86-64):
>
> λ lld
> lld: ../lib/Support/CommandLine.cpp:202: void (anonymous
> namespace)::CommandLineParser::registerCategory(llvm::cl::OptionCategory
> *): Assertion `std::count_if(RegisteredOptionCategories.begin(),
> RegisteredOptionCategories.end(), [cat](const OptionCategory
> *Category) { return cat->getName() == Category->getName(); }) == 0 &&
> "Duplicate option categories"' failed.
> [1]    25383 abort (core dumped)  lld
>
>
> λ lldb-server
> : CommandLine Error: Option 'debug' registered more than once!
> LLVM ERROR: inconsistency in registered CommandLine options
>

Seems related to llvm.org/pr22952 - the way cl::opt works
fundamentally doesn't play well with shared libs.

llvm is built with:
>
> cmake -G "Ninja" \
>     -DLLVM_BUILD_LLVM_DYLIB=ON \
>     -DLLVM_LINK_LLVM_DYLIB=ON \
>     -DCMAKE_BUILD_TYPE=RelWithDebInfo \
>     -DCMAKE_INSTALL_PREFIX=/usr \
>     -DLLVM_LIBDIR_SUFFIX=64 \
>     -DCMAKE_C_FLAGS="-fuse-ld=gold -fPIC" \
>     -DCMAKE_CXX_FLAGS="-fuse-ld=gold -fPIC" \
>     -DLLVM_REQUIRES_RTTI=ON \
>     -DLLVM_ENABLE_TIMESTAMPS=OFF \
>     -DLLVM_ENABLE_ASSERTIONS=ON \
>     -DLLVM_ENABLE_PIC=ON \
>     -DLLVM_BINUTILS_INCDIR=/usr/include \
>     -DLLVM_TARGETS_TO_BUILD=all \
>     -DCLANG_DEFAULT_CXX_STDLIB=libc++ \
>     -DLLVM_ENABLE_LIBCXX=ON \
>     ..
>
> Wonder if anyone hit the same problem?
>
> Thanks,
> ismail
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org <javascript:;>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160215/e3fdf419/attachment.html>


More information about the llvm-dev mailing list