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
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Rust Project
URL: https://github.com/gimli-rs/addr2line...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-21 09:41 UTC by Kent Fredric (IRC: kent\n) (RETIRED)
Modified: 2024-02-11 06:00 UTC (History)
2 users (show)

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


Attachments

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`

eg:

   rustup toolchain link system /usr

And then clone: https://github.com/gimli-rs/addr2line

( 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


and 

> $ 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 )

See: https://github.com/gimli-rs/addr2line/issues/154
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 https://github.com/gentoo/gentoo/pull/14177 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):

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

commit a0449fb463341e064a926929e1c6d1c22b963891
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2019-12-29 10:17:49 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
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
    
    Bug: https://bugs.gentoo.org/694248
    Bug: https://bugs.gentoo.org/703744
    Bug: https://bugs.gentoo.org/703470
    Package-Manager: Portage-2.3.84, Repoman-2.3.20
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 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(+)