Created attachment 561922 [details] emerge --info dev-lang/rust sys-apps/exa-0.8.0-r1 sys-apps/fd-7.2.0 app-shells/mcfly-0.3.1 x11-terms/alacritty-0.2.5 app-crypt/nitrocli-0.2.2 fail to compile. typical error is Caused by: process didn't exit successfully: `rustc --edition=2018 --crate-name nitrocli src/main.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=z -C lto -C codegen-units=1 -C metadata=bba3e5d8b6e944ea -C extra-filename=-bba3e5d8b6e944ea --out-dir /tmp/portage/app-crypt/nitrocli-0.2.2/work/nitrocli-0.2.2/target/release/deps -L dependency=/tmp/portage/app-crypt/nitrocli-0.2.2/work/nitrocli-0.2.2/target/release/deps --extern argparse=/tmp/portage/app-crypt/nitrocli-0.2.2/work/nitrocli-0.2.2/target/release/deps/libargparse-c2ce5b30c47b6d5d.rlib --extern base32=/tmp/portage/app-crypt/nitrocli-0.2.2/work/nitrocli-0.2.2/target/release/deps/libbase32-491c5bf74123b5aa.rlib --extern libc=/tmp/portage/app-crypt/nitrocli-0.2.2/work/nitrocli-0.2.2/target/release/deps/liblibc-ce41426138398c3f.rlib --extern nitrokey=/tmp/portage/app-crypt/nitrocli-0.2.2/work/nitrocli-0.2.2/target/release/deps/libnitrokey-a04293839eb89327.rlib -L native=/tmp/portage/app-crypt/nitrocli-0.2.2/work/nitrocli-0.2.2/target/release/build/nitrokey-sys-5e01d89953a692ea/out` (signal: 11, SIGSEGV: invalid memory reference)
currently rebuilding without system-llvm to check if it does make any difference.
Created attachment 561924 [details] emerge --info llvm
disabling system-llvm solves problem and all packages compile fine. also rust-bin is fine.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d677f9472c401dc87721904b156d6857ef62551f commit d677f9472c401dc87721904b156d6857ef62551f Author: Patrick McLean <patrick.mclean@sony.com> AuthorDate: 2019-01-18 19:39:10 +0000 Commit: Patrick McLean <chutzpah@gentoo.org> CommitDate: 2019-01-18 19:40:09 +0000 dev-lang/rust: Disable system-llvm USE flag in 1.32.0 (bug #675752) Add "!system-llvm" to REQUIRED_USE since 1.32.0 pulls in a git version of llvm to fix the segfault. Also bump the llvm dep to >=7 since 7 is required now. Bug: https://bugs.gentoo.org/675752 Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.56, Repoman-2.3.12 Signed-off-by: Patrick McLean <chutzpah@gentoo.org> dev-lang/rust/rust-1.32.0.ebuild | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Patrick: are you investigating to see if we can take a fix into our LLVM builds for this? Disabling system-llvm like this is a bit sad.
Dirkjan: I poked around commit histories a bit, as far as I can tell there were several fixes upstream they wanted, they weren't entirely clear as to which ones. The update was to a particular git revision upstream, rather than pulling in particular fixes.
Now I am getting: CMake Error at cmake/modules/AddLLVM.cmake:459 (add_library): Cannot find source file: /usr/include/cblas.h Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx Call Stack (most recent call first): cmake/modules/AddLLVM.cmake:622 (llvm_add_library) lib/Support/CMakeLists.txt:47 (add_llvm_library) CMake Error at cmake/modules/AddLLVM.cmake:459 (add_library): Cannot find source file: /usr/include/cblas.h Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx Call Stack (most recent call first): cmake/modules/AddLLVM.cmake:622 (llvm_add_library) lib/WindowsManifest/CMakeLists.txt:8 (add_llvm_library) CMake Error at cmake/modules/AddLLVM.cmake:459 (add_library): No SOURCES given to target: LLVMSupport Call Stack (most recent call first): cmake/modules/AddLLVM.cmake:622 (llvm_add_library) lib/Support/CMakeLists.txt:47 (add_llvm_library) CMake Error at cmake/modules/AddLLVM.cmake:459 (add_library): No SOURCES given to target: LLVMWindowsManifest Call Stack (most recent call first): cmake/modules/AddLLVM.cmake:622 (llvm_add_library) lib/WindowsManifest/CMakeLists.txt:8 (add_llvm_library)
(In reply to Larry the Git Cow from comment #4) > Add "!system-llvm" to REQUIRED_USE since 1.32.0 pulls in a git version > of llvm to fix the segfault. Please revert this ASAP already. It breaks emerge -uDvp @world and co and forces people to remove the system-llvm from their package.use, to never know when it can be enabled again (and forgetting about it). Just put >=dev-lang/rust-1.32.0 system-llvm with an appropriate reason comment in profiles/base/package.use.mask instead.
I switched required use to use.mask. forgot to reference bug in commit message of course.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d50382655a40e343363d82b7c371a06660b9bdf8 commit d50382655a40e343363d82b7c371a06660b9bdf8 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2019-01-19 20:14:10 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2019-01-19 20:20:52 +0000 dev-lang/rust: fix configure of bundled LLVM Bug: https://bugs.gentoo.org/675752 Package-Manager: Portage-2.3.56, Repoman-2.3.12 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> .../1.32.0-fix-configure-of-bundled-llvm.patch | 32 ++++++++++++++++++++++ dev-lang/rust/rust-1.32.0.ebuild | 5 +++- 2 files changed, 36 insertions(+), 1 deletion(-)
*** Bug 675890 has been marked as a duplicate of this bug. ***
*** Bug 675902 has been marked as a duplicate of this bug. ***
Unfortunately, thunderbird still fail to compile: 21:36.39 Compiling gkrust-shared v0.1.0 (/var/tmp/portage/mail-client/thunderbird-60.4.0/work/thunderbird-60.4.0/toolkit/library/rust/shared) 21:36.71 Compiling gkrust v0.1.0 (/var/tmp/portage/mail-client/thunderbird-60.4.0/work/thunderbird-60.4.0/toolkit/library/rust) 22:11.89 error: Could not compile `gkrust`. 22:11.89 22:11.89 Caused by: 22:11.89 process didn't exit successfully: `/usr/bin/rustc --crate-name gkrust toolkit/library/rust/lib.rs --color always --crate-type staticlib --emit=dep-info,link -C opt-level=2 -C panic=abort -C codegen-units=1 -C lto --cfg 'feature="bindgen"' --cfg 'feature="cubeb-remoting"' --cfg 'feature="cubeb_pulse_rust"' --cfg 'feature="gkrust-shared"' --cfg 'feature="no-static-ideograph-encoder-tables"' --cfg 'feature="servo"' -C metadata=2793b090970bb261 -C extra-filename=-2793b090970bb261 --out-dir /var/tmp/portage/mail-client/thunderbird-60.4.0/work/thunderbird-60.4.0/tbird/toolkit/library/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C linker=/var/tmp/portage/mail-client/thunderbird-60.4.0/work/thunderbird-60.4.0/build/cargo-linker -L dependency=/var/tmp/portage/mail-client/thunderbird-60.4.0/work/thunderbird-60.4.0/tbird/toolkit/library/x86_64-unknown-linux-gnu/release/deps -L dependency=/var/tmp/portage/mail-client/thunderbird-60.4.0/work/thunderbird-60.4.0/tbird/toolkit/library/release/deps --extern gkrust_shared=/var/tmp/portage/mail-client/thunderbird-60.4.0/work/thunderbird-60.4.0/tbird/toolkit/library/x86_64-unknown-linux-gnu/release/deps/libgkrust_shared-a5c4865dba56186b.rlib -C opt-level=2` (signal: 11, SIGSEGV: invalid memory reference) 1.32.0-fix-configure-of-bundled-llvm.patch it is applied to rust-1.32.0 No special case here, just that rust with system-llvm compile time is much shorter.
(In reply to Cănărău Constantin from comment #13) > Unfortunately, thunderbird still fail to compile: > 1.32.0-fix-configure-of-bundled-llvm.patch it is applied to rust-1.32.0 > > No special case here, just that rust with system-llvm compile time is much > shorter. This commit should have had better explanation. It does not fix system-llvm unfortunately. It fixes another issue with finding headers. So system-llvm is still broken (and masked) so please don't use it. We'll unmask it if we get it fixed.
(In reply to Georgy Yakovlev from comment #14) > > This commit should have had better explanation. > > It does not fix system-llvm unfortunately. It fixes another issue with > finding headers. > > So system-llvm is still broken (and masked) so please don't use it. We'll > unmask it if we get it fixed. Ok. Thank you for explanation.
Created attachment 562836 [details, diff] rust-1.32.0-system-llvm-7-SIGSEGV.patch this patch fixes compiling packages with rust[system-llvm] for me. can you guys give it a try and report here?
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5346e2504a4c5ed64fbb41cc92b9a3095d59a656 commit 5346e2504a4c5ed64fbb41cc92b9a3095d59a656 Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2019-01-26 01:16:31 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2019-01-26 03:35:22 +0000 profiles: remove system-llvm usemask for rust Closes: https://bugs.gentoo.org/675752 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> profiles/base/package.use.mask | 4 ---- 1 file changed, 4 deletions(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34783cfa9869949d36d723bcdf0039f3308abee8 commit 34783cfa9869949d36d723bcdf0039f3308abee8 Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2019-01-26 01:13:29 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2019-01-26 02:58:35 +0000 dev-lang/rust: fix segfaults with system llvm:7 Bug: https://bugs.gentoo.org/675752 Package-Manager: Portage-2.3.57, Repoman-2.3.12 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> .../rust/files/1.32.0-system-llvm-7-SIGSEGV.patch | 33 ++++++++++++++++++++++ dev-lang/rust/rust-1.32.0.ebuild | 1 + 2 files changed, 34 insertions(+)
Yes, builds here now fine. [ebuild R ] sys-devel/llvm-7.0.1:7::gentoo USE="gold libffi ncurses xml -debug -doc -exegesis -libedit -test -xar" ABI_X86="(64) -32 (-x32)" LLVM_TARGETS="AMDGPU BPF NVPTX (X86) -AArch64 -ARM -Hexagon -Lanai -MSP430 -Mips -PowerPC -Sparc -SystemZ -XCore" 0 KiB [ebuild R ] dev-lang/rust-1.32.0:stable/1.32::gentoo USE="system-llvm -clippy -debug -doc -libressl -rls -rustfmt -wasm" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="sse2" LLVM_TARGETS="(X86) -AArch64 -AMDGPU -ARM -BPF -Hexagon -Lanai -MSP430 -Mips -NVPTX -PowerPC -Sparc -SystemZ -XCore" 0 KiB Thanks!
Still broken. https://bugs.gentoo.org/676278 [ebuild R ] sys-devel/llvm-7.0.1:7::gentoo USE="libffi ncurses -debug -doc -exegesis -gold -libedit -test -xar -xml" LLVM_TARGETS="AMDGPU BPF NVPTX (X86) -AArch64 -ARM -Hexagon -Lanai -MSP430 -Mips -PowerPC -Sparc -SystemZ -XCore" [ebuild R ] dev-lang/rust-1.32.0:stable/1.32::gentoo USE="system-llvm* -clippy -debug -doc -libressl -rls -rustfmt -wasm" CPU_FLAGS_X86="sse2" LLVM_TARGETS="(X86) -AArch64 -AMDGPU -ARM -BPF -Hexagon -Lanai -MSP430 -Mips -NVPTX -PowerPC -Sparc -SystemZ -XCore"
(In reply to reagentoo from comment #19) > Still broken. > > https://bugs.gentoo.org/676278 > > [ebuild R ] sys-devel/llvm-7.0.1:7::gentoo USE="libffi ncurses -debug > -doc -exegesis -gold -libedit -test -xar -xml" LLVM_TARGETS="AMDGPU BPF > NVPTX (X86) -AArch64 -ARM -Hexagon -Lanai -MSP430 -Mips -PowerPC -Sparc > -SystemZ -XCore" > > [ebuild R ] dev-lang/rust-1.32.0:stable/1.32::gentoo USE="system-llvm* > -clippy -debug -doc -libressl -rls -rustfmt -wasm" CPU_FLAGS_X86="sse2" > LLVM_TARGETS="(X86) -AArch64 -AMDGPU -ARM -BPF -Hexagon -Lanai -MSP430 -Mips > -NVPTX -PowerPC -Sparc -SystemZ -XCore" At least for me and for josef.95 (see comment 18), it is not broken anymore. I presume you still encounter errors because you have not yet recompiled rust, use change is not yet applied, see: system-llvm* Please recompile rust and try again.
(In reply to Cănărău Constantin from comment #20) > (In reply to reagentoo from comment #19) > At least for me and for josef.95 (see comment 18), it is not broken anymore. > I presume you still encounter errors because you have not yet recompiled > rust, use change is not yet applied, see: system-llvm* > Please recompile rust and try again. What does it mean "you have not yet recompiled rust"? I've got same error in system without installed rust: [ebuild N ] dev-lang/rust-1.32.0:stable/1.32::gentoo USE="system-llvm -clippy -debug -doc -libressl -rls -rustfmt -wasm" CPU_FLAGS_X86="sse2" LLVM_TARGETS="(X86) -AArch64 -AMDGPU -ARM -BPF -Hexagon -Lanai -MSP430 -Mips -NVPTX -PowerPC -Sparc -SystemZ -XCore"
(In reply to reagentoo from comment #21) > > What does it mean "you have not yet recompiled rust"? > I've got same error in system without installed rust: > > [ebuild N ] dev-lang/rust-1.32.0:stable/1.32::gentoo USE="system-llvm > -clippy -debug -doc -libressl -rls -rustfmt -wasm" CPU_FLAGS_X86="sse2" > LLVM_TARGETS="(X86) -AArch64 -AMDGPU -ARM -BPF -Hexagon -Lanai -MSP430 -Mips > -NVPTX -PowerPC -Sparc -SystemZ -XCore" In previous comment you have had: [ebuild R ] dev-lang/rust-1.32.0:stable/1.32::gentoo USE="system-llvm* ... Notice the asterix in system-llvm* - so I presumed that right now, your rust is compiled *without* system-llvm flag, so, if you recompile rust, it will be compiled *with* system-llvm flag and, probably, error will be gone. Due to this bug, at least two patches have been added to rust-1.32.0 without version bump, so it is a good idea to sync portage, recompile rust and see if error is still present. Maybe it will fix the error in your case, maybe not, but there are two confirmations (including me) that original error (signal: 11, SIGSEGV: invalid memory reference) is gone.
(In reply to Cănărău Constantin from comment #22) > Due to this bug, at least two patches have been added to rust-1.32.0 without > version bump, so it is a good idea to sync portage, recompile rust and see > if error is still present. Maybe it will fix the error in your case, maybe > not, but there are two confirmations (including me) that original error > (signal: 11, SIGSEGV: invalid memory reference) is gone. If it helps, I have now re-compiled rust-1.32.0 with the system-llvm flag re-enabled and used it to recompile firefox-64.0.2 (my ?only use for rust), which I'm using to write this.
(In reply to Cănărău Constantin from comment #22) > (In reply to reagentoo from comment #21) > > Due to this bug, at least two patches have been added to rust-1.32.0 without > version bump, so it is a good idea to sync portage, recompile rust and see > if error is still present. Maybe it will fix the error in your case, maybe > not, but there are two confirmations (including me) that original error > (signal: 11, SIGSEGV: invalid memory reference) is gone. I have synced portage tree. But I don't see any SIGSEGV in my build.log. May be it's another problem. https://bugs.gentoo.org/676278