Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 923278 - dev-lang/rust-1.74.1[lto] fails to compile on x86: error: could not compile `rustc_driver` (lib) (thread 'fatal runtime error: Rust cannot catch foreign exceptions coordinator' panicked)
Summary: dev-lang/rust-1.74.1[lto] fails to compile on x86: error: could not compile ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto 920441
  Show dependency tree
 
Reported: 2024-01-29 16:59 UTC by matoro
Modified: 2024-03-04 07:02 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log and emerge --info (build.log.xz,464.40 KB, application/x-xz)
2024-01-29 17:00 UTC, matoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matoro archtester 2024-01-29 16:59:47 UTC
This error seems to affect crates lock_api-0.4.10 and memoffset-0.9.0.  Logs are in xz, didn't fit under gz.

[lock_api 0.4.10] [RUSTC-SHIM] rustc probe0 working directory: /var/tmp/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src/vendor/lock_api
[lock_api 0.4.10] [RUSTC-SHIM] rustc probe0 command: "LD_LIBRARY_PATH"="/var/tmp/portage/dev-lang/rust-1.74.1/work/rust-stage0/lib:/var/tmp/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src/build/i686-unknown-linux-gnu/stage0-rustc/release/deps:/var/tmp/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src/build/i686-unknown-linux-gnu/stage0-rustc/release:/var/tmp/portage/dev-lang/rust-1.74.1/work/rust-stage0/lib/rustlib/i686-unknown-linux-gnu/lib" LD_LIBRARY_PATH="/var/tmp/portage/dev-lang/rust-1.74.1/work/rust-stage0/lib:/var/tmp/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src/build/i686-unknown-linux-gnu/stage0-rustc/release/deps:/var/tmp/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src/build/i686-unknown-linux-gnu/stage0-rustc/release:/var/tmp/portage/dev-lang/rust-1.74.1/work/rust-stage0/lib/rustlib/i686-unknown-linux-gnu/lib" "/var/tmp/portage/dev-lang/rust-1.74.1/work/rust-stage0/bin/rustc" "--crate-name" "probe0" "--crate-type=lib" "--out-dir" "/var/tmp/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src/build/i686-unknown-linux-gnu/stage0-rustc/i686-unknown-linux-gnu/release/build/lock_api-17deda1535fe4659/out" "--emit=llvm-ir" "--target" "i686-unknown-linux-gnu" "--cfg=bootstrap" "--cfg=windows_raw_dylib" "-Csymbol-mangling-version=v0" "-Zunstable-options" "--check-cfg=values(bootstrap)" "--check-cfg=values(parallel_compiler)" "--check-cfg=values(target_os,\"hurd\")" "--check-cfg=values(no_btreemap_remove_entry)" "--check-cfg=values(crossbeam_loom)" "--check-cfg=values(span_locations)" "--check-cfg=values(rustix_use_libc)" "--check-cfg=values(emulate_second_only_system)" "--check-cfg=values(windows_raw_dylib)" "-Zmacro-backtrace" "-Csplit-debuginfo=off" "-Zunstable-options" "-Wrustc::internal" "-Cprefer-dynamic" "-" "-Wrust_2018_idioms" "-Wunused_lifetimes" "-Wsemicolon_in_expressions_from_macros" "-Dwarnings" "--sysroot" "/var/tmp/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src/build/i686-unknown-linux-gnu/stage0-sysroot" "-Ztls-model=initial-exec" "--remap-path-prefix" "/var/tmp/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src=/rustc/a28077b28a02b92985b3a3faecf92813155f1ea1" "-Z" "force-unstable-if-unmarked"
[lock_api 0.4.10] [RUSTC-SHIM] rustc probe0 sysroot: "/var/tmp/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src/build/i686-unknown-linux-gnu/stage0-sysroot"
[lock_api 0.4.10] [RUSTC-SHIM] rustc probe0 libdir: "/var/tmp/portage/dev-lang/rust-1.74.1/work/rust-stage0/lib"
[lock_api 0.4.10] error: unexpected condition value `linux` for condition name `target_os`
[lock_api 0.4.10]   |
[lock_api 0.4.10]   = help: was set with `--cfg` but isn't in the `--check-cfg` expected values
[lock_api 0.4.10]   = note: `-D unexpected-cfgs` implied by `-D warnings`
[lock_api 0.4.10] 
[lock_api 0.4.10] error: aborting due to previous error
[lock_api 0.4.10] 
[lock_api 0.4.10] 
[lock_api 0.4.10] Did not run successfully: exit status: 1

Reproducible: Always
Comment 1 matoro archtester 2024-01-29 17:00:26 UTC
Created attachment 883568 [details]
build.log and emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-04 06:14:26 UTC
I haven't yet been able to find anything at all about this upstream...
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-04 06:26:52 UTC
It's got to be related to https://github.com/rust-lang/rust/issues/120701.

I don't see anything in recent lock_api or memoffset commits..

It looks like memoffset got removed too: https://github.com/rust-lang/rust/commit/28e60de4879786a02c215f83f8ba96f474bcbcaa, which is why 1.75.0 may be fine.

matoro do newer versions work?
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-04 06:43:09 UTC
In your log, there's also:
```
thread 'fatal runtime error: Rust cannot catch foreign exceptions
coordinator' panicked at compiler/rustc_middle/src/util/bug.rs:36:26:
/rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/compiler/rustc_codegen_ssa/src/back/write.rs:1594:29: worker thread panicked
stack backtrace:
rustc exited with signal: 6 (SIGABRT) (core dumped)
error: could not compile `rustc_driver` (lib)

Caused by:

Did not run successfully: signal: 6 (SIGABRT) (core dumped)
```

...
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-04 06:45:09 UTC
Ah, USE=lto.
Comment 6 Larry the Git Cow gentoo-dev 2024-03-04 06:52:39 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e79b4fdb86877d73cbd33ae19dc4eb1be6a1ea5

commit 3e79b4fdb86877d73cbd33ae19dc4eb1be6a1ea5
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-03-04 06:51:04 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-03-04 06:51:20 +0000

    profiles/arch/x86: mask >=dev-lang/rust-1.74.1[lto]
    
    Miscompiles rust and fails to bootstrap.
    
    Closes: https://bugs.gentoo.org/923278
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/arch/x86/package.use.mask | 4 ++++
 1 file changed, 4 insertions(+)