Ismail Donmez via llvm-dev
2016-Feb-15 08:51 UTC
[llvm-dev] CommandLineParser problems with llvm trunk?
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
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
Justin Bogner via llvm-dev
2016-Feb-15 17:07 UTC
[llvm-dev] CommandLineParser problems with llvm trunk?
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>
Ismail Donmez via llvm-dev
2016-Feb-15 17:47 UTC
[llvm-dev] CommandLineParser problems with llvm trunk?
On Mon, Feb 15, 2016 at 7:07 PM, Justin Bogner <mail at justinbogner.com> wrote:> > 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.Wow, thats a big blocker for LLVM_BUILD_LLVM_DYLIB, thanks a lot! ismail