Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 703470 - dev-lang/rust-1.39.0 w/ system-llvm breaks [overlay] dev-rust/addr2line tests
Summary: dev-lang/rust-1.39.0 w/ system-llvm breaks [overlay] dev-rust/addr2line tests
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Rust Project
Depends on:
Reported: 2019-12-21 09:41 UTC by Kent Fredric (IRC: kent\n) (RETIRED)
Modified: 2019-12-30 09:59 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-12-21 09:41:59 UTC
Hit a bit of an edge case that is likely due to how we compile rust.

To reproduce, you need a local rustup + cargo install, with a "system" toolchain configured using `rustup toolchain link`, as documented in `rustup help toolchain link`


   rustup toolchain link system /usr

And then clone:

( Current commit demonstrating this is dca4b90b8922ece808f71b83b931116a7cc14fb5 )

Then, invoking:

> RUSTFLAGS=" -Cdebuginfo=2 -Copt-level=3" cargo +system test

Will emit failures when the system rust is 1.39.0

But will *Not* emit failures with:

> RUSTFLAGS=" -Cdebuginfo=2 -Copt-level=3" cargo +stable test

When the stable rust is 1.39.0 ( provided by upstream )

The failures are like:

> $ addr2line  --exe /home/kent/rust/forks/addr2line/target/debug/deps/output_equivalence-95ef2c7b90dc37a8 0x134d7 0x136fa 0x33b69 0x302ac 0x618ca
> ??:?

> $ /home/kent/rust/forks/addr2line/target/debug/examples/addr2line  --exe /home/kent/rust/forks/addr2line/target/debug/deps/output_equivalence-95ef2c7b90dc37a8 0x134d7 0x136fa 0x33b69 0x302ac 0x618ca
> ??:0


> $ addr2line -aif --exe /home/kent/rust/forks/addr2line/target/debug/deps/output_equivalence-95ef2c7b90dc37a8 0x134d7 0x136fa 0x33b69 0x302ac 0x618ca
> 0x00000000000618ca
> __rust_maybe_catch_panic
> ??:?

> $ /home/kent/rust/forks/addr2line/target/debug/examples/addr2line -aif --exe /home/kent/rust/forks/addr2line/target/debug/deps/output_equivalence-95ef2c7b90dc37a8 0x134d7 0x136fa 0x33b69 0x302ac 0x618ca
> 0x00000000000618ca
> __rust_maybe_catch_panic
> ??:0

I'm not sure yet if this is related to my use of system-llvm or not.

( the use of git for demonstration is required, as there are other bugs caused by gnu's implementation of addr2line, which are present in 0.10.0, but fixed in git, and to be released in a future version )

Comment 1 Georgy Yakovlev archtester gentoo-dev 2019-12-22 01:34:17 UTC
tested with rust-1.40.0[-system-llvm] and still can reproduce the failure.
rust-bin is fine and not affected.
I'll try to take a look
Comment 2 Georgy Yakovlev archtester gentoo-dev 2019-12-30 09:57:29 UTC
I have good news =D
with those changes it now passes
Comment 3 Larry the Git Cow gentoo-dev 2019-12-30 09:59:43 UTC
The bug has been referenced in the following commit(s):

commit a0449fb463341e064a926929e1c6d1c22b963891
Author:     Georgy Yakovlev <>
AuthorDate: 2019-12-29 10:17:49 +0000
Commit:     Georgy Yakovlev <>
CommitDate: 2019-12-30 09:58:30 +0000

    dev-lang/rust: revbump 1.40.0 with fixes
    add parallel-compiler useflag, to use pass RUSTFLAGS=" -Zthreads=<num>"
    add debian soname patch
    add system-bootstrap
    install rustlib into /usr/lib unconditionally
    drop multilib hacks
    various minor fixes
    add myself to metadata.xml explicitly
    Package-Manager: Portage-2.3.84, Repoman-2.3.20
    Signed-off-by: Georgy Yakovlev <>

 dev-lang/rust/files/1.40.0-add-soname.patch |  36 +++
 dev-lang/rust/metadata.xml                  |   6 +
 dev-lang/rust/rust-1.40.0-r1.ebuild         | 340 ++++++++++++++++++++++++++++
 3 files changed, 382 insertions(+)