Opened 7 weeks ago

Last modified 7 weeks ago

#116 new defect

Divine fails to build on distributions with recent glibc and GNU toolchain

Reported by: Lukáš Zaoral Owned by: mornfall
Priority: major Milestone: 4.5
Component: other Keywords:
Cc: kdudka@…

Description

Divine fails to successfully complete the make install phase on Linux distributions with glibc 2.32+, GCC 10.3.1+ and binutils 2.35+.

The only code change made is the following (hopefully unrelated) downstream hotfix for #106:

--- a/dios/libcxx/CMakeLists.txt
+++ b/dios/libcxx/CMakeLists.txt
@@ -214,13 +214,13 @@ cmake_dependent_option(LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY
 # is on. This option is also disabled when the ABI library is not specified
 # or is specified to be "none".
 set(ENABLE_LINKER_SCRIPT_DEFAULT_VALUE OFF)
-if (LLVM_HAVE_LINK_VERSION_SCRIPT AND NOT LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY
-      AND NOT LIBCXX_CXX_ABI_LIBNAME STREQUAL "none"
-      AND NOT LIBCXX_CXX_ABI_LIBNAME STREQUAL "default"
-      AND PYTHONINTERP_FOUND
-      AND LIBCXX_ENABLE_SHARED)
-    set(ENABLE_LINKER_SCRIPT_DEFAULT_VALUE ON)
-endif()
+# if (LLVM_HAVE_LINK_VERSION_SCRIPT AND NOT LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY
+#       AND NOT LIBCXX_CXX_ABI_LIBNAME STREQUAL "none"
+#       AND NOT LIBCXX_CXX_ABI_LIBNAME STREQUAL "default"
+#       AND PYTHONINTERP_FOUND
+#       AND LIBCXX_ENABLE_SHARED)
+#     set(ENABLE_LINKER_SCRIPT_DEFAULT_VALUE ON)
+# endif()
 
 option(LIBCXX_ENABLE_ABI_LINKER_SCRIPT
       "Use and install a linker script for the given ABI library"

Unfortunately, I don't know the exact package versions this behavior started to occur but it is 100% reproducible both on latest Fedora 33 (or newer) and on Arch Linux.

[633/649] Building CXX object dios/libcxx/src/CMakeFiles/cxx_shared.dir/locale.cpp.o
FAILED: dios/libcxx/src/CMakeFiles/cxx_shared.dir/locale.cpp.o
/home/lukas/redhat/divine/_build.toolchain/clang//bin/clang++ -DBRICKS_HAVE_DIRENT_D_TYPE -DBRICKS_HAVE_LLVM -DNDEBUG -DOPT_SIM=1 -DOPT_SQL=0 -DOPT_STP=1 -DOPT_TBBMALLOC=0 -DOPT_Z3=1 -D_GNU_SOURCE -D_LIBCPP_BUILDING_LIBRARY -D_LIBCPP_HAS_COMMENT_LIB_PRAGMA -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/lukas/redhat/divine/llvm/include -I/home/lukas/redhat/divine/_build.release/llvm/include -I/home/lukas/redhat/divine/clang/include -I/home/lukas/redhat/divine/_build.release/clang/include -I/home/lukas/redhat/divine/lld/include -I/home/lukas/redhat/divine/_build.release/lld/include -I/home/lukas/redhat/divine/bricks -I/usr/include/valgrind -I/home/lukas/redhat/divine/_build.release/dios/libcxx/include/c++build -isystem /home/lukas/redhat/divine/dios/libcxxabi/include -isystem /home/lukas/redhat/divine/dios/libcxx/include -isystem /home/lukas/redhat/divine/dios/libunwind/include  -nostdinc++ -Wno-unused-command-line-argument -I/usr/local/include -std=c++1z -O3 -g  -DNVALGRIND -fPIC -DLIBCXX_BUILDING_LIBCXXABI -std=c++11 -nostdinc++ -fvisibility-inlines-hidden -Wall -Wextra -W -Wwrite-strings -Wno-unused-parameter -Wno-long-long -Werror=return-type -Wextra-semi -Wno-user-defined-literals -Wno-covered-switch-default -Wno-ignored-attributes -Wno-error -include /home/lukas/redhat/divine/_build.release/dios/libcxx/__config_site -fcolor-diagnostics -Wall -Wold-style-cast -Wno-unused-function -Wno-gnu-zero-variadic-macro-arguments -Wno-old-style-cast -MD -MT dios/libcxx/src/CMakeFiles/cxx_shared.dir/locale.cpp.o -MF dios/libcxx/src/CMakeFiles/cxx_shared.dir/locale.cpp.o.d -o dios/libcxx/src/CMakeFiles/cxx_shared.dir/locale.cpp.o -c /home/lukas/redhat/divine/dios/libcxx/src/locale.cpp
Stack dump:
0.      Program arguments: /home/lukas/redhat/divine/_build.toolchain/clang/bin/clang-7 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name locale.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -momit-leaf-frame-pointer -coverage-notes-file /home/lukas/redhat/divine/_build.release/dios/libcxx/src/CMakeFiles/cxx_shared.dir/locale.cpp.gcno -nostdinc++ -resource-dir /home/lukas/redhat/divine/_build.toolchain/clang/lib/clang/7.0.0 -dependency-file dios/libcxx/src/CMakeFiles/cxx_shared.dir/locale.cpp.o.d -sys-header-deps -MT dios/libcxx/src/CMakeFiles/cxx_shared.dir/locale.cpp.o -isystem /home/lukas/redhat/divine/dios/libcxxabi/include -isystem /home/lukas/redhat/divine/dios/libcxx/include -isystem /home/lukas/redhat/divine/dios/libunwind/include -include /home/lukas/redhat/divine/_build.release/dios/libcxx/__config_site -D BRICKS_HAVE_DIRENT_D_TYPE -D BRICKS_HAVE_LLVM -D NDEBUG -D OPT_SIM=1 -D OPT_SQL=0 -D OPT_STP=1 -D OPT_TBBMALLOC=0 -D OPT_Z3=1 -D _GNU_SOURCE -D _LIBCPP_BUILDING_LIBRARY -D _LIBCPP_HAS_COMMENT_LIB_PRAGMA -D _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D __STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -I /home/lukas/redhat/divine/llvm/include -I /home/lukas/redhat/divine/_build.release/llvm/include -I /home/lukas/redhat/divine/clang/include -I /home/lukas/redhat/divine/_build.release/clang/include -I /home/lukas/redhat/divine/lld/include -I /home/lukas/redhat/divine/_build.release/lld/include -I /home/lukas/redhat/divine/bricks -I /usr/include/valgrind -I /home/lukas/redhat/divine/_build.release/dios/libcxx/include/c++build -I /usr/local/include -D NVALGRIND -D LIBCXX_BUILDING_LIBCXXABI -internal-isystem /usr/local/include -internal-isystem /home/lukas/redhat/divine/_build.toolchain/clang/lib/clang/7.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -Wno-unused-command-line-argument -Wall -Wextra -W -Wwrite-strings -Wno-unused-parameter -Wno-long-long -Werror=return-type -Wextra-semi -Wno-user-defined-literals -Wno-covered-switch-default -Wno-ignored-attributes -Wno-error -Wall -Wold-style-cast -Wno-unused-function -Wno-gnu-zero-variadic-macro-arguments -Wno-old-style-cast -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /home/lukas/redhat/divine/_build.release -ferror-limit 19 -fmessage-length 0 -fvisibility-inlines-hidden -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o dios/libcxx/src/CMakeFiles/cxx_shared.dir/locale.cpp.o -x c++ /home/lukas/redhat/divine/dios/libcxx/src/locale.cpp -faddrsig
1.      <eof> parser at end of file
2.      Code generation
#0 0x0000556e5d334a40 PrintStackTraceSignalHandler(void*) (/home/lukas/redhat/divine/_build.toolchain/clang/bin/clang-7+0x24a2a40)
#1 0x0000556e5d332d64 SignalHandler(int) (/home/lukas/redhat/divine/_build.toolchain/clang/bin/clang-7+0x24a0d64)
#2 0x00007ff8ae7c9870 __restore_rt (/usr/lib/libpthread.so.0+0x13870)
#3 0x0000556e5db235f0 llvm::DIE::getUnitDie() const (/home/lukas/redhat/divine/_build.toolchain/clang/bin/clang-7+0x2c915f0)
#4 0x0000556e5db2dc6c llvm::DwarfDebug::finishVariableDefinitions() (/home/lukas/redhat/divine/_build.toolchain/clang/bin/clang-7+0x2c9bc6c)
#5 0x0000556e5db40f23 llvm::DwarfDebug::finalizeModuleInfo() (/home/lukas/redhat/divine/_build.toolchain/clang/bin/clang-7+0x2caef23)
#6 0x0000556e5db41511 llvm::DwarfDebug::endModule() (/home/lukas/redhat/divine/_build.toolchain/clang/bin/clang-7+0x2caf511)
#7 0x0000556e5db1896a llvm::AsmPrinter::doFinalization(llvm::Module&) (/home/lukas/redhat/divine/_build.toolchain/clang/bin/clang-7+0x2c8696a)
#8 0x0000556e5cd7f508 llvm::FPPassManager::doFinalization(llvm::Module&) (/home/lukas/redhat/divine/_build.toolchain/clang/bin/clang-7+0x1eed508)
#9 0x0000556e5cd8a6c8 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/lukas/redhat/divine/_build.toolchain/clang/bin/clang-7+0x1ef86c8)
#10 0x0000556e5d55872d clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/home/lukas/redhat/divine/_build.toolchain/clang/bin/clang-7+0x26c672d)
#11 0x0000556e5ddbd63a clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/lukas/redhat/divine/_build.toolchain/clang/bin/clang-7+0x2f2b63a)
#12 0x0000556e5e6d13a9 clang::ParseAST(clang::Sema&, bool, bool) (/home/lukas/redhat/divine/_build.toolchain/clang/bin/clang-7+0x383f3a9)
#13 0x0000556e5da20816 clang::FrontendAction::Execute() (/home/lukas/redhat/divine/_build.toolchain/clang/bin/clang-7+0x2b8e816)
#14 0x0000556e5d9e3dc6 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/lukas/redhat/divine/_build.toolchain/clang/bin/clang-7+0x2b51dc6)
#15 0x0000556e5dad3923 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/lukas/redhat/divine/_build.toolchain/clang/bin/clang-7+0x2c41923)
#16 0x0000556e5ba9ac88 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/lukas/redhat/divine/_build.toolchain/clang/bin/clang-7+0xc08c88)
#17 0x0000556e5ba07f3a main (/home/lukas/redhat/divine/_build.toolchain/clang/bin/clang-7+0xb75f3a)
#18 0x00007ff8ae1feb25 __libc_start_main (/usr/lib/libc.so.6+0x27b25)
#19 0x0000556e5ba9853e _start (/home/lukas/redhat/divine/_build.toolchain/clang/bin/clang-7+0xc0653e)
clang-7: error: unable to execute command: Segmentation fault (core dumped)
clang-7: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 7.0.0 (tags/RELEASE_700/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/lukas/redhat/divine/_build.toolchain/clang//bin
clang-7: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
clang-7: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-7: note: diagnostic msg: /tmp/locale-bc0ef7.cpp
clang-7: note: diagnostic msg: /tmp/locale-bc0ef7.sh
clang-7: note: diagnostic msg:

********************
[639/649] Building CXX object tools/CMakeFiles/shoop.dir/shoop.cpp.o
ninja: build stopped: subcommand failed.
make[2]: *** [Makefile:103: build] Error 1
make[2]: Leaving directory '/home/lukas/redhat/divine'
make[1]: *** [Makefile:120: release-install] Error 2
make[1]: Leaving directory '/home/lukas/redhat/divine'
make: *** [Makefile:165: install] Error 2

Change History (1)

comment:1 Changed 7 weeks ago by Lukáš Zaoral

Note: See TracTickets for help on using tickets.