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
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.
just for playing locally with proper targets meanwhile you could use rustup ( we have ebuild for it)
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.
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.
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
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
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(-)
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(-)
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