Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 629444 - dev-lang/rust fails to install on arm: dobin: build/i686-unknown-linux-gnu/stage2/bin/rustc does not exist
Summary: dev-lang/rust fails to install on arm: dobin: build/i686-unknown-linux-gnu/st...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords:
Depends on: 602440
Blocks: 609654
  Show dependency tree
 
Reported: 2017-08-31 13:15 UTC by Chí-Thanh Christopher Nguyễn
Modified: 2018-11-15 10:54 UTC (History)
3 users (show)

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


Attachments
build.log.xz (build.log.xz,73.13 KB, application/x-xz)
2017-08-31 13:15 UTC, Chí-Thanh Christopher Nguyễn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chí-Thanh Christopher Nguyễn gentoo-dev 2017-08-31 13:15:22 UTC
Created attachment 491150 [details]
build.log.xz

emerge rust on arm fails during src_install() phase because dobin looks in the wrong directory for rustc and rustdoc.

^O    Finished^O release [optimized] target(s) in 7276.46 secs
Copying stage1 rustc from stage1 (armv7-unknown-linux-gnueabihf -> armv7-unknown
-linux-gnueabihf / armv7-unknown-linux-gnueabihf)
Copying stage2 compiler (armv7-unknown-linux-gnueabihf)
Copying stage2 std from stage1 (armv7-unknown-linux-gnueabihf -> armv7-unknown-l
inux-gnueabihf / armv7-unknown-linux-gnueabihf)
Copying stage2 test from stage1 (armv7-unknown-linux-gnueabihf -> armv7-unknown-
linux-gnueabihf / armv7-unknown-linux-gnueabihf)
Copying stage2 rustc from stage1 (armv7-unknown-linux-gnueabihf -> armv7-unknown
-linux-gnueabihf / armv7-unknown-linux-gnueabihf)
Build completed successfully in 9:09:59
>>> Source compiled.
>>> Test phase [not enabled]: dev-lang/rust-1.19.0

>>> Install rust-1.19.0 into /var/tmp/portage/dev-lang/rust-1.19.0/image/ category dev-lang
!!! dobin: build/i686-unknown-linux-gnu/stage2/bin/rustc does not exist
!!! dobin: build/i686-unknown-linux-gnu/stage2/bin/rustdoc does not exist
 * ERROR: dev-lang/rust-1.19.0::gentoo failed (install phase):
 *   dobin failed

These files are actually present in in build/armv7-unknown-linux-gnueabihf/stage2/bin/

# emerge --info =dev-lang/rust-1.19.0
Portage 2.3.6 (python 3.4.3-final-0, default/linux/arm/13.0/armv7a/desktop, gcc-7.2.0, glibc-2.23-r4, 4.11.7-sun8i armv7l)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.11.7-sun8i-armv7l-with-gentoo-2.3
KiB Mem:      994316 total,    159096 free
KiB Swap:    2097148 total,   2075388 free
Timestamp of repository gentoo: Thu, 31 Aug 2017 12:30:01 +0000
sh bash 4.3_p48
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p48::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.3-r1::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.21.7::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.4::gentoo, 6.4.0::gentoo, 7.2.0::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

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

ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv7a-hardfloat-linux-gnueabi"
CFLAGS="-O2 -pipe -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard"
CHOST="armv7a-hardfloat-linux-gnueabi"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=armv7-a"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe -march=armv7-a"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=armv7-a"
GENTOO_MIRRORS="http://ftp.halifax.rwth-aachen.de/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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 aac acl acpi alsa arm armv5te armv6 armv6t2 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv ipv6 jpeg lcms ldap libnotify mad mng modules mp3 mp4 mpeg ncurses neon nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support qt5 readline sdl seccomp session spell ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" 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="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb thumb2 v4 v5 v6 v7 vfp" 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" KERNEL="linux" L10N="de en" 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" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="modesetting fbdev" 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, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Enne Eziarc 2017-10-28 20:16:39 UTC
I'm having almost the same problem trying to build it via crossdev (i.e. "i686-pc-linux-gnu-emerge --buildpkgonly dev-lang/rust"):

    Finished release [optimized] target(s) in 1364.29 secs
Copying stage1 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Copying stage2 std from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Copying stage2 test from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Copying stage2 compiler (x86_64-unknown-linux-gnu)
Build completed successfully in 1:33:07
>>> Source compiled.
>>> Test phase [not enabled]: dev-lang/rust-1.19.0

>>> Install rust-1.19.0 into /usr/i686-pc-linux-gnu/tmp/portage/dev-lang/rust-1.19.0/image/ category dev-lang
!!! dobin: build/i686-unknown-linux-gnu/stage2/bin/rustc does not exist
!!! dobin: build/i686-unknown-linux-gnu/stage2/bin/rustdoc does not exist


There seem to be two separate problems here - rust's build system ignores cross compilation (it always builds for the host target), and the ebuild uses hardcoded platform triples (causing the dobin error).
Comment 2 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-06-06 09:18:11 UTC
Can you try this with a recent 1.26 version? Support for arm should be much better now.
Comment 3 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-11-15 10:54:26 UTC
Going to call this fixed, please reopen if you still see issues.