Open sylvestre opened 3 years ago
seems related to: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55394
The backtrace:
#​0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#​1 0x000003fffd8aacf8 in __GI_abort () at abort.c:79
#​2 0x000003fffdcbec78 in __gnu_cxx::__verbose_terminate_handler() () from /lib/s390x-linux-gnu/libstdc++.so.6
#​3 0x000003fffdcbc49e in ?? () from /lib/s390x-linux-gnu/libstdc++.so.6
#​4 0x000003fffdcbc528 in std::terminate() () from /lib/s390x-linux-gnu/libstdc++.so.6
#​5 0x000003fffdcbc856 in __cxa_throw () from /lib/s390x-linux-gnu/libstdc++.so.6
#​6 0x000003fffdcadb0e in std::__throw_system_error(int) () from /lib/s390x-linux-gnu/libstdc++.so.6
#​7 0x000002aa0019ec58 in std::call_once<void (&)()> () at /usr/include/c++/10/mutex:737
#​8 llvm::call_once<void (&)()> () at ../../lib/Support/./llvm/include/llvm/Support/Threading.h:121
#​9 getManagedStaticMutex () at ../../lib/Support/./llvm/lib/Support/ManagedStatic.cpp:29
#​10 llvm::ManagedStaticBase::RegisterManagedStatic () at ../../lib/Support/./llvm/lib/Support/ManagedStatic.cpp:37
#​11 llvm::ManagedStaticBase::RegisterManagedStatic () at ../../lib/Support/./llvm/lib/Support/ManagedStatic.cpp:33
#​12 0x000002aa0021d2b8 in llvm::ManagedStatic<(anonymous namespace)::CommandLineParser, llvm::object_creator<(anonymous namespace)::CommandLineParser>, llvm::object_deleter<(anonymous namespace)::CommandLineParser> >::operator*() [clone .constprop.0] () at ../../lib/Support/./llvm/include/llvm/Support/ManagedStatic.h:89
#​13 0x000002aa00018e9a in operator-> () at ../../lib/Support/./llvm/include/llvm/Support/ManagedStatic.h:94
#​14 llvm::cl::Option::addArgument () at ../../lib/Support/./llvm/lib/Support/CommandLine.cpp:445
#​15 0x000002aa0001b8de in _sub_I_65535_0.0 ()
#​16 0x000002aa00253186 in __libc_csu_init ()
#​17 0x000003fffd8aaf8e in __libc_start_main (main=0x2aa000188a0 <main()>, argc=<optimized out>, argv=0x3fffffff3e8,
init=0x2aa00253130 <__libc_csu_init>, fini=0x2aa002531a0 <__libc_csu_fini>, rtld_fini=0x3fffdf92ae0,
stack_end=0x3fffffff330) at libc-start.c:279
#​18 0x000002aa0001cef4 in _start ()
-pthread didn't change anything
This is happening for branches 11 & 12. 13 & 10 seems to work
This is Ubuntu Hirsute specific here: https://github.com/protocolbuffers/protobuf/issues/4958#issuecomment-510760038 it is suggested that a LDFLAGS += -pthread -Wl,--no-as-needed is missing
With: cmake ../llvm/ \ -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;libcxx;libcxxabi;compiler-rt;lld;debuginfo-tests;polly;lldb" \ -DCMAKE_INSTALL_PREFIX=/usr/lib/llvm-11 \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -DNDEBUG -g1" \ -DLLVM_LINK_LLVM_DYLIB=ON \ -DLLVM_INSTALL_UTILS=ON \ -DLLVM_VERSION_SUFFIX= \ -DLLVM_ENABLE_SPHINX=ON \ -DSPHINX_WARNINGS_AS_ERRORS=OFF \ -DLLVM_ENABLE_RTTI=ON \ -DLLVM_ENABLE_FFI=ON \ -DLLVM_ENABLE_DUMP=ON \ -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCLANG_SYSTEMZ_DEFAULT_ARCH=z13 -DLLVM_BINUTILS_INCDIR=/usr/include/ -DLLVM_USE_PERF=yes -DLLVM_ENABLE_LIBPFM=ON \ -DLIBCLANG_LIBRARY_VERSION=1 \ -DCLANG_LINK_CLANG_DYLIB=ON \ -DENABLE_LINKER_BUILD_ID=ON \ -DPOLLY_BUNDLED_JSONCPP=OFF \ -DCOMPILER_RT_USE_LIBCXX=NO \ -DLLVM_ENABLE_Z3_SOLVER=OFF \ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="AVR" \ -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \ -DCLANG_VENDOR=Ubuntu \ -DCLANG_ENABLE_BOOTSTRAP=ON \ -DCLANG_BUILD_EXAMPLES=OFF \ -DLLVM_POLLY_LINK_INTO_TOOLS=ON \ -DBOOTSTRAP_CMAKE_CXX_FLAGS='-fuse-ld=gold -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option ' \ -DBOOTSTRAP_CMAKE_C_FLAGS='-fuse-ld=gold -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option ' \ -DCLANG_BOOTSTRAP_PASSTHROUGH="CMAKE_INSTALL_PREFIX;CMAKE_VERBOSE_MAKEFILE;CMAKE_BUILD_TYPE;CMAKE_CXX_FLAGS_RELWITHDEBINFO;LLVM_LINK_LLVM_DYLIB;LLVM_INSTALL_UTILS;LLVM_VERSION_SUFFIX;LLVM_ENABLE_SPHINX;SPHINX_WARNINGS_AS_ERRORS;LLVM_BUILD_LLVM_DYLIB;LLVM_ENABLE_RTTI;LLVM_ENABLE_FFI;LIBCLANG_LIBRARY_VERSION;ENABLE_LINKER_BUILD_ID;POLLY_BUNDLED_JSONCPP;LLVM_EXPERIMENTAL_TARGETS_TO_BUILD;LLVM_USE_PERF;LLVM_ENABLE_ASSERTIONS;LLVM_BINUTILS_INCDIR;LLVM_HOST_TRIPLE;LLVM_COMPILER_CHECKED;COMPILER_RT_BUILD_BUILTINS;LIBOMP_LIBFLAGS;CMAKE_SHARED_LINKER_FLAGS;PYTHON_EXECUTABLE;LLVM_ENABLE_Z3_SOLVER;LLVM_POLLY_LINK_INTO_TOOLS;CLANG_VENDOR"
with g++-10
Extended Description
With the latest Ubuntu Hirsute (21.04), binaries fails to start with:
cd "/root/llvm-toolchain-11-11.1.0~++20210405103929+1fdec59bffc1/build-llvm/include/llvm/IR" && ../../../bin/llvm-tblgen -gen-attrs -I /root/llvm-toolchain-11-11.1.0~++20210405103929+1fdec59bffc1/llvm/include/llvm/IR -I /root/llvm-toolchain-11-11.1.0~++20210405103929+1fdec59bffc1/build-llvm/include -I /root/llvm-toolchain-11-11.1.0~++20210405103929+1fdec59bffc1/llvm/include /root/llvm-toolchain-11-11.1.0~++20210405103929+1fdec59bffc1/llvm/include/llvm/IR/Attributes.td --write-if-changed -o /root/llvm-toolchain-11-11.1.0~++20210405103929+1fdec59bffc1/build-llvm/include/llvm/IR/Attributes.inc terminate called after throwing an instance of 'std::system_error' what(): Unknown error -1 Aborted (core dumped)
Or easier: ./build-llvm/bin/llvm-tblgen terminate called after throwing an instance of 'std::system_error' what(): Unknown error -1 Aborted (core dumped)