Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 701362

Summary: dev-lang/rust-bin and virtual/rust should be multilib like dev-lang/rust
Product: Gentoo Linux Reporter: Craig Andrews <candrews>
Component: Current packagesAssignee: Gentoo Rust Project <rust>
Status: CONFIRMED ---    
Severity: normal CC: anton.bugs, candrews, navi, randy
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: ebuild for rust-std-bin

Description Craig Andrews gentoo-dev 2019-11-27 21:38:10 UTC
dev-lang/rust is multlib. dev-lang/rust-bin and virtual/rust should be multilib too.

With an ebuild for a multilib package, the dependency should be:
virtual/rust[${MULTILIB_USEDEP}]
but that doesn't currently work.
A dependency of:
dev-lang/rust[${MULTILIB_USEDEP}]
works fine, but then users can't use dev-lang/rust-bin.

I discovered the need for this change while working on bug 701346.

Reproducible: Always
Comment 1 Craig Andrews gentoo-dev 2019-11-27 22:20:52 UTC
For background, the multilib dep is necessary because without it, on ~amd64 when building multilib targeting 32 bit, rustc fails with this error:
error: can't find crate for 'core'

Installing dev-lang/rust[${MULTILIB_USEDEP}] fixes that problem.
Comment 2 Georgy Yakovlev archtester gentoo-dev 2019-12-26 07:58:16 UTC
there will be no multilib rust-bin.

but I could add multilib for virtuals and those will pull full rust in multilib case, which it already does directly.

new revision for cargo.eclass and virtuals is pending as soon as I test better, likely it'll be included.
Comment 3 Larry the Git Cow gentoo-dev 2019-12-30 09:59:40 UTC
The bug has been referenced in the following commit(s):

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

commit 772470aed21cbb55386e12b8cf02d4ffb5be896a
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2019-12-30 07:35:12 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2019-12-30 09:59:15 +0000

    virtual/rust: add multilib for 1.40.0
    
    Closes: https://github.com/gentoo/gentoo/pull/14177
    Bug: https://bugs.gentoo.org/701362
    Package-Manager: Portage-2.3.84, Repoman-2.3.20
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 virtual/rust/rust-1.40.0.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Comment 4 tt_1 2019-12-30 14:32:22 UTC
Created attachment 601858 [details]
ebuild for rust-std-bin

@Georgy I've been using this ebuild for some time now, you can take it if you want to. Maybe there's a smarter way to handle the file collision, but other than that, it's working. 

the virtual/rust ebuild can be updated to pull in both, rust-bin and rust-std-bin, in one array to satisfy multilib.
Comment 5 Larry the Git Cow gentoo-dev 2019-12-30 15:51:05 UTC
The bug has been referenced in the following commit(s):

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

commit a22d07f4c4d8a1fa3e70e1b79bd20c3f61d74581
Author:     Craig Andrews <candrews@gentoo.org>
AuthorDate: 2019-12-30 15:50:39 +0000
Commit:     Craig Andrews <candrews@gentoo.org>
CommitDate: 2019-12-30 15:50:39 +0000

    net-libs/quiche: use virtual/rust
    
    Use virtual/rust instead of dev-lang/rust
    
    Bug: https://bugs.gentoo.org/show_bug.cgi?id=701362
    Package-Manager: Portage-2.3.84, Repoman-2.3.20
    Signed-off-by: Craig Andrews <candrews@gentoo.org>

 net-libs/quiche/quiche-0.1.0-r1.ebuild | 2 +-
 net-libs/quiche/quiche-9999.ebuild     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 6 Georgy Yakovlev archtester gentoo-dev 2020-03-28 22:31:45 UTC
I managed to get rust-bin install i686 stdlib directly via single ebuild, works fine.
So I will add it after I properly wrap it into multilib eclasses.
Comment 7 Craig Andrews gentoo-dev 2020-04-24 21:03:43 UTC
It's been a bit so...

ping

Thanks!
Comment 8 Georgy Yakovlev archtester gentoo-dev 2020-04-25 01:36:48 UTC
pong, still need some work to do, can't merge half-baked stuff.
Comment 9 Larry the Git Cow gentoo-dev 2020-04-25 06:13:56 UTC
The bug has been referenced in the following commit(s):

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

commit 16e2baa4ab0878a7256c23a35af270fc644e6f08
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-04-25 05:58:18 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-04-25 06:05:51 +0000

    virtual/rust: bump to 1.43.0
    
    Bug: https://bugs.gentoo.org/701362
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 virtual/rust/rust-1.43.0.ebuild | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

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

commit bb80483ead24db59cd1b0df05ac0446a0dde4b0c
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-04-25 02:32:56 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-04-25 06:05:50 +0000

    dev-lang/rust-bin: bump to 1.43.0, multilib on amd64
    
    Bug: https://bugs.gentoo.org/701362
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 dev-lang/rust-bin/Manifest               |  14 +++
 dev-lang/rust-bin/rust-bin-1.43.0.ebuild | 184 +++++++++++++++++++++++++++++++
 2 files changed, 198 insertions(+)

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

commit 766c642811b87c5cead817a597cf79efcdf0c405
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-04-25 02:28:50 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-04-25 06:05:50 +0000

    eclass/rust-toolchain.eclass: add multilib support on amd64
    
    Bug: https://bugs.gentoo.org/701362
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 eclass/rust-toolchain.eclass | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)
Comment 10 Anton Bolshakov 2021-08-01 01:24:21 UTC
Guys,

I'm on amd64 stable profile, and rust-bin doesn't match multilib flags by default.

The current settings are:

virtual/rust ABI_X86="32 (64) (-x32)"
dev-lang/rust  ABI_X86="32 (64) (-x32)"
dev-lang/rust-bin ABI_X86="(64) -32 (-x32)"

Basically, "32" is not enabled, and I can't switch to rust-bin by default.

Can you fix it too please?
Comment 11 Georgy Yakovlev archtester gentoo-dev 2021-08-02 00:07:45 UTC
(In reply to Anton Bolshakov from comment #10)
> Guys,
> 
> I'm on amd64 stable profile, and rust-bin doesn't match multilib flags by
> default.
> 
> The current settings are:
> 
> virtual/rust ABI_X86="32 (64) (-x32)"
> dev-lang/rust  ABI_X86="32 (64) (-x32)"
> dev-lang/rust-bin ABI_X86="(64) -32 (-x32)"
> 
> Basically, "32" is not enabled, and I can't switch to rust-bin by default.
> 
> Can you fix it too please?

just enable the 32 abi for it. you can switch, it's just not default.
there's some work happening of using USE=multilib for it (and being force-enabled on multilib profiles like for gcc) but it has not landed yet.