Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 669918 - dev-lang/rust-1.29.2: cp: cannot stat '/var/tmp/portage/dev-lang/rust-1.29.2/image//usr/lib64/rust-1.29.2/rustlib/i686-pc-linux-gnu/lib/*.so': No such file or directory
Summary: dev-lang/rust-1.29.2: cp: cannot stat '/var/tmp/portage/dev-lang/rust-1.29.2/...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords:
: 669660 670786 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-10-29 11:48 UTC by Julien Sanchez
Modified: 2018-11-15 09:30 UTC (History)
7 users (show)

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


Attachments
Build log with install failure (build.log,446.44 KB, text/x-log)
2018-10-29 11:48 UTC, Julien Sanchez
Details
Same Error, here's my emerge --info (rust-error.txt,6.82 KB, text/plain)
2018-10-31 22:28 UTC, Chris Faulkner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Sanchez archtester 2018-10-29 11:48:54 UTC
Created attachment 553602 [details]
Build log with install failure

Install fails with the following message:

-------------
Dist rustc stage2 (x86_64-unknown-linux-gnu)
Building rustdoc for stage2 (x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.17s
Install rustc stage2 (Some("x86_64-unknown-linux-gnu"))
install: creating uninstall script at /var/tmp/portage/dev-lang/rust-1.29.2/image/usr/lib64/rust-1.29.2/rustlib/uninstall.sh
install: installing component 'rustc'

    Rust is ready to roll.

Build completed successfully in 0:02:43
cp: cannot stat '/var/tmp/portage/dev-lang/rust-1.29.2/image//usr/lib64/rust-1.29.2/rustlib/i686-pc-linux-gnu/lib/*.so': No such file or directory
 * ERROR: dev-lang/rust-1.29.2::gentoo failed (install phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line 124:  Called src_install
 *   environment, line 2747:  Called die
 * The specific snippet of code:
 *           cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so "${D}/usr/${abi_libdir}" || die;
--------------

$ ls /var/tmp/portage/dev-lang/rust-1.29.2/image/usr/lib64/rust-1.29.2/rustlib/i686-pc-linux-gnu/lib/
ls: cannot access '/var/tmp/portage/dev-lang/rust-1.29.2/image/usr/lib64/rust-1.29.2/rustlib/i686-pc-linux-gnu/lib/': No such file or directory

but the directory with i686-unknown-linux-gnu exists:
$ ls /var/tmp/portage/dev-lang/rust-1.29.2/image/usr/lib64/rust-1.29.2/rustlib/i686-unknown-linux-gnu/lib/*.so
libstd-3bc1450c7743bf5e.so libtest-706a60599a3fd6b0.so libterm-f73dc65c95cb61d3.so


The only difference seems to be i686-unknown-linux-gnu / i686-pc-linux-gnu.



$ emerge --info

Portage 2.3.51 (python 2.7.14-final-0, default/linux/amd64/17.0/developer, gcc-6.4.0, glibc-2.26-r6, 4.12.5-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.12.5-gentoo-x86_64-Intel-R-_Core-TM-_i7-6800K_CPU_@_3.40GHz-with-gentoo-2.4.1
KiB Mem:    32844268 total,   3223668 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 29 Oct 2018 10:00:01 +0000
Head commit of repository gentoo: 786a8e741ad75779d06d04b8fbba3020e2b08085
sh bash 4.4_p19
ld GNU ld (Gentoo 2.30 p1) 2.30.0
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
ccache version 3.3.4 [disabled]
app-shells/bash:          4.4_p19::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.1-r2::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.4.6::gentoo, 3.5.5::gentoo, 3.6.3::gentoo
dev-util/ccache:          3.3.4-r1::gentoo
dev-util/cmake:           3.11.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.35.5::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.10.3-r2::gentoo, 1.11.6-r3::gentoo, 1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.27::gentoo, 2.29.1-r1::gentoo, 2.30::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo, 6.3.0::gentoo, 6.4.0-r1::gentoo, 7.3.0::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r3::gentoo
sys-kernel/linux-headers: 4.15::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r6::gentoo
Repositories:

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

gentooboontoo
    location: /home/julien/repositories/gentooboontoo/gentooboontoo-overlay
    masters: gentoo

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

go-overlay
    location: /var/lib/layman/go-overlay
    masters: gentoo
    priority: 50

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

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

ring-overlay
    location: /var/lib/layman/ring-overlay
    masters: gentoo
    priority: 50

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

Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA AdobeFlash-11.x dlj-1.1 googleearth google-talkplugin Google-TOS Oracle-BCLA-JavaSE PUEL skype-4.0.0.7-copyright"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native -ggdb"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask-write n --keep-going --verbose-conflicts"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY 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-logs compressdebug distlocks ebuild-locks fixlafiles installsources merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms sign splitdebug strict test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.mirrors.ovh.net/gentoo-distfiles/"
LANG="en_US.utf8"
LDFLAGS="-Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed"
LINGUAS="en fr"
MAKEOPTS="-j11"
PKGDIR="/var/cache/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 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam ffmpeg flac fontconfig fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 iconv ipv6 jpeg lcms libnotify libtirpc lxc mad mng mono mp3 mp4 mpeg multilib nautilus ncurses nls nptl nsplugin ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt5 readline samba sdl seccomp smp snmp spell ssl startup-notification svg tcpd theora tiff truetype udev udisks unicode upower usb v4l2 vim-syntax vorbis vpx wav wxwidgets x264 xattr xcb xinerama xml xv xvid zlib" ABI_X86="64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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="libinput wacom" KERNEL="linux" L10N="en fr" 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="ruby22 ruby23 ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Chris Faulkner 2018-10-31 22:28:11 UTC
Created attachment 553792 [details]
Same Error, here's my emerge --info

Had the same exact error, i have a different profile running on ~amd64 4.19.0 kernel and gcc 7
Comment 2 Anibal Francisco 2018-11-05 10:45:48 UTC
Any updates regarding this issue? I'm hitting the exact same problem.. Perhaps a Makefile problem?
Comment 3 Austin English (RETIRED) gentoo-dev 2018-11-08 00:29:18 UTC
In src_configure(), rust_targets is set to:
rust_target="$(rust_abi)"

but src_install() sets it to:
rust_target=$(get_abi_CHOST ${v##*.})

which is where the mismatch comes from.

I tried changing src_install() to match:
diff --git a/dev-lang/rust/rust-1.29.2.ebuild b/dev-lang/rust/rust-1.29.2.ebuild
index a78fda48444..c86eaf8c59b 100644
--- a/dev-lang/rust/rust-1.29.2.ebuild
+++ b/dev-lang/rust/rust-1.29.2.ebuild
@@ -215,7 +215,7 @@ src_install() {
                        continue
                fi
                abi_libdir=$(get_abi_LIBDIR ${v##*.})
-               rust_target=$(get_abi_CHOST ${v##*.})
+               rust_target="$(rust_abi)"
                mkdir -p "${D}/usr/${abi_libdir}"
                cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
                   "${D}/usr/${abi_libdir}" || die

which gets it further, but it then later fails with 'multilib-strict check failed!' (Files matching a file type that is not allowed:)
Comment 4 stephenlawler 2018-11-08 15:29:46 UTC
I got this same error compiling rust w/ multilib (abi_x86_32).  The following patch got me to successfully emerge rust:

--- rust-1.29.2.ebuild.orig	2018-11-08 10:26:07.519981416 -0500
+++ rust-1.29.2.ebuild	2018-11-08 10:25:59.579981447 -0500
@@ -217,7 +217,7 @@
 		abi_libdir=$(get_abi_LIBDIR ${v##*.})
 		rust_target=$(get_abi_CHOST ${v##*.})
 		mkdir -p "${D}/usr/${abi_libdir}"
-		cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
+		cp "${D}/usr/$(get_libdir)/${P}/rustlib/$(rust_abi ${rust_target})/lib"/*.so \
 		   "${D}/usr/${abi_libdir}" || die
Comment 5 Anibal Francisco 2018-11-08 20:40:21 UTC
I'm pretty late to report, but reversing this:

https://gitweb.gentoo.org/repo/gentoo.git/patch/dev-lang/rust/rust-1.29.2.ebuild?id=f4cd97ac2e4322f75738a9edb03fe216554121a9

Makes it install fine again..
Comment 6 flowa2000 2018-11-13 22:02:09 UTC
Not sure if this is still needed, but I just wanted to add that I'm also having this issue on amd64 with gcc 8. My emerge --info: https://gitlab.com/snippets/1777836
Comment 7 Larry the Git Cow gentoo-dev 2018-11-14 16:16:37 UTC
The bug has been closed via the following commit(s):

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

commit aee297999eab95cd0c4c5ebd886874529efde55b
Author:     Dirkjan Ochtman <djc@gentoo.org>
AuthorDate: 2018-11-14 16:12:09 +0000
Commit:     Dirkjan Ochtman <djc@gentoo.org>
CommitDate: 2018-11-14 16:16:21 +0000

    dev-lang/rust: version bump to 1.30.1
    
    Fixes: https://bugs.gentoo.org/669876
    Fixes: https://bugs.gentoo.org/669918
    Signed-off-by: Dirkjan Ochtman <djc@gentoo.org>
    Package-Manager: Portage-2.3.51, Repoman-2.3.11

 dev-lang/rust/Manifest                          |  14 ++
 dev-lang/rust/files/1.30.1-clippy-sysroot.patch |  62 ++++++
 dev-lang/rust/rust-1.30.1.ebuild                | 263 ++++++++++++++++++++++++
 3 files changed, 339 insertions(+)
Comment 8 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-11-14 16:18:12 UTC
Hopefully this is fixed with the 1.30.1 update -- if not, let me know so I can investigate further. Sorry for the long wait and thanks for coming up with fixes.
Comment 9 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-11-14 16:19:47 UTC
*** Bug 670786 has been marked as a duplicate of this bug. ***
Comment 10 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-11-14 16:20:28 UTC
*** Bug 669660 has been marked as a duplicate of this bug. ***
Comment 11 flowa2000 2018-11-14 21:16:39 UTC
I'm not sure if it's due to my incompetence or some change in one of the ebuilds, but I can't install cargo (which I need for firefox) anymore, because the binaries are already installed by rust (v 1.30.1), therefore the portage check for conflicting files fails.
Comment 12 Anibal Francisco 2018-11-14 22:01:27 UTC
(In reply to flowa2000 from comment #11)
> I'm not sure if it's due to my incompetence or some change in one of the
> ebuilds, but I can't install cargo (which I need for firefox) anymore,
> because the binaries are already installed by rust (v 1.30.1), therefore the
> portage check for conflicting files fails.

Hey, well, for the time being, if you're sure you're not gonna break anything else, you could tell portage to omit package collition check and protect ownership..

FEATURES="-collision-detect -protect-owned"
Comment 13 Arfrever Frehtes Taifersar Arahesis 2018-11-15 00:27:53 UTC
(In reply to Larry the Git Cow from comment #7)
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=aee297999eab95cd0c4c5ebd886874529efde55b
> 
> commit aee297999eab95cd0c4c5ebd886874529efde55b
> Author:     Dirkjan Ochtman <djc@gentoo.org>
> AuthorDate: 2018-11-14 16:12:09 +0000
> Commit:     Dirkjan Ochtman <djc@gentoo.org>
> CommitDate: 2018-11-14 16:16:21 +0000
> 
>     dev-lang/rust: version bump to 1.30.1

There is an inconsistency in this ebuild:

Here the new variable is called "rust_target_name":

 src_configure() {
-       local rust_target="" rust_targets="" arch_cflags
+       local rust_target="" rust_targets="" rust_target_name arch_cflags

But next, the variable "rust_abi" is set:

                abi_libdir=$(get_abi_LIBDIR ${v##*.})
                rust_target=$(get_abi_CHOST ${v##*.})
+               rust_abi=$(rust_abi $rust_target)
                mkdir -p "${D}/usr/${abi_libdir}"
-               cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
+               cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_abi}/lib"/*.so \
                   "${D}/usr/${abi_libdir}" || die

And it is recommended to use ${variable} instead of $variable in ebuilds, so ${rust_target} above.
Comment 14 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-11-15 09:30:59 UTC
Arfrever: thanks for reporting, I cleaned it up a bit in 3a5b9598e49664cf3b11fb276adae40093c40d9e.