LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-30-2019, 07:08 PM   #1
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 394

Rep: Reputation: 255Reputation: 255Reputation: 255
LLVM 9.0.0 Clang segfault Firefox build


Right at the end of the first pass, when compiling constructor tests.

That's bollocks, I'm going back to LLVM 8 (and reverting dependents for now)

Code:
58:02.11 TEST-PASS | check_spidermonkey_style.py | ok
58:02.35 TEST-PASS | check_macroassembler_style.py | ok
58:02.35 toolkit/components/featuregates/feature_definitions.json.stub
58:02.49 TEST-PASS | check_js_opcode.py | ok
58:02.51 toolkit/components/telemetry/EventArtifactDefinitions.json.stub
58:02.51 toolkit/locales/multilocale.txt.stub
58:02.55 toolkit/mozapps/extensions/built_in_addons.json.stub
58:03.00 toolkit/components/telemetry/ScalarArtifactDefinitions.json.stub
58:04.51 Stack dump:
58:04.51 0.	Program arguments: /usr/bin/clang-9 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name test-ctors.c -mrelocation-model pic -pic-level 2 -mthread-model posix -relaxed-aliasing -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu corei7 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -momit-leaf-frame-pointer -ffunction-sections -fdata-sections -coverage-notes-file /storage2/shit/build/firefox-69.0.1/obj-x86_64-pc-linux-gnu/build/unix/elfhack/test-ctors.gcno -resource-dir /usr/bin/../lib64/clang/9.0.0 -dependency-file .deps/test-ctors.o.pp -MT test-ctors.o -sys-header-deps -MP -include /storage2/shit/build/firefox-69.0.1/config/gcc_hidden.h -include /storage2/shit/build/firefox-69.0.1/obj-x86_64-pc-linux-gnu/mozilla-config.h -I /storage2/shit/build/firefox-69.0.1/obj-x86_64-pc-linux-gnu/dist/system_wrappers -D NDEBUG=1 -D TRIMMED=1 -I /storage2/shit/build/firefox-69.0.1/build/unix/elfhack -I /storage2/shit/build/firefox-69.0.1/obj-x86_64-pc-linux-gnu/build/unix/elfhack -I /storage2/shit/build/firefox-69.0.1/obj-x86_64-pc-linux-gnu/dist/include -I /storage2/shit/build/firefox-69.0.1/obj-x86_64-pc-linux-gnu/dist/include/nspr -I /storage2/shit/build/firefox-69.0.1/obj-x86_64-pc-linux-gnu/dist/include/nss -D MOZILLA_CLIENT -U _FORTIFY_SOURCE -D _FORTIFY_SOURCE=2 -U _FORTIFY_SOURCE -D _FORTIFY_SOURCE=2 -cxx-isystem /usr/lib64/qt/include -cxx-isystem /usr/lib64/qt/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib64/clang/9.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -std=gnu99 -fdebug-compilation-dir /storage2/shit/build/firefox-69.0.1/obj-x86_64-pc-linux-gnu/build/unix/elfhack -ferror-limit 19 -fmessage-length 0 -pthread -stack-protector 2 -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -faddrsig -o test-ctors.o -x c /storage2/shit/build/firefox-69.0.1/build/unix/elfhack/test-ctors.c
58:04.51 1.	<eof> parser at end of file
58:04.51 2.	Code generation
58:04.51 3.	Running pass 'Function Pass Manager' on module '/storage2/shit/build/firefox-69.0.1/build/unix/elfhack/test-ctors.c'.
58:04.51 4.	Running pass 'X86 DAG->DAG Instruction Selection' on function '@test'
58:04.51 Stack dump:
58:04.51 0.	Program arguments: /usr/bin/clang-9 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name test-array.c -mrelocation-model pic -pic-level 2 -mthread-model posix -relaxed-aliasing -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu corei7 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -momit-leaf-frame-pointer -ffunction-sections -fdata-sections -coverage-notes-file /storage2/shit/build/firefox-69.0.1/obj-x86_64-pc-linux-gnu/build/unix/elfhack/test-array.gcno -resource-dir /usr/bin/../lib64/clang/9.0.0 -dependency-file .deps/test-array.o.pp -MT test-array.o -sys-header-deps -MP -include /storage2/shit/build/firefox-69.0.1/config/gcc_hidden.h -include /storage2/shit/build/firefox-69.0.1/obj-x86_64-pc-linux-gnu/mozilla-config.h -I /storage2/shit/build/firefox-69.0.1/obj-x86_64-pc-linux-gnu/dist/system_wrappers -D NDEBUG=1 -D TRIMMED=1 -I /storage2/shit/build/firefox-69.0.1/build/unix/elfhack -I /storage2/shit/build/firefox-69.0.1/obj-x86_64-pc-linux-gnu/build/unix/elfhack -I /storage2/shit/build/firefox-69.0.1/obj-x86_64-pc-linux-gnu/dist/include -I /storage2/shit/build/firefox-69.0.1/obj-x86_64-pc-linux-gnu/dist/include/nspr -I /storage2/shit/build/firefox-69.0.1/obj-x86_64-pc-linux-gnu/dist/include/nss -D MOZILLA_CLIENT -U _FORTIFY_SOURCE -D _FORTIFY_SOURCE=2 -U _FORTIFY_SOURCE -D _FORTIFY_SOURCE=2 -cxx-isystem /usr/lib64/qt/include -cxx-isystem /usr/lib64/qt/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib64/clang/9.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -std=gnu99 -fdebug-compilation-dir /storage2/shit/build/firefox-69.0.1/obj-x86_64-pc-linux-gnu/build/unix/elfhack -ferror-limit 19 -fmessage-length 0 -pthread -stack-protector 2 -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -faddrsig -o test-array.o -x c /storage2/shit/build/firefox-69.0.1/build/unix/elfhack/test-array.c
58:04.51 1.	<eof> parser at end of file
58:04.51 2.	Code generation
58:04.51 3.	Running pass 'Function Pass Manager' on module '/storage2/shit/build/firefox-69.0.1/build/unix/elfhack/test-array.c'.
58:04.51 4.	Running pass 'X86 DAG->DAG Instruction Selection' on function '@test'
58:04.60  #0 0x00007efca57616f4 (/usr/bin/../lib64/libLLVMSupport.so.9+0x1776f4)
58:04.60  #1 0x00007efca575f5ee llvm::sys::RunSignalHandlers() (/usr/bin/../lib64/libLLVMSupport.so.9+0x1755ee)
58:04.60  #2 0x00007efca57619a8 (/usr/bin/../lib64/libLLVMSupport.so.9+0x1779a8)
58:04.60  #3 0x00007efca5385690 __restore_rt (/lib64/libpthread.so.0+0x13690)
58:04.60  #4 0x00007efca64d05e4 llvm::EVT::getExtendedVectorNumElements() const (/usr/bin/../lib64/libLLVMCodeGen.so.9+0x38b5e4)
58:04.61  #5 0x00007efca3da4041 llvm::TargetLowering::SimplifyDemandedBits(llvm::SDValue, llvm::APInt const&, llvm::APInt const&, llvm::KnownBits&, llvm::TargetLowering::TargetLoweringOpt&, unsigned int, bool) const (/usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.9+0x212041)
58:04.61  #6 0x00007efca3da9f9a llvm::TargetLowering::SimplifyDemandedBits(llvm::SDValue, llvm::APInt const&, llvm::APInt const&, llvm::KnownBits&, llvm::TargetLowering::TargetLoweringOpt&, unsigned int, bool) const (/usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.9+0x217f9a)
58:04.61  #7 0x00007efca3c278f0 (/usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.9+0x958f0)
58:04.61  #8  0x00007efca3c06937 #0( /usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.9+0x74937)
58:04.61 0x00007f1686e696f4  #9( /usr/bin/../lib64/libLLVMSupport.so.90x00007efca3bd29c1+ 0x1776f4()/usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.9
58:04.61 +0x409c1)
58:04.61  #10#1  0x00007efca3bcf64c0x00007f1686e675ee  llvm::sys::RunSignalHandlers()( /usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.9(+/usr/bin/../lib64/libLLVMSupport.so.90x3d64c)+
58:04.61 0x1755ee)
58:04.61 #11 0x00007efca3bcdee3  #2llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AAResults*, llvm::CodeGenOpt::Level)  0x00007f1686e699a8( /usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.9(+/usr/bin/../lib64/libLLVMSupport.so.90x3bee3+)0x1779a8
58:04.61 )
58:04.61 #12  0x00007efca3d8ae82#3  llvm::SelectionDAGISel::CodeGenAndEmitDAG()0x00007f1686a8d690  (__restore_rt/usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.9 +(0x1f8e82/lib64/libpthread.so.0)
58:04.61 +0x13690)#13
58:04.61  0x00007efca3d8aa37  #4llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)  0x00007f1687bd85e4( /usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.9llvm::EVT::getExtendedVectorNumElements() const+ 0x1f8a37()
58:04.61 /usr/bin/../lib64/libLLVMCodeGen.so.9+0x38b5e4#14)
58:04.61 0x00007efca3d882c6  llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)#5  (0x00007f16854ac041/usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.9 +llvm::TargetLowering::SimplifyDemandedBits(llvm::SDValue, llvm::APInt const&, llvm::APInt const&, llvm::KnownBits&, llvm::TargetLowering::TargetLoweringOpt&, unsigned int, bool) const0x1f62c6 )(
58:04.61 /usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.9#15+ 0x2120410x00007efca6e1be58)
58:04.61 (/usr/bin/../lib64/libLLVMX86CodeGen.so.9+0xd6e58)
58:04.62 #6 0x00007f16854b1f9a llvm::TargetLowering::SimplifyDemandedBits(llvm::SDValue, llvm::APInt const&, llvm::APInt const&, llvm::KnownBits&, llvm::TargetLowering::TargetLoweringOpt&, unsigned int, bool) const (#16/usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.9+0x217f9a)
58:04.62 0x00007efca6329354 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/bin/../lib64/libLLVMCodeGen.so.9+0x1e4354)
58:04.62  #7#17  0x00007f168532f8f00x00007efca60074cb  (llvm::FPPassManager::runOnFunction(llvm::Function&)/usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.9 +(0x958f0/usr/bin/../lib64/libLLVMCore.so.9)+
58:04.62 0x1aa4cb)
58:04.62  #8#18  0x00007f168530e9370x00007efca60077b3  (llvm::FPPassManager::runOnModule(llvm::Module&)/usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.9 +(0x74937/usr/bin/../lib64/libLLVMCore.so.9)+
58:04.62 0x1aa7b3)
58:04.62  #9 0x00007f16852da9c1#19  (/usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.90x00007efca6007d4f+ 0x409c1llvm::legacy::PassManagerImpl::run(llvm::Module&))
58:04.62 (/usr/bin/../lib64/libLLVMCore.so.9+#100x1aad4f )0x00007f16852d764c
58:04.62  (/usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.9#20+ 0x3d64c0x00007efca4b08c04)
58:04.62 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> >)#11  (0x00007f16852d5ee3/usr/bin/../lib64/libclangCodeGen.so.9 +llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AAResults*, llvm::CodeGenOpt::Level)0xa4c04 )(
58:04.62 /usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.9+0x3bee3#21)
58:04.62 0x00007efca4d5b18d (#12/usr/bin/../lib64/libclangCodeGen.so.9 +0x00007f1685492e820x2f718d )llvm::SelectionDAGISel::CodeGenAndEmitDAG()
58:04.62 (/usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.9+#220x1f8e82 )0x00007efca2d20653
58:04.62 clang::ParseAST(clang::Sema&, bool, bool) (#13/usr/bin/../lib64/../lib64/libclangParse.so.9 +0x00007f1685492a370x32653 )llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
58:04.62  (/usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.9#23+ 0x1f8a370x00007efca47bcad1)
58:04.62 clang::FrontendAction::Execute() (#14/usr/bin/../lib64/libclangFrontend.so.9 +0x00007f16854902c60xe8ad1 )llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
58:04.62  (/usr/bin/../lib64/../lib64/libLLVMSelectionDAG.so.9+#240x1f62c6 )
58:04.63 0x00007efca475d03f #15clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)  0x00007f1688523e58( /usr/bin/../lib64/libclangFrontend.so.9(+/usr/bin/../lib64/libLLVMX86CodeGen.so.90x8903f)+
58:04.63 0xd6e58)
58:04.63 #25 0x00007efca46d10ec#16  clang::ExecuteCompilerInvocation(clang::CompilerInstance*)0x00007f1687a31354  (llvm::MachineFunctionPass::runOnFunction(llvm::Function&)/usr/bin/../lib64/libclangFrontendTool.so.9 +0x40ec()/usr/bin/../lib64/libLLVMCodeGen.so.9+
58:04.63 0x1e4354)
58:04.63 #26 #170x00000000004112ad  cc1_main(llvm::ArrayRef<char const*>, char const*, void*)0x00007f168770f4cb  (llvm::FPPassManager::runOnFunction(llvm::Function&)/usr/bin/clang-9 +(0x4112ad/usr/bin/../lib64/libLLVMCore.so.9)+
58:04.63 0x1aa4cb)
58:04.63 #27 #180x000000000040f3a2  0x00007f168770f7b3main  llvm::FPPassManager::runOnModule(llvm::Module&)( /usr/bin/clang-9(+/usr/bin/../lib64/libLLVMCore.so.90x40f3a2+)0x1aa7b3
58:04.63 )
58:04.63 #28#19  0x00007efca3fd2e5b0x00007f168770fd4f  __libc_start_mainllvm::legacy::PassManagerImpl::run(llvm::Module&)  ((/lib64/libc.so.6/usr/bin/../lib64/libLLVMCore.so.9++0x23e5b0x1aad4f))
58:04.63 #29#20  0x00007f1686210c040x000000000040c89a  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> >) _start( /usr/bin/../lib64/libclangCodeGen.so.9(+/usr/bin/clang-90xa4c04+)0x40c89a
58:04.63 )
58:04.63 #21 0x00007f168646318d (/usr/bin/../lib64/libclangCodeGen.so.9+0x2f718d)
58:04.63 #22 0x00007f1684428653 clang::ParseAST(clang::Sema&, bool, bool) (/usr/bin/../lib64/../lib64/libclangParse.so.9+0x32653)
58:04.63 #23 0x00007f1685ec4ad1 clang::FrontendAction::Execute() (/usr/bin/../lib64/libclangFrontend.so.9+0xe8ad1)
58:04.63 #24 0x00007f1685e6503f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/bin/../lib64/libclangFrontend.so.9+0x8903f)
58:04.63 #25 0x00007f1685dd90ec clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/bin/../lib64/libclangFrontendTool.so.9+0x40ec)
58:04.63 #26 0x00000000004112ad cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang-9+0x4112ad)
58:04.64 #27 0x000000000040f3a2 main (/usr/bin/clang-9+0x40f3a2)
58:04.64 #28 0x00007f16856dae5b __libc_start_main (/lib64/libc.so.6+0x23e5b)
58:04.64 #29 0x000000000040c89a _start (/usr/bin/clang-9+0x40c89a)
58:04.64 clang-9: clang-9: error: unable to execute command: Segmentation faulterror: 
58:04.64 unable to execute command: Segmentation fault
58:04.64 clang-9: error: clang-9clang frontend command failed due to signal (use -v to see invocation):
58:04.64 error: clang frontend command failed due to signal (use -v to see invocation)
58:04.64 clang version 9.0.0 (tags/RELEASE_900/final)clang version 9.0.0 (tags/RELEASE_900/final)
58:04.64 Target: Target: x86_64-unknown-linux-gnux86_64-unknown-linux-gnu
58:04.64 Thread model: Thread model: posixposix
58:04.64 InstalledDir: InstalledDir: /usr/bin/usr/bin
58:04.64 clang-9clang-9: : notenote: : diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
58:04.64 
58:04.65 clang-9: note: diagnostic msg:
58:04.65 ********************
58:04.65 PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
58:04.65 Preprocessed source(s) and associated run script(s) are located at:
58:04.65 clang-9: note: diagnostic msg: /tmp/test-array-0b500c.c
58:04.65 clang-9: note: diagnostic msg: /tmp/test-array-0b500c.sh
58:04.65 clang-9: note: diagnostic msg:
58:04.65 ********************
58:04.65 gmake[5]: *** [/storage2/shit/build/firefox-69.0.1/config/rules.mk:730: test-array.o] Error 254
58:04.65 gmake[5]: *** Waiting for unfinished jobs....
58:04.66 clang-9: note: diagnostic msg:
58:04.66 ********************
58:04.66 PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
58:04.66 Preprocessed source(s) and associated run script(s) are located at:
58:04.66 clang-9: note: diagnostic msg: /tmp/test-ctors-bcd301.c
58:04.66 clang-9: note: diagnostic msg: /tmp/test-ctors-bcd301.sh
58:04.66 clang-9: note: diagnostic msg:
58:04.66 ********************
58:04.66 gmake[5]: *** [/storage2/shit/build/firefox-69.0.1/config/rules.mk:730: test-ctors.o] Error 254
58:04.66 gmake[4]: *** [/storage2/shit/build/firefox-69.0.1/config/recurse.mk:101: build/unix/elfhack/libs] Error 2
58:04.66 gmake[3]: *** [/storage2/shit/build/firefox-69.0.1/config/recurse.mk:34: libs] Error 2
58:04.66 gmake[2]: *** [/storage2/shit/build/firefox-69.0.1/config/rules.mk:391: default] Error 2
58:04.66 gmake[1]: *** [Makefile:188: profiledbuild] Error 2
58:04.66 gmake: *** [client.mk:125: build] Error 2
58:04.71 276 compiler warnings present.
58:04.81 /usr/bin/notify-send --app-name=Mozilla Build System Mozilla Build System Build failed

real	58m4.966s
user	332m24.251s
sys	5m24.163s
 
Old 09-30-2019, 07:26 PM   #2
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 394

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
I have a sneaking suspicion that it may work if I --disable-elf hack but that clang-9 segfaulted means something is quite wrong. Moreover, I don't like disabling the "elf hack" because libxul is a mess of relocations. (elf hack improves startup time, and loading of functions from that ridiculous library)
 
Old 09-30-2019, 08:39 PM   #3
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 394

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
Yes, I got through it with --disable-elf-hack (though that's still certainly bad behaviour for a compiler to segfault regardless of what you feed it)

Guess I'll stay with LLVM 9 for now, seeing as it's mostly OK.
 
Old 10-02-2019, 01:32 AM   #4
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 394

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
I think I'm just going to build firefox with gcc from now on. I haven't done it since they switched to clang, but firefox still compiles with gcc, and I'd say I got a better result anyway. Smaller binaries and libraries (especially libxul), and the same or better performance in some quick benchmark tests. I don't have to --disable-elf-hack either. The clang-9 segfault prompted me to try this, so thanks go to LLVM 9 :-)

I built it like this, the same way I always do (except for variables for gcc, including the ar wrapper)

Code:
 . $topsrcdir/browser/config/mozconfig
 export CFLAGS="-march=corei7"
 export CXXFLAGS="-march=corei7"
mk_add_options MOZ_MAKE_FLAGS=-j6
ac_add_options CC=/usr/bin/gcc
ac_add_options CXX=/usr/bin/g++
ac_add_options --prefix=/opt/firefox
ac_add_options --enable-official-branding
ac_add_options --disable-tests
ac_add_options --enable-optimize=-O3
ac_add_options --enable-alsa
ac_add_options --disable-gconf
ac_add_options --disable-crashreporter
ac_add_options AR=/usr/bin/gcc-ar
ac_add_options --enable-linker=gold
ac_add_options NODEJS=/storage2/shit/build/node/bin/node
ac_add_options --enable-lto
ac_add_options MOZ_PGO=1
This is Firefox 69.0.1 using gcc 9.2.0 and toolchain from slackware-current.
 
Old 10-11-2019, 02:04 PM   #5
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 394

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
I was going to let this die, as the solution would be to report this (I've been procrastinating because you have to email for an account to post LLVM bug reports) but I can reproduce this clang-9 segfault in that same place (test-ctors and test-array) every time with Slackware's LLVM 9 packages, my built packages, and also I built LLVM 9 packages for Manjaro yesterday (wanted to move to LLVM 9 for Mesa and the distro is dragging its arse) and tested the same firefox source with the same result. I think it's safe to say it's not anything we're doing wrong.
 
Old 04-06-2020, 11:29 AM   #6
wgianopoulos
LQ Newbie
 
Registered: Apr 2020
Posts: 1

Rep: Reputation: Disabled
OK not sure from your post that my issue and yours are the same but I got this while trying to build 32 bit Mozilla code under a 64 bit linux OS.

I have always been able to do this by adding -m32 to the clang commands inluded in the CC and CXX env variables and then to make rust work add this to .mozconfig.

ac_add_options --target=i686-pc-linux-gnu

sometime in the not so distant past that failed to work and you had to lie about the host OS arch to avoid an ill conceived test to work around by also including this:

ac_add_options --host=i686-pc-linux-gnu

This was always a kludge and I think the cause of your issue. Try letting the system determine the host stuff and do not attempt to override and I bet it will all build correctly!
 
1 members found this post helpful.
Old 04-06-2020, 01:11 PM   #7
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 394

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
Thank you, but I wasn't using --target or --host, that's always determined on the system. I was using -march. It built with -mtune and it also built without elfhack.

The issue was (still is, at least with LLVM 9.0.1... I don't use LLVM 10) that clang crashes during the elfhack constructor tests. I reported it, and it was acknowledged but there were no responses. I don't care if they don't.

For a while, I was building it with gcc and got the best results both in "feel" and in benchmark scores. However, that stopped working correctly with Firefox 71. The PGO+LTO build would complete successfully, but it would just segfault on run. The first build ran for profiling, so it had to be optimizing something out of existence during the profiled build with link time optimization. It built with gcc without PGO+LTO, but there were some javascript errors on console that weren't happening with a LLVM build. Now, building with gcc, it fails to profile because the profiling scripts are LLVM specific. Again, a non PGO+LTO build works with gcc.

Now I have just resigned myself to using LLVM with -mtune=nehalem and that works perfectly, though the results aren't as good as they were with gcc. No big deal, it's happy.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] clang compilation of simple main.c puts both clang and gcc in .comment hoes Linux - Software 2 05-03-2019 05:55 AM
LXer: Students Can Help Improve LLVM & Clang, Make The Kernel Build LXer Syndicated Linux News 0 03-05-2014 12:50 AM
LXer: LLVM Clang 3.3, Early Clang 3.4 Benchmarks LXer Syndicated Linux News 0 06-23-2013 10:00 PM
LXer: Debian Is Still Being Made To Build With LLVM/Clang LXer Syndicated Linux News 0 02-10-2013 01:50 PM
LXer: LLVM/Clang Can Build LibreOffice LXer Syndicated Linux News 0 10-22-2011 02:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration