Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 800785 - dev-lang/rust-1.53: No rustlib src installed
Summary: dev-lang/rust-1.53: No rustlib src installed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Georgy Yakovlev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-06 07:09 UTC by Matthew Bakhtiari
Modified: 2021-11-12 20:04 UTC (History)
1 user (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 Matthew Bakhtiari 2021-07-06 07:09:32 UTC
To be able to compile linux-next with rust in the future there's an requirement for /usr/lib/rust/1.53.0/lib/rustlib/src/ although that doesn't seem to be installed. Is there a use flag I missed for this?

Reproducible: Always
Comment 1 Georgy Yakovlev archtester gentoo-dev 2021-07-06 08:10:02 UTC
we don't build -none-none target in rust, so it's not present. there is no flag for it yet.

if you provide more information and documentation links, I might be able to add this to ebuilds.
Comment 2 Georgy Yakovlev archtester gentoo-dev 2021-07-06 08:11:10 UTC
just for playing locally with proper targets meanwhile you could use rustup ( we have ebuild for it)
Comment 3 Georgy Yakovlev archtester gentoo-dev 2021-07-06 08:15:28 UTC
but if you want to play with system rust I believe USE=rls will provide src component.

idk how it works, maybe it builds proper stdlib from the src component. in that case it may work and I can make it a separate useflag.
Comment 4 Matthew Bakhtiari 2021-07-21 15:55:23 UTC
The USE=rls added it correctly, if download a linux-next tarball from git.kernel.org and try to compile it with CONFIG_RUST=y it looks for the rust core lib. In /usr/lib/rust/${PV}/lib/rustlib/src/

For context the commit I tested was #b1347210b01daa977ea980268927aa99198ceccc.
Comment 5 Matthew Bakhtiari 2021-07-21 16:09:26 UTC
Looks like there's also an new package needed, its bindgen on crates.io. I made a simple ebuild for that here https://github.com/DankDumpster/gentoo-overlay/blob/master/dev-util/bindgen/bindgen-0.59.0.ebuild
Comment 6 Georgy Yakovlev archtester gentoo-dev 2021-11-09 01:41:31 UTC
there has been a request to add src component to bin too, so maybe we'll split src component to it's own flag for consistency and REQUIRED_USE it for rls
Comment 7 Larry the Git Cow gentoo-dev 2021-11-12 19:42:37 UTC
The bug has been referenced in the following commit(s):

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

commit 144bf206556b77df750f5c79917d9dc8c4322242
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2021-11-12 19:37:22 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2021-11-12 19:41:11 +0000

    dev-lang/rust-bin: add rust-src useflag
    
    This is useful for many developer tools and for build-std too.
    linux-next rust code also requires this to be installed.
    
    Bug: https://bugs.gentoo.org/800785
    Bug: https://bugs.gentoo.org/819786
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 dev-lang/rust-bin/Manifest               |  1 +
 dev-lang/rust-bin/metadata.xml           |  1 +
 dev-lang/rust-bin/rust-bin-1.56.1.ebuild | 30 ++++++++++++++++++++++++++----
 3 files changed, 28 insertions(+), 4 deletions(-)
Comment 8 Larry the Git Cow gentoo-dev 2021-11-12 20:01:55 UTC
The bug has been referenced in the following commit(s):

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

commit d2e9fc2c57ca98303914d5632c20edce74f846a6
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2021-11-12 19:56:17 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2021-11-12 20:01:35 +0000

    dev-lang/rust: add rust-src useflag
    
    previously 'src' component was installed by 'rls' useflag.
    let's split it out for people who want 'src' but don't need rls.
    
    Bug: https://bugs.gentoo.org/800785
    Bug: https://bugs.gentoo.org/819786
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 dev-lang/rust/metadata.xml       | 1 +
 dev-lang/rust/rust-1.56.1.ebuild | 8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)
Comment 9 Georgy Yakovlev archtester gentoo-dev 2021-11-12 20:04:30 UTC
I'll be closing this one.

rust prior to 1.56.1 will get src if USE=rls enabled

starting for 1.56.1 (stable very soon) both rust and rust-bin have 'rust-src' useflag, so use this to install src components.


USE=rls for rust will require USE=rust-src