Created attachment 486798 [details] build.log The new dev-lang/rust-1.19.0 ebuild installs unslotted binaries into /usr/bin: $ ls /var/tmp/portage/dev-lang/rust-1.19.0/image/usr/bin rustc rustdoc rust-gdb rust-lldb While rust-1.16.0 installs versioned binaries... $ qlist dev-lang/rust|grep usr/bin /usr/bin/rust-gdb-1.16.0 /usr/bin/rustc-1.16.0 /usr/bin/rustdoc-1.16.0 ...and symlinks maintained by eselect: $ ls -l /usr/bin/{rust-gdb,rustc,rustdoc} lrwxrwxrwx 1 root root 22 19 mrt 20:48 /usr/bin/rustc -> //usr/bin/rustc-1.16.0 lrwxrwxrwx 1 root root 24 19 mrt 20:48 /usr/bin/rustdoc -> //usr/bin/rustdoc-1.16.0 lrwxrwxrwx 1 root root 25 19 mrt 20:48 /usr/bin/rust-gdb -> //usr/bin/rust-gdb-1.16.0 Installing rust-1.19.0 fails if those symlinks are present: >>> Installing (1 of 2) dev-lang/rust-1.19.0::gentoo * checking 187 files for package collisions ... * package dev-lang/rust-1.19.0 NOT merged * * Detected file collision(s): * * /usr/bin/rust-gdb * /usr/bin/rustc * /usr/bin/rustdoc * * Searching all installed packages for file collisions... * * Press Ctrl-C to Stop * * None of the installed packages claim the file(s). The ebuild still installs /etc/env.d/rust/provider-rust-1.19.0 and calls eselect, but while the previous ebuild did "mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}"" the new one does "dobin "${obj}/bin/rustc" "${obj}/bin/rustdoc"". I'm guessing src_install was changed to keep the originals around, and this accidentally broke slotting? (Also, maybe rust-lldb should be added to that env file?)
I tried to get the 1.19.0 ebuild to install the files into locations equivalent to the 1.16.0 ebuild. The following diff is what was needed. Unfortunately, the rust compiler built this way does not find the rustlib directory /usr/lib64/rust-1.19.0/rustlib/ but looks for /usr/lib64/rustlib/ instead. Adding a symlink /usr/lib64/rustlib -> rust-1.19.0/rustlib let me build cargo and firefox successfully. Maybe someone with an understanding of rust's build system can have a look into this. --- a/rust-1.19.0.ebuild +++ b/rust-1.19.0.ebuild @@ -72,11 +72,6 @@ src_unpack() { } src_configure() { - echo "No configure step for rust" -} - -src_compile() { - local stage0="rust-${STAGE0_VERSION}-${TRIPLE}" if use debug ; then local optimized="false"; local debug="true"; @@ -94,6 +89,7 @@ src_compile() { submodules = false python = "${EPYTHON}" vendor = true + verbose = 1 [install] prefix = "${EPREFIX}/usr" libdir = "$(get_libdir)/${P}" @@ -107,7 +103,9 @@ src_compile() { rpath = false optimize-tests = ${optimized} EOF +} +src_compile() { local cache_dir="build/cache/${BOOTSTRAP_DATE}" mkdir -p ${cache_dir} for i in ${A}; do @@ -117,15 +115,12 @@ src_compile() { } src_install() { - default + DESTDIR="${D}" ${EPYTHON} x.py install || die + docompress "${EPREFIX}/usr/share/${P}/doc" - local obj="build/${TRIPLE}/stage2" - dobin "${obj}/bin/rustc" "${obj}/bin/rustdoc" - dobin src/etc/rust-gdb src/etc/rust-lldb - insinto "/usr/$(get_libdir)" - doins -r "${obj}/lib/"* - dodoc COPYRIGHT - doman man/* + for f in rustc rustdoc rust-gdb rust-lldb; do + mv "${ED}/usr/bin/${f}" "${ED}/usr/bin/${f}-${PV}" || die + done cat <<-EOF > "${T}"/50${P} LDPATH="/usr/$(get_libdir)/${P}" @@ -136,6 +131,7 @@ src_install() { cat <<-EOF > "${T}/provider-${P}" /usr/bin/rustdoc /usr/bin/rust-gdb + /usr/bin/rust-lldb EOF dodir /etc/env.d/rust insinto /etc/env.d/rust
dev-lang/rust-1.23.0 fixed this for the /usr/bin stuff. It still installs into /usr/lib64/rustlib, and installs files like /usr/lib64/librustc-482d6ef79768f8f7.so. This is currently fine, as all currently available dev-lang/rust versions use the "stable" slot and rust-bin installs into /opt. There's still support in the ebuild for a "beta" slot: I'm not so sure that one will work without further changes.
> It still installs into /usr/lib64/rustlib, and installs files like /usr/lib64/librustc-482d6ef79768f8f7.so. This is currently fine, as all currently available dev-lang/rust versions use the "stable" slot and rust-bin installs into /opt. There's still support in the ebuild for a "beta" slot: I'm not so sure that one will work without further changes. I've fixed it in https://github.com/rust-lang/rust/pull/46592 and separate libdir will be available in 1.25 There also a patch for 1.23 version:
Created attachment 516704 [details, diff] Fix separate libdir issue
Should be fixed in 1.23.0-r1 thanks to Oleg's patch.