Summary: | sys-devel/clang: clang frontend command failed with exit code 139 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Harley Wiltzer <harleyw> |
Component: | Current packages | Assignee: | LLVM support project <llvm> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | asolokha, dimgel, herrtimson, mgorny, mozilla, orodruinlair, sam, steffen |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 618550 | ||
Attachments: |
Build log
build.log reduced sys-libs/compiler-rt-13.0.0 emerge --info |
Description
Harley Wiltzer
2021-07-13 15:50:12 UTC
Created attachment 723712 [details]
Build log
the log says to attach certain files: 27:16.37 clang-12: note: diagnostic msg: 27:16.37 ******************** 27:16.37 PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: 27:16.37 Preprocessed source(s) and associated run script(s) are located at: 27:16.37 clang-12: note: diagnostic msg: /var/tmp/portage/www-client/firefox-90.0/temp/UnifiedProtocols1-fff0d9.cpp 27:16.37 clang-12: note: diagnostic msg: /var/tmp/portage/www-client/firefox-90.0/temp/UnifiedProtocols1-fff0d9.sh 27:16.37 clang-12: note: diagnostic msg: Your CLANG/LLVM compiler is crashing. Assigning to CLANG maintainer(s) for input. Created attachment 724087 [details]
build.log reduced
(BTW: There are a few API keys/secret tokens in your emerge --info because you used emerge --info --verbose. I recommend changing them!) Same here after upgrading to clang-13.0.0... clang-13 gives the 139 exit code when building sys-libs/compiler-rt-13.0.0. I will attach my 'emerge --info' and this is the last error I got: FAILED: lib/builtins/CMakeFiles/clang_rt.builtins-i386.dir/divdc3.c.o /usr/lib/llvm/13/bin/x86_64-pc-linux-gnu-clang -DVISIBILITY_HIDDEN -O2 -pipe -march=native -msse4 -msse4.1 -msse4.2 -mcx16 -fomit-frame-pointer -mfpmath=sse -msahf -w -Wall -Wno-unused-parameter -m32 -fno-lto -std=c11 -fPIC -fno-builtin -fvisibility=hidden -fomit-frame-pointer -MD -MT lib/builtins/CMakeFiles/clang_rt.builtins-i386.dir/divdc3.c.o -MF lib/builtins/CMakeFiles/clang_rt.builtins-i386.dir/divdc3.c.o.d -o lib/builtins/CMakeFiles/clang_rt.builtins-i386.dir/divdc3.c.o -c /tmp/portage/sys-libs/compiler-rt-13.0.0/work/compiler-rt/lib/builtins/divdc3.c PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: /usr/lib/llvm/13/bin/x86_64-pc-linux-gnu-clang -DVISIBILITY_HIDDEN -O2 -pipe -march=native -msse4 -msse4.1 -msse4.2 -mcx16 -fomit-frame-pointer -mfpmath=sse -msahf -w -Wall -Wno-unused-parameter -m32 -fno-lto -std=c11 -fPIC -fno-builtin -fvisibility=hidden -fomit-frame-pointer -MD -MT lib/builtins/CMakeFiles/clang_rt.builtins-i386.dir/divdc3.c.o -MF lib/builtins/CMakeFiles/clang_rt.builtins-i386.dir/divdc3.c.o.d -o lib/builtins/CMakeFiles/clang_rt.builtins-i386.dir/divdc3.c.o -c /tmp/portage/sys-libs/compiler-rt-13.0.0/work/compiler-rt/lib/builtins/divdc3.c 1. <eof> parser at end of file 2. Optimizer #0 0x00007fdeab5a207d llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm/13/bin/../lib64/libLLVM-13.so+0x8f007d) #1 0x00007fdeab5889d4 llvm::sys::RunSignalHandlers() (/usr/lib/llvm/13/bin/../lib64/libLLVM-13.so+0x8d69d4) #2 0x00007fdeab4f7fe8 (/usr/lib/llvm/13/bin/../lib64/libLLVM-13.so+0x845fe8) #3 0x00007fdeaa926670 (/lib64/libc.so.6+0x38670) #4 0x00007fdeab36a678 llvm::AsmPrinter::emitMachineConstantPoolValue(llvm::MachineConstantPoolValue*) (/usr/lib/llvm/13/bin/../lib64/libLLVM-13.so+0x6b8678) #5 0x00007fdeabf07985 llvm::PromoteMemToReg(llvm::ArrayRef<llvm::AllocaInst*>, llvm::DominatorTree&, llvm::AssumptionCache*) (/usr/lib/llvm/13/bin/../lib64/libLLVM-13.so+0x1255985) #6 0x00007fdeac2109e7 llvm::SROA::runImpl(llvm::Function&, llvm::DominatorTree&, llvm::AssumptionCache&) (/usr/lib/llvm/13/bin/../lib64/libLLVM-13.so+0x155e9e7) #7 0x00007fdead0d52b3 (/usr/lib/llvm/13/bin/../lib64/libLLVM-13.so+0x24232b3) #8 0x00007fdeab6e9683 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/usr/lib/llvm/13/bin/../lib64/libLLVM-13.so+0xa37683) #9 0x00007fdeacb32ca2 (/usr/lib/llvm/13/bin/../lib64/libLLVM-13.so+0x1e80ca2) #10 0x00007fdeab6e9a31 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/lib/llvm/13/bin/../lib64/libLLVM-13.so+0xa37a31) #11 0x00007fdeacb32c52 (/usr/lib/llvm/13/bin/../lib64/libLLVM-13.so+0x1e80c52) #12 0x00007fdeab6e92d9 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/lib/llvm/13/bin/../lib64/libLLVM-13.so+0xa372d9) #13 0x00007fdeb015cff7 (/usr/lib/llvm/13/bin/../lib64/libclang-cpp.so.13+0x1804ff7) #14 0x00007fdeb01614c1 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/usr/lib/llvm/13/bin/../lib64/libclang-cpp.so.13+0x18094c1) #15 0x00007fdeb042bace (/usr/lib/llvm/13/bin/../lib64/libclang-cpp.so.13+0x1ad3ace) #16 0x00007fdeaf49ab7d clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/llvm/13/bin/../lib64/libclang-cpp.so.13+0xb42b7d) #17 0x00007fdeb0a804e9 clang::FrontendAction::Execute() (/usr/lib/llvm/13/bin/../lib64/libclang-cpp.so.13+0x21284e9) #18 0x00007fdeb0a20ac7 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/llvm/13/bin/../lib64/libclang-cpp.so.13+0x20c8ac7) #19 0x00007fdeb0ac8a7b clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/llvm/13/bin/../lib64/libclang-cpp.so.13+0x2170a7b) #20 0x000055afeaf3c2ec cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/lib/llvm/13/bin/x86_64-pc-linux-gnu-clang+0x132ec) #21 0x000055afeaf423fe (/usr/lib/llvm/13/bin/x86_64-pc-linux-gnu-clang+0x193fe) #22 0x00007fdeb0769805 (/usr/lib/llvm/13/bin/../lib64/libclang-cpp.so.13+0x1e11805) #23 0x00007fdeab4e3a23 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/lib/llvm/13/bin/../lib64/libLLVM-13.so+0x831a23) #24 0x00007fdeb0796972 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (/usr/lib/llvm/13/bin/../lib64/libclang-cpp.so.13+0x1e3e972) #25 0x00007fdeb0757a49 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/usr/lib/llvm/13/bin/../lib64/libclang-cpp.so.13+0x1dffa49) #26 0x00007fdeb0757e3d clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/usr/lib/llvm/13/bin/../lib64/libclang-cpp.so.13+0x1dffe3d) #27 0x00007fdeb075f4b1 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/usr/lib/llvm/13/bin/../lib64/libclang-cpp.so.13+0x1e074b1) #28 0x000055afeaf384b4 main (/usr/lib/llvm/13/bin/x86_64-pc-linux-gnu-clang+0xf4b4) #29 0x00007fdeaa9117fd __libc_start_main (/lib64/libc.so.6+0x237fd) #30 0x000055afeaf396aa _start (/usr/lib/llvm/13/bin/x86_64-pc-linux-gnu-clang+0x106aa) clang-13: error: clang frontend command failed with exit code 139 (use -v to see invocation) clang version 13.0.0 Target: i386-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/13/bin corrupted size vs. prev_size ninja: build stopped: subcommand failed. * ERROR: sys-libs/compiler-rt-13.0.0::gentoo failed (compile phase): * ninja -v -j8 -l8 failed * * Call stack: * ebuild.sh, line 127: Called src_compile * environment, line 3258: Called cmake_src_compile * environment, line 1243: Called cmake_build * environment, line 1212: Called eninja * environment, line 1719: Called die * The specific snippet of code: * "$@" || die "${nonfatal_args[@]}" "${*} failed" * * If you need support, post the output of `emerge --info '=sys-libs/compiler-rt-13.0.0::gentoo'`, * the complete build log and the output of `emerge -pqv '=sys-libs/compiler-rt-13.0.0::gentoo'`. * The complete build log is located at '/tmp/portage/sys-libs/compiler-rt-13.0.0/temp/build.log'. * The ebuild environment file is located at '/tmp/portage/sys-libs/compiler-rt-13.0.0/temp/environment'. * Working directory: '/tmp/portage/sys-libs/compiler-rt-13.0.0/work/compiler-rt-13.0.0_build' * S: '/tmp/portage/sys-libs/compiler-rt-13.0.0/work/compiler-rt' Created attachment 742530 [details]
sys-libs/compiler-rt-13.0.0 emerge --info
(In reply to Iade Gesso from comment #6) > Same here after upgrading to clang-13.0.0... clang-13 gives the 139 exit > code when building sys-libs/compiler-rt-13.0.0. Same here, for both sys-libs/compiler-rt-13.0.0 and sys-libs/compiler-rt-sanitizers-13.0.0. As mentioned in https://bugs.llvm.org/show_bug.cgi?id=52375#c3, we need information about how sys-devel/llvm is merged. This may be a red herring but the two outputs of emerge --info indicate that they are both stable systems and use gcc-10.3.0 as the compiler. (In reply to Tee KOBAYASHI from comment #9) > As mentioned in https://bugs.llvm.org/show_bug.cgi?id=52375#c3, we need > information about how sys-devel/llvm is merged. Looks like I've solved the problem. System compiler is gcc-11.2.0, -flto by default. Previous versions of package sys-devel/llvm (at least versions 11.x and 12.x) failed to compile with -flto. Version 13.0.0 compiled, and that was a catcher. Right now I disabled LTO for this one package, and both compiler-rt and compiler-rt-sanitizers were successfully built. To rephrase, are you saying that LLVM is broken when build by gcc-11 with -flto? (In reply to Michał Górny from comment #11) > To rephrase, are you saying that LLVM is broken when build by gcc-11 with > -flto? Certainly yes for sys-devel/llvm:11,12 -- and not only with gcc-11 which went stable rather recently; those llvm versions were compiled with previous version(s) of gcc. And likely yes for llvm:13 with gcc-11. BTW, sys-libs/libomp:11,12,13 fails to compile with -flto too. So, of all LLVM/clang-related packages only these two (llvm, libomp) have LTO disabled in my /etc/portage/package.env, everything else (clang, clang-common, clang-runtime, compiler-rt, compiler-rt-sanitizers) is OK with -flto. Is this still a problem? |