Rust 1.48 is not compiling due to a source file which was probably moved. Reproducible: Always Steps to Reproduce: 1. emerge -1 =dev-lang/rust-1.48.0 Actual Results: >>> Configuring source in /tmp/portage/dev-lang/rust-1.48.0/work/rustc-1.48.0-src ... sed: can't read src/librustc_target/spec/wasm32_base.rs: No such file or directory $ find -name wasm32_base.rs ./vendor/rustc-ap-rustc_target/src/spec/wasm32_base.rs ./compiler/rustc_target/src/spec/wasm32_base.rs --- $ emerge --info Portage 3.0.10 (python 3.9.0-final-0, default/linux/amd64/17.1/no-multilib, gcc-10.2.0, glibc-2.32-r3, 5.9.10-gentoo-BlackBox x86_64) ================================================================= System uname: Linux-5.9.10-gentoo-BlackBox-x86_64-Intel-R-_Core-TM-_i7-6700HQ_CPU_@_2.60GHz-with-glibc2.32 KiB Mem: 16272344 total, 9692612 free KiB Swap: 0 total, 0 free Head commit of repository leonardohn: 1f6132cecda831b8bc11a1d79438f48352b9652c Timestamp of repository lto-overlay: Fri, 06 Nov 2020 12:24:42 +0000 Head commit of repository lto-overlay: 17adbe636c527f6785641f734e9aa49e32884d41 Timestamp of repository mv: Fri, 13 Nov 2020 21:05:22 +0000 Head commit of repository mv: de65d5bdce37f07fcaff8f727e84d8a8d458a3ea Head commit of repository gentoo: f45dbfd03e694603075feb4ae1e77541627ad5b0 sh bash 5.0_p18 ld GNU ld (Gentoo 2.35.1 p2) 2.35.1 ccache version 4.1 [disabled] app-shells/bash: 5.0_p18::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.30.3-r1::gentoo dev-lang/python: 3.8.6-r1::lto-overlay, 3.9.0-r1::lto-overlay dev-util/ccache: 4.1::gentoo dev-util/cmake: 3.19.0::gentoo sys-apps/baselayout: 2.7-r1::gentoo sys-apps/openrc: 0.42.1::gentoo sys-apps/sandbox: 2.20::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo sys-devel/automake: 1.16.3-r1::gentoo sys-devel/binutils: 2.35.1-r1::gentoo sys-devel/gcc: 10.2.0-r3::gentoo sys-devel/gcc-config: 2.3.2-r1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.9::gentoo (virtual/os-headers) sys-libs/glibc: 2.32-r3::gentoo Repositories: leonardohn location: /var/db/repos/leonardohn sync-type: git sync-uri: https://github.com/leonardohn/gentoo-overlay.git masters: gentoo lto-overlay location: /var/db/repos/lto-overlay sync-type: git sync-uri: https://github.com/gentoo-mirror/lto-overlay.git masters: gentoo mv mv location: /var/db/repos/mv sync-type: git sync-uri: https://github.com/gentoo-mirror/mv.git masters: gentoo crossdev location: /var/db/repos/crossdev masters: gentoo priority: 10 gentoo location: /var/db/repos/gentoo sync-type: git sync-uri: https://github.com/gentoo/gentoo.git sync-user: portage:portage priority: 1000 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=skylake -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=8 -fuse-linker-plugin -falign-functions=32 -pipe" CHOST="x86_64-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/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=skylake -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=8 -fuse-linker-plugin -falign-functions=32 -pipe" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="-a -j8" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH 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="-march=skylake -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=8 -fuse-linker-plugin -falign-functions=32 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-march=skylake -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=8 -fuse-linker-plugin -falign-functions=32 -pipe" GENTOO_MIRRORS="https://gentoo.c3sl.ufpr.br" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j8" PKGDIR="/var/cache/binpkgs" 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="acl alsa amd64 apng berkdb bzip2 cairo cli crypt curl dbus dri egl eglfs elogind fontconfig fortran gdbm gif git gles2 harfbuzz iconv icu introspection ipv6 jit jpeg jpeg2k libglvnd libtirpc lto luajit lz4 mp3 ncurses nls nptl openh264 openmp openssl pam pcre pgo png readline seccomp speex split-usr sqlite ssl svg tcpd theora threads tiff truetype udev unicode usb vaapi vorbis vpx vulkan wayland webp xattr zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2018" 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 sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis 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="en en_US pt pt_BR" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="X86 WebAssembly" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8 python3_9" RUBY_TARGETS="ruby25 ruby26" USERLAND="GNU" VIDEO_CARDS="intel i965 iris" 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, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
I can confirm this happens on my box, too. It is triggered by wasm USE-flag. The fix is to change one forgotten path in the ebuild: diff --git a/dev-lang/rust/rust-1.48.0.ebuild b/dev-lang/rust/rust-1.48.0.ebuild index 16a3d1da232..d89b0fa8404 100644 --- a/dev-lang/rust/rust-1.48.0.ebuild +++ b/dev-lang/rust/rust-1.48.0.ebuild @@ -213,7 +213,7 @@ src_configure() { if use system-llvm; then # un-hardcode rust-lld linker for this target # https://bugs.gentoo.org/715348 - sed -i '/linker:/ s/rust-lld/wasm-ld/' src/librustc_target/spec/wasm32_base.rs || die + sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm32_base.rs || die fi fi rust_targets="${rust_targets#,}" With this, src_configure passes for me. (but there is unrelated build error https://bugs.gentoo.org/756340)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a6488f54984ce1068acba95416ae40f43d7e2b7 commit 4a6488f54984ce1068acba95416ae40f43d7e2b7 Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2020-11-24 17:31:50 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2020-11-24 17:34:12 +0000 dev-lang/rust: fix wasm linker in 1.48.0 Closes: https://bugs.gentoo.org/756286 Package-Manager: Portage-3.0.10, Repoman-3.0.2 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> dev-lang/rust/rust-1.48.0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
thanks for catching, I will replace this sed with a patch bit later.