Build error: ... /bin/bash /mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/work/gcc-9.2.0/libgcc/../mkinstalldirs /mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/image/usr/lib/gcc/avr/9.2.0/include /usr/bin/install -c -m 644 unwind.h /mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/image/usr/lib/gcc/avr/9.2.0/include /bin/bash /mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/work/gcc-9.2.0/libgcc/../mkinstalldirs /mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/image/usr/lib/gcc/avr/9.2.0/include /usr/bin/install -c -m 644 /mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/work/gcc-9.2.0/libgcc/gcov.h /mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/image/usr/lib/gcc/avr/9.2.0/include make[4]: Leaving directory '/mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/work/build/avr/avrxmega3/short-calls/libgcc' make[3]: Leaving directory '/mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/work/build/avr/libgcc' make[2]: Leaving directory '/mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/work/build/avr/libgcc' make[1]: Leaving directory '/mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/work/build' mv: cannot stat '/mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/image/usr/lib/libcc1*': No such file or directory * ERROR: cross-avr/gcc-9.2.0-r2::crossdev failed (install phase): * (no error message) * * Call stack: * ebuild.sh, line 125: Called src_install * environment, line 2597: Called toolchain_src_install * environment, line 3938: Called gcc_movelibs * environment, line 1261: Called die * The specific snippet of code: * mv "${ED}"/usr/$(get_libdir)/libcc1* "${D}${HOSTLIBPATH}" || die; * * If you need support, post the output of `emerge --info '=cross-avr/gcc-9.2.0-r2::crossdev'`, * the complete build log and the output of `emerge -pqv '=cross-avr/gcc-9.2.0-r2::crossdev'`. * * Please include /mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/work/gcc-build-logs.tar.bz2 in your bug report. * * The complete build log is located at '/mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/temp/build.log'. * The ebuild environment file is located at '/mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/temp/environment'. * Working directory: '/mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/work/build' * S: '/mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/work/gcc-9.2.0' >>> Failed to emerge cross-avr/gcc-9.2.0-r2, Log file: >>> '/mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/temp/build.log' localhost ~ # emerge --info '=cross-avr/gcc-9.2.0-r2::crossdev' Portage 2.3.76 (python 3.6.9-final-0, default/linux/x86/17.0/desktop/plasma, gcc-8.3.0, glibc-2.29-r2, 4.14.143-gentoo i686) ================================================================= System Settings ================================================================= System uname: Linux-4.14.143-gentoo-i686-Intel-R-_Core-TM-2_Duo_CPU_E8500_@_3.16GHz-with-gentoo-2.6 KiB Mem: 8303696 total, 930164 free KiB Swap: 10239996 total, 10128636 free Timestamp of repository gentoo: Tue, 12 Nov 2019 16:45:01 +0000 Head commit of repository gentoo: 2e153a018f756a46e3b98f43a4df42c6215c5912 sh bash 4.4_p23-r1 ld GNU ld (Gentoo 2.32 p2) 2.32.0 app-shells/bash: 4.4_p23-r1::gentoo dev-java/java-config: 2.2.0-r4::gentoo dev-lang/perl: 5.28.2-r1::gentoo dev-lang/python: 2.7.16::gentoo, 3.5.7::gentoo, 3.6.9::gentoo dev-util/cmake: 3.14.6::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.6-r1::gentoo sys-apps/openrc: 0.41.2::gentoo sys-apps/sandbox: 2.13::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r4::gentoo sys-devel/automake: 1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo sys-devel/binutils: 2.32-r1::gentoo sys-devel/gcc: 8.3.0-r1::gentoo, 9.2.0-r2::gentoo sys-devel/gcc-config: 2.1::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers) sys-libs/glibc: 2.29-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-metamanifest: yes sync-rsync-verify-max-age: 24 sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 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="@FREE" 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-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 -march=i686 -pipe" GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="nl" MAKEOPTS="-j3" 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="/var/tmp" USE="X a52 aac acpi activities alsa branding bzip2 cairo cdda cddb cdr cli consolekit crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam ffmpeg flac fortran gdbm gif gnutls gpm iconv icu imlib ipv6 jack java javascript jpeg kde kipi kwallet lame lcms libnotify libtirpc lirc lm-sensors mad matroska mng mp3 mp4 mpeg musepack ncurses networkmanager nptl nsplugin ogg opengl openmp oss pam pango pcre pdf phonon plasma png policykit ppds python qml qt5 quicktime readline sdl seccomp semantic-desktop spell split-usr sqlite ssl startup-notification svg tcpd theora tiff tk truetype udev udisks unicode upower usb v4l vdpau vorbis vpx widgets wxwidgets x264 x86 xattr xcb xcomposite xine xml xscreensaver xv xvid xvmc zip zlib" ABI_X86="32" ADA_TARGET="gnat_2018" 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 greis 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="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" 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 localhost ~ # emerge -pqv '=cross-avr/gcc-9.2.0-r2::crossdev' [ebuild NS ] cross-avr/gcc-9.2.0-r2 [8.3.0-r1, 9.1.0] USE="cxx (multilib) nptl openmp pch sanitize ssp (-altivec) -d -debug -doc (-fixed-point) -fortran -go -graphite -hardened -jit -libssp -lto% -nls -objc -objc++ -objc-gc -pgo -pie -systemtap -test -vanilla -vtv" The missing files are in /lib32/ in stead of /lib/: /mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/image/usr/lib32/libcc1.la /mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/image/usr/lib32/libcc1.so /mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/image/usr/lib32/libcc1.so.0 /mnt/data/div/tmp/portage/portage/cross-avr/gcc-9.2.0-r2/image/usr/lib32/libcc1.so.0.0.0 Seems the same bug as https://bugs.gentoo.org/582002 And I found this forum thread: https://forums.gentoo.org/viewtopic-p-8359252.html I ran into this error months ago but never looked at it afterward. I think it started after an update of sys-devel/gcc, but I'm not sure. The same eroor happens when I re-emerge installed versions 8.3.0-r1 or 9.1.0. When I change in both (I don't know which one is used): /etc/portage/env/cross-avr/gcc /etc/portage/env/cross-avr/gcc.conf LIBDIR_default='lib' to LIBDIR_default='lib32' everything compiles without problem.
Which crossdev version did you use to create avr toolchain?
I'm not sure. The first crossdev in my emerge.log is sys-devel/crossdev-20100814, but I don't have logs from before 2010. The files in /etc/portage/env/cross-avr/ are from 2012 and 2017: localhost ~ # ls -l /etc/portage/env/cross-avr/ total 36 -rw-r--r-- 1 root root 173 Sep 20 2012 avr-libc -rw-r--r-- 1 root root 238 Dec 24 2017 avr-libc.conf -rw-r--r-- 1 root root 173 Sep 20 2012 binutils -rw-r--r-- 1 root root 319 Dec 24 2017 binutils.conf -rw-r--r-- 1 root root 175 Nov 13 20:48 gcc -rw-r--r-- 1 root root 321 Nov 13 20:48 gcc.conf -rw-r--r-- 1 root root 173 Sep 20 2012 gdb -rw-r--r-- 1 root root 319 Dec 24 2017 gdb.conf -rw-r--r-- 1 root root 173 Sep 20 2012 insight Does that help you?
(In reply to nicotroost from comment #2) > I'm not sure. The first crossdev in my emerge.log is > sys-devel/crossdev-20100814, but I don't have logs from before 2010. The > files in /etc/portage/env/cross-avr/ are from 2012 and 2017: > localhost ~ # ls -l /etc/portage/env/cross-avr/ > total 36 > -rw-r--r-- 1 root root 173 Sep 20 2012 avr-libc > -rw-r--r-- 1 root root 238 Dec 24 2017 avr-libc.conf These files are very old. The 8 years old crossdev fix looks relevant: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=d1cde0072cc08279447505c57eabe647e4be5eb0 Consider rebuilding the crossdev toolchain from scratch with something like: # crossdev -C -t avr # crossdev -t avr Worth double-checking if old files go away. Non '.conf' files might still interfere.
I tried rebuilding the toolchain, but it fails with the same error during stage1. The old files are gone though: localhost ~ # ls -l /etc/portage/env/cross-avr/ total 16 -rw-r--r-- 1 root root 238 Nov 17 07:59 avr-libc.conf -rw-r--r-- 1 root root 319 Nov 17 07:59 binutils.conf -rw-r--r-- 1 root root 319 Nov 17 07:59 gcc.conf -rw-r--r-- 1 root root 319 Nov 17 07:59 gdb.conf
Crossdev usually generates a bit of output and packages logs for you. Can you attach both?
Created attachment 596502 [details] cross-avr-info
Created attachment 596504 [details] cross-avr-binutils
Created attachment 596506 [details] cross-avr-gcc-stage1
Just upgraded to sys-devel/gcc-9.2.0-r2, but the problem persist.
These are just build logs. I'm trying to compare against my system where things works fine and can't make progress so far.. crossdev also collects config.log files and packages them up in a single tarball. Did you not get one? The path to tarball is reported in one of last lines reported by crossdev run.
(In reply to nicotroost from comment #0) > When I change in both (I don't know which one is used): > /etc/portage/env/cross-avr/gcc > /etc/portage/env/cross-avr/gcc.conf > > LIBDIR_default='lib' > to > LIBDIR_default='lib32' > > everything compiles without problem. Oh, now I see the difference compared to my build log. Your gcc assumes target libs to live in 'lib32'. That's a problem: Mine: /bin/bash ./libtool --mode=install /usr/lib/portage/python2.7/ebuild-helpers/xattr/install -c libcc1.la '/dev/shm/portage/cross-avr/gcc-9.2.0-r2/image/usr/lib/../lib' Your's: /bin/bash ./libtool --mode=install /usr/bin/install -c libcc1.la '/dev/shm/portage/cross-avr/gcc-9.2.0-r2/image/usr/lib/../lib32' It should be ".../usr/lib/../lib'". Do you have any related LIBDIR overrides in /etc/portage/make.conf? Lets try to find why. Can you post the output of the following commands: 1. portageq envvar ABI 2. portageq envvar LIBDIR_$(portageq envvar ABI) 3. ls -ld /lib* /usr/lib* 4. ls -ld /usr/avr/lib* /usr/avr/usr/lib*
localhost ~ # portageq envvar ABI x86 localhost ~ # portageq envvar LIBDIR_$(portageq envvar ABI) lib localhost ~ # ls -ld /lib* /usr/lib* drwxr-xr-x 17 root root 12288 Nov 17 16:49 /lib drwxr-xr-x 146 root root 147456 Nov 17 16:01 /usr/lib drwxr-xr-x 2 root root 4096 Jul 13 07:58 /usr/lib32 drwxr-xr-x 15 root root 4096 Oct 23 21:42 /usr/libexec localhost ~ # ls -ld /usr/avr/lib* /usr/avr/usr/lib* drwxr-xr-x 2 root root 4096 Nov 17 16:51 /usr/avr/lib drwxr-xr-x 2 root root 4096 Nov 17 16:51 /usr/avr/usr/lib
(In reply to Sergei Trofimovich from comment #11) > > Do you have any related LIBDIR overrides in /etc/portage/make.conf? > No, the only thing I can find: localhost ~ # grep -rn '/etc' -e 'LIBDIR' /etc/portage/env/cross-avr/binutils.conf:12:LIBDIR_default='lib' /etc/portage/env/cross-avr/gcc.conf:12:LIBDIR_default='lib' /etc/portage/env/cross-avr/avr-libc.conf:9:LIBDIR_default='lib' /etc/portage/env/cross-avr/gdb.conf:12:LIBDIR_default='lib' /etc/rpm/macros.d/jpackage.macros:123:%add_jvm_extension JAVA_LIBDIR=%{buildroot}/%{_javadir} %{_bindir}/jvmjar -l /etc/java/java.conf:6:JAVA_LIBDIR=/usr/share/java /etc/java/java.conf:9:JNI_LIBDIR=/usr/lib/java localhost ~ # grep -rn '/etc' -e 'lib32' /etc/env.d/gcc/i686-pc-linux-gnu-8.3.0:8:MULTIOSDIRS="../lib32" /etc/env.d/gcc/i686-pc-linux-gnu-9.2.0:8:MULTIOSDIRS="../lib32" /etc/sandbox.d/00default:17:SANDBOX_WRITE="/usr/tmp/conftest:/usr/lib/conftest:/usr/lib32/conftest:/usr/lib64/conftest:/usr/tmp/cf:/usr/lib/cf:/usr/lib32/cf:/usr/lib64/cf" /etc/revdep-rebuild/50-libreoffice-bin:2:/usr/lib32/libreoffice localhost ~ # grep -rn '/usr' -e 'usr/lib/../lib32' /usr/bin/libtool:11851:compiler_lib_search_dirs="/usr/lib/gcc/i686-pc-linux-gnu/9.2.0 /usr/lib/gcc/i686-pc-linux-gnu/9.2.0/../../../../lib32 /usr/lib/../lib32 /usr/lib/gcc/i686-pc-linux-gnu/9.2.0/../../../../i686-pc-linux-gnu/lib /usr/lib/gcc/i686-pc-linux-gnu/9.2.0/../../.." /usr/bin/libtool:11862:compiler_lib_search_path="-L/usr/lib/gcc/i686-pc-linux-gnu/9.2.0 -L/usr/lib/gcc/i686-pc-linux-gnu/9.2.0/../../../../lib32 -L/usr/lib/../lib32 -L/usr/lib/gcc/i686-pc-linux-gnu/9.2.0/../../../../i686-pc-linux-gnu/lib -L/usr/lib/gcc/i686-pc-linux-gnu/9.2.0/../../.." /usr/bin/libtool:12155:compiler_lib_search_dirs="/usr/lib/gcc/i686-pc-linux-gnu/9.2.0 /usr/lib/gcc/i686-pc-linux-gnu/9.2.0/../../../../lib32 /usr/lib/../lib32 /usr/lib/gcc/i686-pc-linux-gnu/9.2.0/../../../../i686-pc-linux-gnu/lib /usr/lib/gcc/i686-pc-linux-gnu/9.2.0/../../.." /usr/bin/libtool:12166:compiler_lib_search_path="-L/usr/lib/gcc/i686-pc-linux-gnu/9.2.0 -L/usr/lib/gcc/i686-pc-linux-gnu/9.2.0/../../../../lib32 -L/usr/lib/../lib32 -L/usr/lib/gcc/i686-pc-linux-gnu/9.2.0/../../../../i686-pc-linux-gnu/lib -L/usr/lib/gcc/i686-pc-linux-gnu/9.2.0/../../.."
(In reply to nicotroost from comment #12) > localhost ~ # portageq envvar ABI > x86 > localhost ~ # portageq envvar LIBDIR_$(portageq envvar ABI) > lib > localhost ~ # ls -ld /lib* /usr/lib* > drwxr-xr-x 17 root root 12288 Nov 17 16:49 /lib > drwxr-xr-x 146 root root 147456 Nov 17 16:01 /usr/lib > drwxr-xr-x 2 root root 4096 Jul 13 07:58 /usr/lib32 Aha, there it is! You system should not have /usr/lib32 directory but does. Unfortunately gcc is a bit too smart and infers presence of /usr/lib32 as a hint that it is your primary libdir. You will need to safely get rid of /usr/lib32 and rebuild gccs. Do you know where it comes from? The following should hint at the packages that own files there: $ qfile /usr/lib32/* $ ls -la /usr/lib32
localhost ~ # qfile /usr/lib32/* sys-libs/binutils-libs: /usr/lib32/libiberty.a localhost ~ # ls -la /usr/lib32 total 440 drwxr-xr-x 2 root root 4096 Jul 13 07:58 . drwxr-xr-x 17 root root 4096 Nov 18 18:01 .. -rw-r--r-- 1 root root 438952 Jul 3 20:41 libiberty.a
localhost ~ # equery belongs /usr/lib32/libiberty.a * Searching for /usr/lib32/libiberty.a ... sys-libs/binutils-libs-2.32-r1 (/usr/lib32/libiberty.a) localhost ~ # eix sys-libs/binutils-libs [I] sys-libs/binutils-libs Available versions: [M]2.27(0/2.27) [M]2.28.1(0/2.28.1) [M]2.29.1-r1(0/2.29.1) [M]2.30-r4(0/2.30-r1) [M]2.31.1-r6(0/2.31.1-r1) 2.32-r1(0/2.32) ~2.33.1(0/2.33.1) {64-bit-bfd multitarget nls static-libs ABI_MIPS="n32 n64 o32" ABI_RISCV="lp64 lp64d" ABI_S390="32 64" ABI_X86="32 64 x32"} Installed versions: 2.32-r1(0/2.32)(08:41:23 PM 07/03/2019)(-64-bit-bfd -multitarget -nls -static-libs ABI_MIPS="-n32 -n64 -o32" ABI_RISCV="-lp64 -lp64d" ABI_S390="-32 -64" ABI_X86="32 -64 -x32") Homepage: https://sourceware.org/binutils/ Description: Core binutils libraries (libbfd, libopcodes, libiberty) for external packages Is it safe to just rm -r /usr/lib32 and emerge -1 sys-libs/binutils-lib?
(In reply to nicotroost from comment #16) > localhost ~ # equery belongs /usr/lib32/libiberty.a > * Searching for /usr/lib32/libiberty.a ... > sys-libs/binutils-libs-2.32-r1 (/usr/lib32/libiberty.a) > > localhost ~ # eix sys-libs/binutils-libs > [I] sys-libs/binutils-libs > Available versions: [M]2.27(0/2.27) [M]2.28.1(0/2.28.1) > [M]2.29.1-r1(0/2.29.1) [M]2.30-r4(0/2.30-r1) [M]2.31.1-r6(0/2.31.1-r1) > 2.32-r1(0/2.32) ~2.33.1(0/2.33.1) {64-bit-bfd multitarget nls static-libs > ABI_MIPS="n32 n64 o32" ABI_RISCV="lp64 lp64d" ABI_S390="32 64" ABI_X86="32 > 64 x32"} > Installed versions: 2.32-r1(0/2.32)(08:41:23 PM > 07/03/2019)(-64-bit-bfd -multitarget -nls -static-libs ABI_MIPS="-n32 -n64 > -o32" ABI_RISCV="-lp64 -lp64d" ABI_S390="-32 -64" ABI_X86="32 -64 -x32") > Homepage: https://sourceware.org/binutils/ > Description: Core binutils libraries (libbfd, libopcodes, > libiberty) for external packages > > Is it safe to just rm -r /usr/lib32 and emerge -1 sys-libs/binutils-lib? I suggest trying to just rebuild sys-libs/binutils-lib and check it the file/dir goes away on it's own. You have USE=-static-libs and that should not install any .a files. Otherwise it should be safe to delete files manually. Static libs are fine to lose.
(In reply to Sergei Trofimovich from comment #17) > I suggest trying to just rebuild sys-libs/binutils-lib and check it the > file/dir goes away on it's own. You have USE=-static-libs and that should > not install any .a files. > > Otherwise it should be safe to delete files manually. Static libs are fine > to lose. Minor correction: Actually, it's slightly more nuanced: libiberty.a is always statically linked on Gentoo (I keep forgetting about that) regardless of USE=static-libs. Some applications (like gcc) do use it at build time. If you already deleted libiberty.a it should not be a problem: just rebuild binutils-libs.
No luck. I moved libiberty.a to /usr/lib/, then removed the /usr/lib32 directory and rebuild sys-libs/binutils-libs. But sys-libs/binutils-libs recreate /usr/lib32/libiberty.a. When I remove the /usr/lib32 directory and try to rebuild the toolchain it fails with the same error. So beside the question if binutils-libs should put the file there, I guess the existence of the /usr/lib32 directory is not the problem.
(In reply to nicotroost from comment #19) > No luck. I moved libiberty.a to /usr/lib/, then removed the /usr/lib32 > directory and rebuild sys-libs/binutils-libs. But sys-libs/binutils-libs > recreate /usr/lib32/libiberty.a. > > When I remove the /usr/lib32 directory and try to rebuild the toolchain it > fails with the same error. So beside the question if binutils-libs should > put the file there, I guess the existence of the /usr/lib32 directory is not > the problem. The order of actions should be the following: 1. remove /usr/lib32 dir and it's content 2. rebuild sys-devel/gcc, looks like in your case it's 2: sys-devel/gcc:8.3.0 and sys-devel/gcc:9.2.0 3. sys-devel/libtool Once all 3 are done rerun crossdev. If you have build failures on any of these steps please post the build.log and we'll try to figure out something. gcc might be trickiest as it uses libtool internaly.
> The order of actions should be the following: > 1. remove /usr/lib32 dir and it's content > 2. rebuild sys-devel/gcc, looks like in your case it's 2: > sys-devel/gcc:8.3.0 and sys-devel/gcc:9.2.0 > 3. sys-devel/libtool > > Once all 3 are done rerun crossdev. That did it! Everything compiled fine without errors. Thanks a lot for all your time and effort Sergei.
Woohoo! I'm closing it as INVALID as the system was in unexpected state. I wonder what made your system to create initial /usr/lib32. It could be any package in the past.
Well, sys-libs/binutils-libs keeps creating the /usr/lib32 directory when re-emerging, so I'll guess the bug is in sys-libs/binutils-libs.
Ah no, I did not look good. libiberty.a is now placed in /usr/lib, so everything is fine. Thanks again Sergei.