Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 872815 - dev-lang/rust-1.64.0 Is not installing i686-unknown-linux-gnu when abi_x86_32 is set
Summary: dev-lang/rust-1.64.0 Is not installing i686-unknown-linux-gnu when abi_x86_32...
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: PullRequest
Depends on:
Blocks: 872560
  Show dependency tree
 
Reported: 2022-09-25 11:11 UTC by Mike Lothian
Modified: 2022-10-10 17:07 UTC (History)
3 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 Mike Lothian 2022-09-25 11:11:36 UTC
This means librsvg with abi_x86_32 can't compile and complains about 

   Compiling once_cell v1.13.1
     Running `rustc --crate-name once_cell --edition=2018 /var/tmp/portage/gnome-base/librsvg-2.54.5/work/librsvg-2.54.5/vendor/once_cell/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="alloc"' --cfg 'feature="default"' --cfg 'feature="race"' --cfg 'feature="std"' -C metadata=640a955df570f712 -C extra-filename=-640a955df570f712 --out-dir /var/tmp/portage/gnome-base/librsvg-2.54.5/work/librsvg-2.54.5-abi_x86_32.x86/target/i686-unknown-linux-gnu/release/deps --target i686-unknown-linux-gnu -L dependency=/var/tmp/portage/gnome-base/librsvg-2.54.5/work/librsvg-2.54.5-abi_x86_32.x86/target/i686-unknown-linux-gnu/release/deps -L dependency=/var/tmp/portage/gnome-base/librsvg-2.54.5/work/librsvg-2.54.5-abi_x86_32.x86/target/release/deps --cap-lints allow`
     Running `rustc --crate-name cfg_if --edition=2018 /var/tmp/portage/gnome-base/librsvg-2.54.5/work/librsvg-2.54.5/vendor/cfg-if/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=fecf51950bda6d10 -C extra-filename=-fecf51950bda6d10 --out-dir /var/tmp/portage/gnome-base/librsvg-2.54.5/work/librsvg-2.54.5-abi_x86_32.x86/target/i686-unknown-linux-gnu/release/deps --target i686-unknown-linux-gnu -L dependency=/var/tmp/portage/gnome-base/librsvg-2.54.5/work/librsvg-2.54.5-abi_x86_32.x86/target/i686-unknown-linux-gnu/release/deps -L dependency=/var/tmp/portage/gnome-base/librsvg-2.54.5/work/librsvg-2.54.5-abi_x86_32.x86/target/release/deps --cap-lints allow`
error[E0463]: can't find crate for `std`
  |
  = note: the `i686-unknown-linux-gnu` target may not be installed
  = help: consider downloading the target with `rustup target add i686-unknown-linux-gnu`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`


Reproducible: Always
Comment 1 Mike Lothian 2022-09-25 12:04:09 UTC
I'm trying the following change just to see if reverting back to the way 1.63.0 does things can fix it

diff --git a/dev-lang/rust/rust-1.64.0.ebuild b/dev-lang/rust/rust-1.64.0.ebuild
index 56da519..7da880e 100644
--- a/dev-lang/rust/rust-1.64.0.ebuild
+++ b/dev-lang/rust/rust-1.64.0.ebuild
@@ -286,14 +286,13 @@ src_configure() {
        use system-llvm && filter-flags '-flto*' # https://bugs.gentoo.org/862109
 
        local rust_target="" rust_targets="" arch_cflags use_libcxx="false"
-       local chost_target="$(get_abi_CHOST ${v##*.})"
 
        # Collect rust target names to compile standard libs for all ABIs.
        for v in $(multilib_get_enabled_abi_pairs); do
-               rust_targets+=",\"$(rust_abi ${chost_target})\""
+               rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
        done
        if use wasm; then
-               rust_targets+=",\"wasm32-unknown-unknown\""
+               rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
                if use system-llvm; then
                        # un-hardcode rust-lld linker for this target
                        # https://bugs.gentoo.org/715348
Comment 2 Mike Lothian 2022-09-25 12:04:17 UTC
I'm trying the following change just to see if reverting back to the way 1.63.0 does things can fix it

diff --git a/dev-lang/rust/rust-1.64.0.ebuild b/dev-lang/rust/rust-1.64.0.ebuild
index 56da519..7da880e 100644
--- a/dev-lang/rust/rust-1.64.0.ebuild
+++ b/dev-lang/rust/rust-1.64.0.ebuild
@@ -286,14 +286,13 @@ src_configure() {
        use system-llvm && filter-flags '-flto*' # https://bugs.gentoo.org/862109
 
        local rust_target="" rust_targets="" arch_cflags use_libcxx="false"
-       local chost_target="$(get_abi_CHOST ${v##*.})"
 
        # Collect rust target names to compile standard libs for all ABIs.
        for v in $(multilib_get_enabled_abi_pairs); do
-               rust_targets+=",\"$(rust_abi ${chost_target})\""
+               rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
        done
        if use wasm; then
-               rust_targets+=",\"wasm32-unknown-unknown\""
+               rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
                if use system-llvm; then
                        # un-hardcode rust-lld linker for this target
                        # https://bugs.gentoo.org/715348
Comment 3 Mike Lothian 2022-09-25 12:05:42 UTC
https://github.com/gentoo/gentoo/pull/27447 is the PR
Comment 4 Larry the Git Cow gentoo-dev 2022-09-25 17:28:56 UTC
The bug has been closed via the following commit(s):

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

commit 3d08936b268a0b83d91b2085c8588b6e3cbe88bc
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2022-09-25 17:24:43 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2022-09-25 17:25:24 +0000

    dev-lang/rust: fix alt-abi support, filter out flto in 1.64.0
    
    Bug: https://bugs.gentoo.org/866231
    Closes: https://bugs.gentoo.org/872815
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 dev-lang/rust/{rust-1.64.0.ebuild => rust-1.64.0-r1.ebuild} | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Comment 5 Georgy Yakovlev archtester gentoo-dev 2022-09-25 17:29:55 UTC
thanks, just logic error, needed to move it inside the loop