Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 672816 - >=dev-lang/rust-1.31.0 installs `codegen-backends` folder in wrong path (in some cases)
Summary: >=dev-lang/rust-1.31.0 installs `codegen-backends` folder in wrong path (in s...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal with 2 votes (vote)
Assignee: Georgy Yakovlev
URL: https://github.com/rust-lang/rust-ins...
Whiteboard:
Keywords:
: 686740 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-12-09 14:08 UTC by tka
Modified: 2020-07-12 19:10 UTC (History)
12 users (show)

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


Attachments
build.log (build.log,6.37 KB, text/plain)
2018-12-09 14:08 UTC, tka
Details
Working build.log x86 (build.log,5.21 KB, text/plain)
2018-12-12 23:12 UTC, Thomas Deutschmann (RETIRED)
Details
dev-lang:rust-1.30.1-r1.log.gz (dev-lang:rust-1.30.1-r1:20181213-034335.log.gz,81.05 KB, application/gzip)
2018-12-14 21:31 UTC, LE GARREC Vincent
Details
config.toml (config.toml,980 bytes, text/plain)
2018-12-29 16:48 UTC, tka
Details
rustc-1.32.0-src/build/tmp/dist/rustc-1.32.0-i686-unknown-linux-gnu/install.sh (install.sh,27.23 KB, text/plain)
2019-01-31 07:52 UTC, tka
Details
rustc-1.32.0-src/build/tmp/dist/rustc-1.32.0-i686-unknown-linux-gnu/rustc/manifest.in (manifest.in,1.99 KB, text/plain)
2019-01-31 07:54 UTC, tka
Details
build.log.xz for rust-1.35.0 (build.log.xz,60.43 KB, application/x-xz)
2019-06-17 19:20 UTC, tka
Details
output from equery f =dev-lang/rust-1.35.0 (rust-1.35.0-i686,15.20 KB, text/plain)
2019-07-09 15:28 UTC, tt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tka 2018-12-09 14:08:07 UTC
Created attachment 557400 [details]
build.log

>>> Compiling source in /var/tmp/portage/dev-util/cbindgen-0.6.7/work/cbindgen-0.6.7 ...
error: process didn't exit successfully: `rustc -vV` (exit code: 1)
--- stdout
rustc 1.31.0
binary: rustc
commit-hash: unknown
commit-date: unknown
host: i686-unknown-linux-gnu
release: 1.31.0

--- stderr
error: failed to find a `codegen-backends` folder in the sysroot candidates:
* /usr
* /usr/lib


 * ERROR: dev-util/cbindgen-0.6.7::gentoo failed (compile phase):
 *   cargo build failed
 * 
 * Call stack:
 *     ebuild.sh, line 124:  Called src_compile
 *   environment, line 617:  Called cargo_src_compile
 *   environment, line 378:  Called die
 * The specific snippet of code:
 *       cargo build -j $(makeopts_jobs) $(usex debug "" --release) || die "cargo build failed"
 *
Comment 1 tka 2018-12-09 14:08:38 UTC
# emerge -pqv '=dev-util/cbindgen-0.6.7::gentoo'
[ebuild  N    ] dev-util/cbindgen-0.6.7  USE="-debug" 


# emerge --info '=dev-util/cbindgen-0.6.7::gentoo'
Portage 2.3.52 (python 3.6.6-final-0, default/linux/x86/17.0/hardened, gcc-8.2.0, glibc-2.28-r2, 4.19.8 i686)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.19.8-i686-Intel-R-_Pentium-R-_4_CPU_2.80GHz-with-gentoo-2.6
KiB Mem:     2035080 total,    172140 free
KiB Swap:   16777212 total,  16695284 free
Timestamp of repository gentoo: Sun, 09 Dec 2018 13:00:01 +0000
Head commit of repository gentoo: db1ad1673e97b82cc1c2b23f4ad420cee7fe7d07
sh bash 4.4_p23
ld GNU ld (Gentoo 2.31.1 p4) 2.31.1
app-shells/bash:          4.4_p23::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.6::gentoo
dev-util/cmake:           3.13.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.40.2::gentoo
sys-apps/sandbox:         2.14::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r2::gentoo
sys-devel/gcc:            5.4.0-r6::gentoo, 8.2.0-r5::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.28-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24

local
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -mtune=native -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.2/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -mtune=native -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n --with-bdeps=y"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs cgroup collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
LINGUAS=""
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 acl acpi alsa apache2 bzip2 cairo caps cdda cddb cdparanoia crypt cxx dbus dri dts dvd fam ffmpeg fftw flac fontconfig gd gif gimp gmp gnutls gtk hardened iconv icu idn ipv6 java jpeg lame lcms libnotify libtirpc mad matroska mmap mmx mp3 mpeg ncurses nptl ogg opengl openmp pam pcre php pic pie png policykit ppds readline sasl sdl seccomp sse sse2 ssl ssp startup-notification svg theora threads tiff truetype udev udisks unicode upower vorbis x264 x86 xattr xcb xml xtpax xv xvid zlib" ABI_X86="32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby23 ruby24" USERLAND="GNU" VIDEO_CARDS="i915 intel" XFCE_PLUGINS="logout menu trash" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 tka 2018-12-09 14:11:55 UTC
It fails on my old x86 box. On my amd64 system, it builds without problem.
Comment 3 LE GARREC Vincent 2018-12-12 19:22:26 UTC
Confirmed for x86 and amd64.

The problem is: in my x86, codegen is in :
/usr/lib/rust-1.30.1/rust-1.30.1/rustlib/i686-unknown-linux-gnu/codegen-backend/librustc_codegen_llvm-llvm.so

Do you see the double "rust-1.30.1/" ? I think that the problem.
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2018-12-12 23:12:13 UTC
Created attachment 557694 [details]
Working build.log x86

I cannot reproduce.

Your build.log indicates a problem with your rust installation. Please call `eselect rust set...` again and if that doesn't fix your problem please re-emerge rust.
Comment 5 tka 2018-12-13 21:06:50 UTC
(In reply to Thomas Deutschmann from comment #4)
> Created attachment 557694 [details]
> Working build.log x86
> 
> I cannot reproduce.
> 
> Your build.log indicates a problem with your rust installation. Please call
> `eselect rust set...` again and if that doesn't fix your problem please
> re-emerge rust.

Done that. It still fails.
Comment 6 LE GARREC Vincent 2018-12-14 21:28:25 UTC
Yes, still fails for me too. Please find enclosed the build.log for rust.
Comment 7 LE GARREC Vincent 2018-12-14 21:31:27 UTC
Created attachment 557788 [details]
dev-lang:rust-1.30.1-r1.log.gz
Comment 8 tka 2018-12-27 19:39:13 UTC
The problem is with rust not cbindgen. rust (in some cases) installs the codegen-backends folder in the wrong path (double ${P} component). I observe this on my x86 system, amd64 is fine. LE GARREC Vincent confirmed this for x86 and amd64.

Reinstalling rust did not help. Neither did the upgrade to 1.31.1. A workaround is to create a symlink in the correct location:

lrwxrwxrwx 1 root root 65 Dec 26 20:46 /usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/codegen-backends -> ../../rust-1.31.1/rustlib/i686-unknown-linux-gnu/codegen-backends

What is still unclear is why the codegen-backends folder ends up in the wrong location.
Comment 9 Oleg 2018-12-28 19:22:41 UTC
What config.toml was produced in configure phase?
Comment 10 Oleg 2018-12-28 19:34:37 UTC
Could you also run install step with --verbose?
Comment 11 Oleg 2018-12-28 20:05:54 UTC
And could you apply patch to see which path was generated for codegen?


--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -496,6 +496,7 @@ impl Step for Rustc {
             let backends_rel = backends_src.strip_prefix(&src).unwrap();
             let backends_dst = image.join(&backends_rel);
             t!(fs::create_dir_all(&backends_dst));
+            builder.info(&format!("Copy backend libraries from {} to {} with relative path {}", backends_src.display(), backends_dst.display(), backends_rel.display()));
             builder.cp_r(&backends_src, &backends_dst);
 
             // Copy libLLVM.so to the lib dir as well, if needed. While not
Comment 12 Oleg 2018-12-28 21:16:55 UTC
I got this line:

Copy backend libraries from /tmp/portage/dev-lang/rust-9999/work/rust-git-src/build/x86_64-unknown-linux-gnu/stage2/lib64/rust-9999/rustlib/x86_64-unknown-linux-gnu/codegen-backends to /tmp/portage/dev-lang/rust-9999/work/rust-git-src/build/tmp/dist/rustc-1.33.0-dev-x86_64-unknown-linux-gnu-image/lib64/rust-9999/rustlib/x86_64-unknown-linux-gnu/codegen-backends with relative path lib64/rust-9999/rustlib/x86_64-unknown-linux-gnu/codegen-backends
Comment 13 tka 2018-12-29 16:48:23 UTC
Created attachment 558858 [details]
config.toml
Comment 14 tka 2018-12-30 14:58:14 UTC
Stange:

    Finished release [optimized] target(s) in 1.38s
Copy backend libraries from /var/tmp/portage/dev-lang/rust-1.31.1/work/rustc-1.31.1-src/build/i686-unknown-linux-gnu/stage2/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/codegen-backends to /var/tmp/portage/dev-lang/rust-1.31.1/work/rustc-1.31.1-src/build/tmp/dist/rustc-1.31.1-i686-unknown-linux-gnu-image/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/codegen-backends with relative path lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/codegen-backends
Install rustc stage2 (Some("i686-unknown-linux-gnu"))
install: creating uninstall script at /var/tmp/portage/dev-lang/rust-1.31.1/image/usr/lib/rust-1.31.1/rustlib/uninstall.sh
install: installing component 'rustc'
install: backing up existing file at /var/tmp/portage/dev-lang/rust-1.31.1/image/usr/share/doc/rust-1.31.1/LICENSE-MIT
install: backing up existing file at /var/tmp/portage/dev-lang/rust-1.31.1/image/usr/share/doc/rust-1.31.1/README.md
install: backing up existing file at /var/tmp/portage/dev-lang/rust-1.31.1/image/usr/share/doc/rust-1.31.1/LICENSE-APACHE

    Rust is ready to roll.

Build completed successfully in 0:19:47
>>> Completed installing rust-1.31.1 into /var/tmp/portage/dev-lang/rust-1.31.1/image/

 * Final size of build directory: 5372252 KiB (  5.1 GiB)
 * Final size of installed tree:   346936 KiB (338.8 MiB)

strip: i686-pc-linux-gnu-strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version
   usr/lib/rust-1.31.1/libsyntax_ext-c1e19f0e29f649df.so
   usr/lib/rust-1.31.1/librustc_save_analysis-41da545357f9b733.so
   usr/lib/rust-1.31.1/librustc_privacy-de815f4b33668b11.so
   usr/lib/rust-1.31.1/librustc_allocator-87d242483df32e8b.so
   usr/lib/rust-1.31.1/libsyntax_pos-9737958513262e95.so
   usr/lib/rust-1.31.1/librustc_mir-4c7d8b4111f64fff.so
   usr/lib/rust-1.31.1/librustc-648110b6a7d45d90.so
   usr/lib/rust-1.31.1/librustc_metadata-d57050bfe8ec73a5.so
   usr/lib/rust-1.31.1/librustc_lint-ea81319569ec09ca.so
   usr/lib/rust-1.31.1/librustc_passes-d34cd92a8cbde056.so
   usr/lib/rust-1.31.1/libsyntax-00c92e4b8e49c5ae.so
   usr/lib/rust-1.31.1/librustc_platform_intrinsics-2e41e272ca2d4b12.so
   usr/lib/rust-1.31.1/libfmt_macros-dea7297e33d9f7f4.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/libsyntax_ext-c1e19f0e29f649df.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_save_analysis-41da545357f9b733.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_allocator-87d242483df32e8b.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_privacy-de815f4b33668b11.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/libsyntax_pos-9737958513262e95.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_mir-4c7d8b4111f64fff.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc-648110b6a7d45d90.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_metadata-d57050bfe8ec73a5.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_lint-ea81319569ec09ca.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_passes-d34cd92a8cbde056.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/libsyntax-00c92e4b8e49c5ae.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/libfmt_macros-dea7297e33d9f7f4.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_platform_intrinsics-2e41e272ca2d4b12.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_cratesio_shim-9f8712e0da36f4fc.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_data_structures-1cfa97462b4096c5.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_resolve-b7b86867d361365f.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_codegen_utils-6b2f2f916c3b1637.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/libstd-1913e8a35d6b2c6d.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/libterm-9be08f7ee8f194ce.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_driver-7e543b1653fc30dc.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_errors-21862b366dcbe120.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_target-00216788fd276dc8.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_typeck-13ae568930d78a6a.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_fs_util-209c4cae3e7d857d.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/libproc_macro-8fff389e62a47475.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/libarena-ef5567f1cb4fd94a.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_metadata_utils-ba9800a6a64352b3.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/libgraphviz-fc1d962ea0478d2e.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_traits-2562d241d2d01499.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_borrowck-aa900b47534d9ea1.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_plugin-b839af7874f3c2df.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/libserialize-207cb365a52cef59.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/libtest-0b700d5c51b43276.so
   usr/lib/rust-1.31.1/rustlib/i686-unknown-linux-gnu/lib/librustc_incremental-168b897b4be50f8f.so
   usr/lib/rust-1.31.1/librustc_data_structures-1cfa97462b4096c5.so
   usr/lib/rust-1.31.1/librustc_cratesio_shim-9f8712e0da36f4fc.so
   usr/lib/rust-1.31.1/librustc_resolve-b7b86867d361365f.so
   usr/lib/rust-1.31.1/librustc_codegen_utils-6b2f2f916c3b1637.so
   usr/lib/rust-1.31.1/libstd-1913e8a35d6b2c6d.so
   usr/lib/rust-1.31.1/libterm-9be08f7ee8f194ce.so
   usr/lib/rust-1.31.1/librustc_driver-7e543b1653fc30dc.so
   usr/lib/rust-1.31.1/librustc_errors-21862b366dcbe120.so
   usr/lib/rust-1.31.1/librustc_target-00216788fd276dc8.so
   usr/lib/rust-1.31.1/librustc_typeck-13ae568930d78a6a.so
   usr/lib/rust-1.31.1/librustc_fs_util-209c4cae3e7d857d.so
   usr/lib/rust-1.31.1/libproc_macro-8fff389e62a47475.so
   usr/lib/rust-1.31.1/libarena-ef5567f1cb4fd94a.so
   usr/lib/rust-1.31.1/librustc_metadata_utils-ba9800a6a64352b3.so
   usr/lib/rust-1.31.1/libgraphviz-fc1d962ea0478d2e.so
   usr/lib/rust-1.31.1/librustc_traits-2562d241d2d01499.so
   usr/lib/rust-1.31.1/librustc_borrowck-aa900b47534d9ea1.so
   usr/lib/rust-1.31.1/librustc_plugin-b839af7874f3c2df.so
   usr/lib/rust-1.31.1/libserialize-207cb365a52cef59.so
   usr/lib/rust-1.31.1/libtest-0b700d5c51b43276.so
   usr/lib/rust-1.31.1/librustc_incremental-168b897b4be50f8f.so
   usr/bin/cargo-1.31.1
   usr/bin/rustdoc-1.31.1
   usr/bin/rustc-1.31.1
   usr/lib/rust-1.31.1/rust-1.31.1/rustlib/i686-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so


The extra output looks good but then look at the last line of strip output, which is wrong again.
Comment 15 Oleg 2019-01-07 14:37:25 UTC
Could you get .../tmp/dist/rustc-something/install.sh script which copies all files into portage image tree?
Comment 16 Oleg 2019-01-07 15:41:26 UTC
And could you also show file /var/tmp/portage/dev-lang/rust-1.31.1/work/rustc-1.31.1-src/build/tmp/dist/rustc-1.31.1-i686-unknown-linux-gnu/rustc/manifest.in
Comment 17 tka 2019-01-31 07:52:15 UTC
Created attachment 563348 [details]
rustc-1.32.0-src/build/tmp/dist/rustc-1.32.0-i686-unknown-linux-gnu/install.sh

(In reply to Oleg from comment #15)
> Could you get .../tmp/dist/rustc-something/install.sh script which copies
> all files into portage image tree?

I don't have the build files for rust-1.31.x anymore. But the problem still exists. So, here is the 1.32 version.
Comment 18 tka 2019-01-31 07:54:12 UTC
Created attachment 563350 [details]
rustc-1.32.0-src/build/tmp/dist/rustc-1.32.0-i686-unknown-linux-gnu/rustc/manifest.in

(In reply to Oleg from comment #16)
> And could you also show file
> /var/tmp/portage/dev-lang/rust-1.31.1/work/rustc-1.31.1-src/build/tmp/dist/
> rustc-1.31.1-i686-unknown-linux-gnu/rustc/manifest.in
Comment 19 Oleg 2019-01-31 18:32:15 UTC
(In reply to tka from comment #18)
> Created attachment 563350 [details]
> rustc-1.32.0-src/build/tmp/dist/rustc-1.32.0-i686-unknown-linux-gnu/rustc/
> manifest.in
> 
> (In reply to Oleg from comment #16)
> > And could you also show file
> > /var/tmp/portage/dev-lang/rust-1.31.1/work/rustc-1.31.1-src/build/tmp/dist/
> > rustc-1.31.1-i686-unknown-linux-gnu/rustc/manifest.in

It's very strange because in have a correct path in manifest: file:lib/rust-1.32.0/rustlib/i686-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so
Comment 20 tka 2019-01-31 19:00:09 UTC
(In reply to Oleg from comment #19)
> It's very strange because in have a correct path in manifest:
> file:lib/rust-1.32.0/rustlib/i686-unknown-linux-gnu/codegen-backends/
> librustc_codegen_llvm-llvm.so
That path seems wrong. Given that "file:lib/" resolves to "/usr/lib/rust-1.32.0/", it is "/usr/lib/rust-1.32.0/rust-1.32.0/rustlib/i686-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so". Exactly the double "rust-1.32.0", which is wrong.
Comment 21 nicotroost 2019-02-12 16:30:15 UTC
Any progress or a workaround? Since cbindgen fails I can't upgrade to firefox-65. It would be nice to have it solved.
Comment 22 Thomas Deutschmann (RETIRED) gentoo-dev 2019-02-12 21:34:06 UTC
Nobody is really working on this...

Are you using a kind of chroot or some kind of special setup? Because like already said in comment #4 I am unable to reproduce on a real x86 system.
Comment 23 Michael Mounteney 2019-02-13 09:47:57 UTC
Well it's not just a couple of random Gentoo hackers.  Alpine Linux is only building Rust on x86_64.

http://lists.alpinelinux.org/alpine-devel/6295.html
Comment 24 nicotroost 2019-02-14 17:38:37 UTC
I tried eselect rust set 1 again and re-emerged rust but that din't help.
I have no special setup or chroot. This is my emerge --info:

Portage 2.3.51 (python 3.6.5-final-0, default/linux/x86/17.0/desktop/plasma, gcc-7.3.0, glibc-2.27-r6, 4.14.83-gentoo i686)
=================================================================
System uname: Linux-4.14.83-gentoo-i686-Intel-R-_Core-TM-2_Duo_CPU_E8500_@_3.16GHz-with-gentoo-2.6
KiB Mem:     8304436 total,   4811496 free
KiB Swap:   10239996 total,  10239996 free
Timestamp of repository gentoo: Thu, 14 Feb 2019 15:45:01 +0000
Head commit of repository gentoo: 6049516b34a30cbb7660fc6f327f2e5ff66fb885
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.30 p5) 2.30.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.5.5::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.3-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24

crossdev
    location: /usr/local/portage-crossdev
    masters: gentoo
    priority: 10

torbrowser
    location: /var/lib/layman/torbrowser
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="nl"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/tmp/"
USE="3dnow 3dnowext X a52 aac acpi activities alsa apm asf branding bzip2 cairo cdda cddb cdr cli consolekit crypt cups cxx dbus declarative divx4linux dts dvd dvdr dvdread encode exif ffmpeg firefox flac foomaticdb fortran gdbm gif glamor gnutls gpm hddtemp iconv imlib ipv6 jack java javascript jpeg kde kipi kwallet lame lcms libnotify libtirpc libwww lirc lm_sensors mad matroska mmx mmxext mng mp3 mp4 mpeg musepack ncurses networkmanager nptl nptlonly nsplugin ogg opengl openmp oss pam pango pcre pdf phonon plasma png policykit ppds qml qt5 quicktime readline sdl seccomp spell sqlite sse sse2 ssl startup-notification svg tcpd theora tiff truetype udev udisks unicode upower usb v4l v4l2 vdpau vlc vorbis vpx widgets win32codecs wxwidgets x264 x86 xattr xcb xcomposite xine xml xscreensaver xv xvid xvmc zip zlib" ABI_X86="32" ALSA_CARDS="hda_intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev libinput mouse keyboard" KERNEL="linux" L10N="nl" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LIRC_DEVICES="serial" NETBEANS_MODULES="apisupport ide java nb" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="nouveau vesa vga" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 25 Michael Mounteney 2019-02-14 19:32:37 UTC
And mine:

Portage 2.3.59 (python 3.6.6-final-0, default/linux/amd64/17.0/desktop/plasma/systemd, gcc-8.2.0, glibc-2.28-r5, 4.14.12-gentoo-6 x86_64)
=================================================================
System uname: Linux-4.14.12-gentoo-6-x86_64-Intel-R-_Core-TM-_i3-4010U_CPU_@_1.70GHz-with-gentoo-2.6
KiB Mem:     8058456 total,   4995896 free
KiB Swap:    2199548 total,   2199548 free
Timestamp of repository gentoo: Fri, 01 Feb 2019 21:00:01 +0000
Head commit of repository gentoo: 7349f781e14bc778e526acfac4b808205f2982a2
sh bash 5.0_p2
ld GNU ld (Gentoo 2.31.1 p5) 2.31.1
app-shells/bash:          5.0_p2::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.0::gentoo
dev-lang/python:          2.7.15::gentoo, 3.5.5-r1::gentoo, 3.6.6::gentoo, 3.7.0::gentoo
dev-util/cmake:           3.13.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.15::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r3::gentoo
sys-devel/gcc:            8.2.0-r6::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.20::gentoo (virtual/os-headers)
sys-libs/glibc:           2.28-r5::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 

Installed sets: @base, @kde5-metal, @michael, @powerful, @wayland
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.3/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cli-php7.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.swin.edu.au/gentoo http://mirror.pacific.net.au/linux/Gentoo ftp://ftp.swin.edu.au/gentoo ftp://mirror.pacific.net.au/linux/Gentoo "
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_GB"
MAKEOPTS="-j5 -s"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/tmp"
USE="3dnow 3dnowext X a52 aac acl acpi activities ada alsa amd64 autoipd avahi berkdb branding bzip2 cairo cdda cdr cjk cli colord context crypt cups cxx dbus declarative detex disk-partition doc dri dts dv dvb dvd dvdr dvi2tty emboss encode epspdf exif extras fam flac fontconfig foomatic fortran freerdp gbm gd gdbm gif git glamor glibc-omitfp gnat_2017 gnutls gpm graphics gstreamer gtk gtk3 handbook humanities iconv imap inotify iscsi jadetex java jpeg jpeg2k kde kipi kpathsea kwallet lame latex lcms ldap libnotify libtirpc luatex lzma lzo mad mercurial metapost mmap mms mng mp3 mp4 mpeg msn mtp multilib musepack music ncurses nfsv41 nls nntp npp nptl odbc ogg openexr opengl openmp oscar oss pam pango pcre pdf pdfannotextractor pdo phonon plasma png policykit postgres ppds pstricks publishers pulseaudio qml qt5 quicktime rdesktop readline real rss sasl science sdl seccomp semantic-desktop slang smime spam-report spamassassin spell sql ssh ssl startup-notification subversion svg systemd taglib tcpd tex4ht texi2html theora threads tiff truetype udev udisks unicode upower usb v4l2 vcd vim-syntax vnc vorbis wavpack wayland webengine widgets win32codecs wmf wxwidgets x264 xattr xcb xcomposite xetex xface xine xml xmp xnest xpm xv xvid yahoo zlib" ABI_X86="64" ALSA_CARDS="atiixp" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="gnutls" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6 python_pypy" RUBY_TARGETS="ruby25" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 26 John Doe 2019-02-14 22:41:16 UTC
(In reply to nicotroost from comment #21)
> Any progress or a workaround? Since cbindgen fails I can't upgrade to
> firefox-65. It would be nice to have it solved.

In my case. This command did the trick.

ln -s /usr/bin/cargo-1.32.0 /usr/bin/cargo
Comment 27 Thomas Deutschmann (RETIRED) gentoo-dev 2019-02-14 23:20:47 UTC
(In reply to John Doe from comment #26)
> (In reply to nicotroost from comment #21)
> > Any progress or a workaround? Since cbindgen fails I can't upgrade to
> > firefox-65. It would be nice to have it solved.
> 
> In my case. This command did the trick.
> 
> ln -s /usr/bin/cargo-1.32.0 /usr/bin/cargo

So you are affected by bug 671182 which has nothing to do with this bug report.
Comment 28 John Doe 2019-02-14 23:49:23 UTC
(In reply to Thomas Deutschmann from comment #27)
> (In reply to John Doe from comment #26)
> > (In reply to nicotroost from comment #21)
> > > Any progress or a workaround? Since cbindgen fails I can't upgrade to
> > > firefox-65. It would be nice to have it solved.
> > 
> > In my case. This command did the trick.
> > 
> > ln -s /usr/bin/cargo-1.32.0 /usr/bin/cargo
> 
> So you are affected by bug 671182 which has nothing to do with this bug
> report.

Not affected because I solved this several weeks ago, you should include that bug workaround into rust ebuild.

A rust upgrade to 1.32 version left the simlink broken and althought rust compiled and installed without errors, cbindgen compilation failed with some "command not found" error.

I know this is an unrelated bug but since I found this bug looking for a workaroud to that cbindgen error, maybe this helps solving his problem.
Comment 29 nicotroost 2019-02-15 19:38:43 UTC
Creating the symlink as suggested in comment #8 fixed the issue for now, but I have to this after every upgrade for rust.
Comment 30 gentoowok 2019-02-16 02:39:22 UTC
Confirmation from me as well. Affects me for rust-1.32.0 on an x86 box. Its the same double .../rust-1.32.0/rust-1.32.0/...  problem.  Temporary symlink as per comment 8 to work around the bug.
Comment 31 Michael Mounteney 2019-02-18 09:56:41 UTC
On a 64 bit machine (bug does not manifest):

    # find / -mount -name codegen-backends
    /usr/lib64/rust-1.32.0/rustlib/x86_64-unknown-linux-gnu/codegen-backends

On a 32 bit machine (bug does manifest):

    # find / -mount -name codegen-backends
    /usr/lib/rust-1.32.0/rust-1.32.0/rustlib/i686-unknown-linux-gnu/codegen-backends

Interesting.
Comment 32 Michael Mounteney 2019-03-05 08:09:34 UTC
This script fixed the problem for me:

    cd /usr/lib/rust-1.32.0
    mv rust-1.32.0/rustlib/i686-unknown-linux-gnu/codegen-backends rustlib/i686-unknown-linux-gnu/
    rmdir rust-1.32.0/rustlib/i686-unknown-linux-gnu/
    rmdir rust-1.32.0/rustlib
    rmdir rust-1.32.0
Comment 33 David Flogeras 2019-05-13 00:57:34 UTC
Hit this as well on two i686 machines, none of the 4-5 amd64 machines I upgraded were affected
Comment 34 Dirkjan Ochtman (RETIRED) gentoo-dev 2019-05-13 06:50:52 UTC
Are you saying you're still seeing this with rust-1.34.1?
Comment 35 Michael Mounteney 2019-05-13 10:51:19 UTC
I haven't updated to 1.34.1 yet but it's certainly still there in 1.34.0.  My little fix-it script (run this between the emerging of rust and Firefox):

VERSION=1.34.0
cd /usr/lib/rust-${VERSION}
mv rust-${VERSION}/rustlib/i686-unknown-linux-gnu/codegen-backends rustlib/i686-unknown-linux-gnu/
rmdir rust-${VERSION}/rustlib/i686-unknown-linux-gnu/
rmdir rust-${VERSION}/rustlib
rmdir rust-${VERSION}
Comment 36 David Flogeras 2019-05-15 00:19:50 UTC
I can also confirm, 1.34.1 upgrade on two different 32bit machines.  One was inside a chroot, the other was on real hardware.  As Michael says, it can be fixed/worked around by moving the mis-placed directory.
Comment 37 MickKi 2019-05-18 19:18:35 UTC
rust-1.34.2 also causes the same problem on a 32bit system - I discovered this when www-client/firefox-60.6.2 failed to compile:

 0:08.48 checking for rustc... /usr/bin/rustc                                  
 0:08.48 checking for cargo... /usr/bin/cargo                                  
 0:08.50 checking rustc version...                                             
 0:08.50 DEBUG: Executing: `/usr/bin/rustc --version --verbose`                
 0:08.50 DEBUG: The command returned non-zero exit status 1.                   
 0:08.50 DEBUG: Its output was:                                                
 0:08.50 DEBUG: | rustc 1.34.2                                                 
 0:08.50 DEBUG: | binary: rustc                                                
 0:08.50 DEBUG: | commit-hash: unknown                                         
 0:08.50 DEBUG: | commit-date: unknown                                         
 0:08.50 DEBUG: | host: i686-unknown-linux-gnu                                 
 0:08.50 DEBUG: | release: 1.34.2
 0:08.50 DEBUG: Its error output was:
 0:08.50 DEBUG: | error: failed to find a `codegen-backends` folder in the sysroot candidates:
 0:08.50 DEBUG: | * /usr
 0:08.50 DEBUG: | * /usr/lib
 0:08.50 DEBUG: |
 0:08.50 ERROR: Command `/usr/bin/rustc --version --verbose` failed with exit status 1.
 0:08.53 *** Fix above errors and then restart with\
 0:08.53                "/usr/bin/gmake -f client.mk build"
 0:08.53 gmake: *** [client.mk:150: configure] Error 1

Manually sorting out the misconfigured rust directory helps the compile to proceed.
-- 
Regards,
Mick
Comment 38 nicotroost 2019-05-18 19:23:45 UTC
Same here. I also confirm for rust-1.34.2 on a 32bit system (same error as Mick but with firefox 66.0.5).
Comment 39 Thomas Deutschmann (RETIRED) gentoo-dev 2019-05-18 19:31:43 UTC
Finally I was able end up in the same situation with my x86 box I use for stabilization...

> >>> Compiling source in /var/tmp/portage/dev-util/cbindgen-0.8.2/work/cbindgen-0.8.2 ...
> error: process didn't exit successfully: `rustc -vV` (exit code: 1)
> --- stdout
> rustc 1.34.2
> binary: rustc
> commit-hash: unknown
> commit-date: unknown
> host: i686-unknown-linux-gnu
> release: 1.34.2
> 
> --- stderr
> error: failed to find a `codegen-backends` folder in the sysroot candidates:
> * /usr
> * /usr/lib
> 
> 
>  * ERROR: dev-util/cbindgen-0.8.2::gentoo failed (compile phase):
>  *   cargo build failed
>
Comment 40 Georgy Yakovlev archtester gentoo-dev 2019-05-18 19:52:45 UTC
probably this one
https://github.com/rust-lang/rust/issues/57014

doing my research.
Comment 41 Thomas Deutschmann (RETIRED) gentoo-dev 2019-05-25 13:59:01 UTC
*** Bug 686740 has been marked as a duplicate of this bug. ***
Comment 42 inasprecali 2019-05-26 18:37:44 UTC
I can confirm the same codegen-backends issue for rust-1.34.2 on a 32bit machine.
Comment 43 Georgy Yakovlev archtester gentoo-dev 2019-05-26 18:44:56 UTC
was able to reproduce, here's the file that's installed to double-versioned dir

/usr/lib/rust-1.34.2/rust-1.34.2/rustlib/i686-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so

can probably add a hack to move it in place during installation, but I'm trying to find a proper solution.
Comment 44 Georgy Yakovlev archtester gentoo-dev 2019-05-26 21:55:39 UTC
with Oleg's patch from https://bugs.gentoo.org/672816#c11 it's pretty clear it somehow has that extra dir in path

Copy backend libraries from /var/tmp/portage/dev-lang/rust-1.34.2/work/rustc-1.34.2-src/build/i686-unknown-linux-gnu/stage2/lib/rust-1.34.2/rustlib/i686-unknown-linux-gnu/codegen-backends to /var/tmp/portage/dev-lang/rust-1.34.2/work/rustc-1.34.2-src/build/tmp/dist/rustc-1.34.2-i686-unknown-linux-gnu-image/lib/rust-1.34.2/rustlib/i686-unknown-linux-gnu/codegen-backends with relative path lib/rust-1.34.2/rustlib/i686-unknown-linux-gnu/codegen-backends

probably because we have

[install]
prefix = "${EPREFIX}/usr"
libdir = "$(get_libdir)/${P}"

now need to see why it's a special case for i686 but not for x86_64

maybe because on i686 libdir is "lib" and it has some special treatment?
trying to follow the code but I'm kinda guessing it, maybe it's getting mangled by libdir_relative?
sees a generic lib and assumes it should be one level deeper and adds libdir property and gets mutated

maybe here? idk, just guessing

            fn run(self, builder: &Builder<'_>) -> Interned<PathBuf> {
                let compiler = self.compiler;
                let config = &builder.build.config;
                let lib = if compiler.stage >= 1 && config.libdir_relative().is_some() {
                    builder.build.config.libdir_relative().unwrap()
                } else {
                    Path::new("lib")
                };
                let sysroot = builder
                    .sysroot(self.compiler)
                    .join(lib)
                    .join("rustlib")
                    .join(self.target)
                    .join("lib");
Comment 45 Georgy Yakovlev archtester gentoo-dev 2019-05-26 22:01:10 UTC
O01eg@yandex.ru any thoughts on this?
seems you've been involved in number of related issues/commits upstream.
Comment 46 Larry the Git Cow gentoo-dev 2019-05-27 00:13:11 UTC
The bug has been referenced in the following commit(s):

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

commit 3474de23b4bd438ea766e82a4c37f7ebc97c7392
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2019-05-27 00:06:35 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2019-05-27 00:12:58 +0000

    dev-lang/rust: fix codegen-backends location on x86
    
    comitting to stable without revbump so I don't force
    all other users to rebuild this beast
    
    Bug: https://bugs.gentoo.org/672816
    Package-Manager: Portage-2.3.67, Repoman-2.3.13
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 dev-lang/rust/rust-1.34.2.ebuild | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Comment 47 Thomas 2019-05-27 08:50:01 UTC
(In reply to nicotroost from comment #38)
> Same here. I also confirm for rust-1.34.2 on a 32bit system (same error as
> Mick but with firefox 66.0.5).

Same thing here.

mv /usr/lib/rust-1.34.2/rust-1.34.2/rustlib/i686-unknown-linux-gnu/codegen-ba
ckends /usr/lib/rust-1.34.2/rustlib/i686-unknown-linux-gnu/

fixes it:

# rustc --version --verbose
rustc 1.34.2
binary: rustc
commit-hash: unknown
commit-date: unknown
host: i686-unknown-linux-gnu
release: 1.34.2
LLVM version: 8.0
Comment 48 Oleg 2019-05-27 17:26:03 UTC
(In reply to Georgy Yakovlev from comment #45)
> O01eg@yandex.ru any thoughts on this?
> seems you've been involved in number of related issues/commits upstream.

Idea of "lib"'s special treatment looks real. But this should happen somewhere in install.rs code or even in shell installer.

libdir_relative determines search path. I suppose somewhere should be install path for codegen-backend only because other libraries aren't affected.
Comment 49 Oleg 2019-05-27 17:39:28 UTC
Special treatment is in install.sh:

    if echo "$_file" | grep "^lib/" > /dev/null
	    then
		local _f="$(echo "$_file" | sed 's/^lib\///')"
		_file_install_path="$CFG_LIBDIR/$_f"
	    fi
Comment 50 Georgy Yakovlev archtester gentoo-dev 2019-05-28 01:13:20 UTC
great find!

https://github.com/rust-lang/rust-installer/blob/5afc0089f282570f2c39b4345d2706bf97e3d84b/install-template.sh#L574-L578

but it's been there for 4 years.

I wonder what changed since this started to happen.
maybe there's a change in out ebuilds.


here's step by step location

after build, in stage2

rustc-1.34.2-src/build/i686-unknown-linux-gnu/stage2/lib/rust-1.34.2/rustlib/i686-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so

stage2/lib:
├── rust-1.34.2
│   └── rustlib
│       └── i686-unknown-linux-gnu
│           ├── codegen-backends
│           │   └── librustc_codegen_llvm-llvm.so
│           └── lib
│               ├── liballoc-06a86e5fbe572115.rlib
│               ├── libarena-3969dd4b11416565.so
│               ├── libarrayvec-e68e388337c7dc23.rlib
│               ├── libatty-55bbdf79f5d6b28e.rlib


but there is also some .so files in stage2/lib as well

after install:

in the
rustc-1.34.2-src/build/tmp/dist/rustc-1.34.2-i686-unknown-linux-gnu/rustc/manifest.in

file:lib/rustlib/i686-unknown-linux-gnu/lib/libLLVM-8-rust-1.34.2-stable.so
file:lib/rust-1.34.2/rustlib/i686-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so
file:lib/libsyntax_pos-3b2f33a4aab1c362.so


tarballs are also mangled:
rustc-1.34.2-src/build/dist/rustc-1.34.2-i686-unknown-linux-gnu.tar.gz
tar tvf rustc-1.34.2-i686-unknown-linux-gnu.tar.gz  --wildcards '*/librustc_codegen_llvm-llvm.so'
-rwxr-xr-x 0/0        51378880 2019-05-27 23:57 rustc-1.34.2-i686-unknown-linux-gnu/rustc/lib/rust-1.34.2/rustlib/i686-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so



this is the arg install.sh gets as input

"--libdir=/var/tmp/portage/dev-lang/rust-1.34.2/image/usr/lib/rust-1.34.2"


assuming CFG_LIBDIR=/var/tmp/portage/dev-lang/rust-1.34.2/image/usr/lib/rust-1.34.2



minimal reproducer

#!/bin/sh

CFG_LIBDIR=/var/tmp/portage/dev-lang/rust-1.34.2/image/usr/lib/rust-1.34.2
files=(
	lib/rustlib/i686-unknown-linux-gnu/lib/libLLVM-8-rust-1.34.2-stable.so
	lib/rust-1.34.2/rustlib/i686-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so
	lib/libsyntax_pos-3b2f33a4aab1c362.so
)
for _file in ${files[@]}; do
	if echo "$_file" | grep "^lib/" > /dev/null; then
		_f="$(echo "$_file" | sed 's/^lib\///')"
		_file_install_path="$CFG_LIBDIR/$_f"
	fi
	echo $_file_install_path
done




sh t.sh 
/var/tmp/portage/dev-lang/rust-1.34.2/image/usr/lib/rust-1.34.2/rustlib/i686-unknown-linux-gnu/lib/libLLVM-8-rust-1.34.2-stable.so
/var/tmp/portage/dev-lang/rust-1.34.2/image/usr/lib/rust-1.34.2/rust-1.34.2/rustlib/i686-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so
/var/tmp/portage/dev-lang/rust-1.34.2/image/usr/lib/rust-1.34.2/libsyntax_pos-3b2f33a4aab1c362.so


exactly what we are seeing.


so it started to happen since aca73a89121af25876703d0ddcc5f08ddf277933 , a bump to 1.29.2

before that we passed libdir = "$(get_libdir)" in config.toml
Comment 51 Oleg 2019-05-28 02:40:31 UTC
I've grasped history.

First dist codegen-backends dir was calculated based on "lib" https://github.com/rust-lang/rust/commit/8ebe5424809a517a9e74984a32e79e0ff9d612f9

Next I've added fixes to build codegen libraries in a custom libdir https://github.com/rust-lang/rust/commit/5bcc365a0f0842955457c5edc25f464925e51b66

Looks like backends_dst shouldn't use backends_rel as it already contains resolved "lib".
Comment 52 tt_1 2019-06-02 05:08:54 UTC
this also happens with arm, hence it might be related to 32bit userland?
Comment 53 Georgy Yakovlev archtester gentoo-dev 2019-06-02 07:31:00 UTC
having libdir as `lib` is what triggers it.
I guess I should alter workaround to work on arm as well.
Comment 54 5836000 2019-06-02 14:32:32 UTC
 /usr/bin/rustc --version --verbose
rustc 1.34.2
binary: rustc
commit-hash: unknown
commit-date: unknown
host: i686-unknown-linux-gnu
release: 1.34.2
error: failed to find a `codegen-backends` folder in the sysroot candidates:
* /usr
* /usr/lib
Comment 55 tt_1 2019-06-06 05:11:19 UTC
Can you please extend the workaround for arm and >=dev-lang/rust-1.34.2, please?
Comment 56 Georgy Yakovlev archtester gentoo-dev 2019-06-06 05:20:23 UTC
yes, will do within next 24hrs if build goes well.

you know how painful the build on arm is =) and I just have to test full cycle and not just eyeball it.
Comment 57 Georgy Yakovlev archtester gentoo-dev 2019-06-06 05:22:55 UTC
also need to test how it behaves on multilib and how it reacts to new 2017.1 profiles. 

probably it's not broken on multilib 2017.0 as libdir is lib32, but maybe broken on 2017.1
Comment 58 Larry the Git Cow gentoo-dev 2019-06-06 05:57:09 UTC
The bug has been referenced in the following commit(s):

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

commit e96cc4c5501c00acacf5f66e40d08c73af02d552
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2019-06-06 05:53:37 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2019-06-06 05:56:39 +0000

    dev-lang/rust: handle libdir workaround on arm as well
    
    Bug: https://bugs.gentoo.org/672816
    Package-Manager: Portage-2.3.67, Repoman-2.3.14
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 dev-lang/rust/rust-1.34.2.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Comment 59 tt_1 2019-06-08 06:27:50 UTC
Workaround for arm is up and working, thanks for the push to tree.
Comment 60 tka 2019-06-11 21:54:11 UTC
There is a new issue with rust-1.35.0, which seems related to this one. Again, my i686 system is affected while amd64 is fine. This time, the shared libraries in /usr/lib/rust-1.35.0/ are missing.

On i686, only the directory rustlib/ is in /usr/lib/rust/, and all the libraries (except for librustc_codegen_llvm-llvm.so, which is in the correct location this time) are under rustlib/i686-unknown-linux-gnu/lib/ only. Trying to execute /usr/bin/rustc fails, because the linker can't find the shared libraries.

On amd64, the shared libraries are also under rustlib/, but there are copies directly under /usr/lib64/rust-1.35.0/. Executing /usr/bin/rustc works as expected here.

The i686 installation can be fixed by creating symbolic links to the shared libraries in /usr/lib/rust-1.35.0:

# find rustlib/ -type f -name \*.so -exec ln -s {} . \;
Comment 61 tt_1 2019-06-12 06:18:27 UTC
May I ask: did you need that workaround for 1.35 from #60 as an additional fix or as a replacement for the one from #46?
Comment 62 tka 2019-06-12 06:39:29 UTC
(In reply to tt_1 from comment #61)
> May I ask: did you need that workaround for 1.35 from #60 as an additional
> fix or as a replacement for the one from #46?

The fix from #46 is still in the ebuild. I do not have the build.log anymore to see if it triggered. A new build is currently running but may take some time on my old Pentium 4.
Comment 63 tka 2019-06-17 19:20:00 UTC
Created attachment 580056 [details]
build.log.xz for rust-1.35.0

The original issue is still present but now worked-around in the ebuild:
> Build completed successfully in 0:18:56
>  * fixing bug #672816
> >>> Completed installing dev-lang/rust-1.35.0 into /var/tmp/portage/dev-lang/rust-1.35.0/image

The missing libraries in /usr/lib/rust-1.35.0/ are a new issue.
Comment 64 tt_1 2019-06-26 19:59:20 UTC
Could you please provide a patch against the rust-1.35.0.ebuild from the tree, so that I can set up test compile on arm?
Comment 65 Georgy Yakovlev archtester gentoo-dev 2019-07-08 16:41:42 UTC
I re-opened issue in main rust repo in addition to installer repo for visibility.

https://github.com/rust-lang/rust/issues/62496

@tt_1

is it the patch you are looking for?
> diff --git a/dev-lang/rust/rust-1.35.0.ebuild b/dev-lang/rust/rust-1.35.0.ebuild
> index fb6e6ecf273..64f0e0d6344 100644
> --- a/dev-lang/rust/rust-1.35.0.ebuild
> +++ b/dev-lang/rust/rust-1.35.0.ebuild
> @@ -274,13 +274,15 @@ src_install() {
>                    "${ED}/usr/${abi_libdir}" || die
>         done
> 
> -               # temp fix for https://bugs.gentoo.org/672816
> -       if use x86; then
> +       # temp fix for https://bugs.gentoo.org/672816
> +       # FIXME: this should handle libdir=lib, not exact arches
> +       if { use x86 || use arm; }; then
>                 local rust_target wrongdir rightdir
>                 rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
>                 wrongdir="${ED}/usr/$(get_libdir)/${P}/${P}/rustlib/${rust_target}/codegen-backends"
>                 rightdir="${ED}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/codegen-backends"
>                 if [[ -e ${wrongdir}/librustc_codegen_llvm-llvm.so ]]; then
> +                       einfo "fixing bug #672816"
>                         mv "${wrongdir}" "${rightdir}" || die
>                         rm -r "${ED}/usr/$(get_libdir)/${P}/${P}" || die
>                 fi
>
Comment 66 Georgy Yakovlev archtester gentoo-dev 2019-07-08 16:44:06 UTC
(In reply to tt_1 from comment #64)
> Could you please provide a patch against the rust-1.35.0.ebuild from the
> tree, so that I can set up test compile on arm?

probably a link is better
https://gitweb.gentoo.org/repo/gentoo.git/patch/?id=e96cc4c5501c00acacf5f66e40d08c73af02d552
Comment 67 tt_1 2019-07-08 16:50:22 UTC
Thanks for opening an upstream issue, I hope for a propper solution of this. However, with asking for a patch I meant the new issue which appeared in #60, and is most likely worth to open another bug. However, I've been reluctant in trying to reproduce it, since I'm on arm and therefore it may take around 48 hrs of heavy crunching and swapping for a result.
Comment 68 Georgy Yakovlev archtester gentoo-dev 2019-07-08 17:06:18 UTC
yes this is likely another issue, I was bumping rust-1.36 yesterday and noticed it has x86 libs in /usr/lib/libstd-xxx.so /usr/lib/libterm-xxx.so /usr/lib/libtest-xxx.so on multilib system.

probably those should go to /usr/lib/rust-1.xx.x/
Comment 69 Oleg 2019-07-08 17:49:02 UTC
Could you try this patch? https://github.com/rust-lang/rust/pull/62497
Comment 70 Georgy Yakovlev archtester gentoo-dev 2019-07-08 18:28:45 UTC
trying now, building on 3 systems,
i686
x86_64+686 multilib
x86_64 nomultilib.
Comment 71 Georgy Yakovlev archtester gentoo-dev 2019-07-08 19:03:44 UTC
(In reply to Oleg from comment #69)
> Could you try this patch? https://github.com/rust-lang/rust/pull/62497

patch helps with codegen-backends only, but

now i have all 32bit libs in /usr/lib/rust-1.36.0/rust-1.36.0
Comment 72 Oleg 2019-07-08 19:17:43 UTC
I've updated PR to see if it helps. Which configuration failed? Was verbosity enabled?
Comment 73 Georgy Yakovlev archtester gentoo-dev 2019-07-08 20:41:42 UTC
yes, verbosity is enabled for our builds
verbose = 2

will try to save log, but can't upload it now. later.

nothing failed as is, build completed succesfully, but with first patch version it just placed all .so files to /usr/lib/rust-1.36.0/rust-1.36.0 instead of /usr/lib/rust-1.36.0/*.so


trying the second patch now.
Comment 74 Georgy Yakovlev archtester gentoo-dev 2019-07-08 21:34:12 UTC
second version of the patch seems to be working just fine!
so libs and codegen-backends are in expected locations on i686.

I'll give it a try on multilib build and will commit to 1.36.0 if it's fine and probably will backport to 1.34.2
Comment 75 Larry the Git Cow gentoo-dev 2019-07-08 23:01:45 UTC
The bug has been referenced in the following commit(s):

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

commit 22ad38aea43abc71360afc7bdbc63c26eb3e48c2
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2019-07-08 03:00:02 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2019-07-08 23:01:19 +0000

    dev-lang/rust: bump to 1.36.0
    
    couple of important fixes
    also it now installs i686 libs to /usr/lib/${PN} on multilib
    
    Bug: https://bugs.gentoo.org/672816
    Bug: https://bugs.gentoo.org/679806
    
    Package-Manager: Portage-2.3.68, Repoman-2.3.16
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 dev-lang/rust/Manifest                             |  14 +
 dev-lang/rust/files/1.34.2-fix-custom-libdir.patch |  36 +++
 dev-lang/rust/rust-1.36.0.ebuild                   | 325 +++++++++++++++++++++
 3 files changed, 375 insertions(+)
Comment 76 Georgy Yakovlev archtester gentoo-dev 2019-07-08 23:10:23 UTC
Oleg, thanks for helping with this one.
Guys, please test and report how 1.36.0 behaves.

the patch worked for me in a chroot, rust is now usable out of the box and can emerge packages just fine.
Comment 77 tt_1 2019-07-09 08:08:16 UTC
It emerged fine on x86, rustc -Vv shows correct behavior. Not yet fully tested, but seems to be ok and working now. 

Do you think a backport to rust-1.34.2 would be possible?
Comment 78 Dirkjan Ochtman (RETIRED) gentoo-dev 2019-07-09 08:23:25 UTC
What's the benefit of backporting?
Comment 79 Georgy Yakovlev archtester gentoo-dev 2019-07-09 09:22:04 UTC
rust-1.34.2 contains horrible bash workaround, I’d rather replace it with this patch without revbump, so new installation have it properly, and this patch does not affect non-problematic arches/profiles.
Comment 80 tt_1 2019-07-09 15:28:19 UTC
Created attachment 582250 [details]
output from equery f =dev-lang/rust-1.35.0

here is the file with the file from the i-686 install. 

Is the layout correct, also in regard to #60? I used it to compile cbindgen, only thing that's different is that it takes 3min instead of 1,5min on amd64! >.<
Comment 81 Thomas Deutschmann (RETIRED) gentoo-dev 2019-07-09 18:39:58 UTC
> Guys, please test and report how 1.36.0 behaves.

Everything OK on a real x86 system.
Comment 82 tka 2019-07-10 18:55:49 UTC
All libraries seem to be in the right place with rust-1.36.0. Currently compiling firefox; no issues so far.
Comment 83 Oleg 2019-07-10 19:06:16 UTC
PR was accepted by upstream.
Comment 84 Georgy Yakovlev archtester gentoo-dev 2019-07-10 19:25:20 UTC
(In reply to Oleg from comment #83)
> PR was accepted by upstream.

should I close the upstream issue?
seems bors bot did not close it.
Comment 85 Oleg 2019-07-10 19:41:03 UTC
No, bors will merge PR and close issue.
Comment 86 Oleg 2019-08-07 21:28:59 UTC
I've updated PR. Could you check it again?
Comment 87 Georgy Yakovlev archtester gentoo-dev 2020-07-12 19:10:37 UTC
old bug that has been fixed for a while. closing.