Summary: | app-portage/unsymlink-lib: bad behavior when /usr/lib32 is a bind-mount | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Bob Johnson <bob> |
Component: | Profiles | Assignee: | Michał Górny <mgorny> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arthur, jstein, mmk |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 506276 | ||
Attachments: |
gzipped build log
gcc build logs build environment emerge --info (reavertm) gcc-build-logs.tar.bz2 (reavertm) |
Description
Bob Johnson
2018-01-06 03:48:45 UTC
Created attachment 513496 [details]
gzipped build log
Created attachment 513552 [details]
gcc build logs
Created attachment 513554 [details]
build environment
Tried ldconfig, then gcc. No go. Tried rebuilding sys-libs/glibc, then gcc. Still no go. Tried rebuilding sys-devel/binutils, then gcc. That allowed sys-devel/gcc-6.4.0 to build and install. Perhaps step #9 on the 17.1 profile change news item should not condition the rebuild of sys-libs/glibc and sys-devel/binutils on switching from profile 13.0, but instead recommend rebuilding gcc, glibc and binutils in every case. Happens to me as well. Even after re-emerging whole world. Even with the latest 6.4.0-r1 Portage 2.3.19 (python 3.4.6-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-7.2.0, glibc-2.26-r5, 4.14.12-gentoo x86_64) ================================================================= System uname: Linux-4.14.12-gentoo-x86_64-Intel-R-_Core-TM-_i5-2500K_CPU_@_3.30GHz-with-gentoo-2.4.1 KiB Mem: 16345824 total, 7893364 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Sun, 07 Jan 2018 12:30:02 +0000 Head commit of repository gentoo: 358a51718a528645a890dbed23e37f3e8c8de4f0 sh bash 4.4_p12 ld GNU ld (Gentoo 2.29.1 p3) 2.29.1 app-shells/bash: 4.4_p12::gentoo dev-lang/perl: 5.26.1-r1::gentoo dev-lang/python: 2.7.14-r1::gentoo, 3.4.6-r1::gentoo dev-util/cmake: 3.10.1::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.4.1-r2::gentoo sys-apps/openrc: 0.34.11::gentoo sys-apps/sandbox: 2.12::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r4::gentoo sys-devel/automake: 1.15.1-r1::gentoo sys-devel/binutils: 2.29.1-r1::gentoo sys-devel/gcc: 6.4.0::gentoo, 7.2.0-r1::gentoo sys-devel/gcc-config: 1.9.1::gentoo sys-devel/libtool: 2.4.6-r4::gentoo sys-devel/make: 4.2.1-r1::gentoo sys-kernel/linux-headers: 4.14::gentoo (virtual/os-headers) sys-libs/glibc: 2.26-r5::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: my location: /usr/local/my masters: gentoo priority: 0 c2p-overlay location: /var/lib/layman/c2p-overlay masters: gentoo priority: 50 deadbeef-overlay location: /var/lib/layman/deadbeef-overlay masters: gentoo priority: 50 scrill location: /var/lib/layman/scrill masters: gentoo priority: 50 steam-overlay location: /var/lib/layman/steam-overlay masters: gentoo priority: 50 vortex location: /var/lib/layman/vortex masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -mtune=native -O2 -pipe -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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="-march=native -mtune=native -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps=y --quiet-build=n" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer multilib-strict 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" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="ru_RU.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="ru en" MAKEOPTS="-j5" 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="/tmp" USE="X a52 aac acl acpi activities aes aften alsa amd64 amr ass audio avx bash-completion branding bzip2 cairo cdda cdr clang cleartype consolekit cracklib crypt css cups cxx dbus declarative device-mapper djvu dri dts dv dvd dvdr egl encode exif faac faad fam fat ffmpeg firefox firmware-loader flac fontconfig gd gif glamor gles gpm gzip iconv icu id3tag ieee1394 imagemagick ipv6 jit jpeg kde keymap ladspa lame lash lcms libass libnotify lm_sensors lzma lzo mad matroska midi mmx mmxext mng modules mp3 mp4 mpeg mplayer mtp mudflap multilib ncurses nls nptl ntfs nvidia ogg opengl openmp opus pam pango pcre pdf phonon pie plasma png policykit popcnt ppds pppd pulseaudio qml qt3support qt5 quicktime rar raw readline scanner sdl seccomp session sse sse2 sse3 sse4_1 sse4_2 ssl ssp ssse3 startup-notification svc svg sysfs tcpd theora threads tiff toolame truetype twolame udev udisks unicode upower usb vaapi vdpau vorbis vpx wav wavpack widgets win32codecs wxwidgets x264 x265 xattr xcb xcomposite xml xorg xscreensaver xulrunner xv xvfb xvid xvmc zip zlib" ABI_X86="64" ALSA_CARDS="emu10k1" 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_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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="evdev" KERNEL="linux" L10N="ru 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 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="nvidia intel i965" 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_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS Confirmed, similar error in my case: /bin/ld: skipping incompatible /usr/lib/../lib/libc.so when searching for -lc /usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/../lib/libc.a when searching for -lc /usr/x86_64-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/usr/lib/../lib/crti.o' is incompatible with i386 output /usr/x86_64-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/usr/lib/../lib/crtn.o' is incompatible with i386 output In my case profile changes force enables PIE: Calculating dependencies... done! [ebuild R ] sys-devel/gcc-6.4.0:6.4.0::gentoo USE="cxx fortran (multilib) nptl openmp pch (pie*) sanitize ssp vtv (-altivec) (-awt) -cilk -debug -doc (-fixed-point) (-gcj) -go -graphite (-hardened) (-jit) (-libssp) -mpx -nls -objc -objc++ -objc-gc -pgo -regression-test -vanilla" 0 KiB Created attachment 513692 [details]
emerge --info (reavertm)
Created attachment 513694 [details]
gcc-build-logs.tar.bz2 (reavertm)
> My /usr/lib32 directory is empty as I would expect after running unsymlink-lib --finish.
It should not be empty. It should be a symlink to 'lib' at this point. Are you sure that --finish didn't report any failures?
(In reply to Maciej Mrozowski from comment #6) > Confirmed, similar error in my case: > > /bin/ld: skipping incompatible /usr/lib/../lib/libc.so when searching for -lc > /usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible > /usr/lib/../lib/libc.a when searching for -lc > /usr/x86_64-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file > `/usr/lib/../lib/crti.o' is incompatible with i386 output > /usr/x86_64-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file > `/usr/lib/../lib/crtn.o' is incompatible with i386 output This is a completely different error. My guess would be that you hadn't migrated lib at all. Indeed, sorry for the noise. I could perfectly change to profile 17.1 when following the NEWS I came from profile 17.0 : I had done all the 17.0 change long before head (emerge -e world) Perhaps doing the transition 13.0 to 17.1 in one step instead of two steps is just too much of an effort ? (In reply to Michał Górny from comment #9) > > My /usr/lib32 directory is empty as I would expect after running unsymlink-lib --finish. > > It should not be empty. It should be a symlink to 'lib' at this point. Are > you sure that --finish didn't report any failures? I don't recall seeing any errors. However, this system has separate /usr/* directories bind-mounted onto an SSD drive, like this in /etc/fstab: /ssd/opt /opt none bind /ssd/usr/bin /usr/bin none bind /ssd/usr/games /usr/games none bind /ssd/usr/include /usr/include none bind /ssd/usr/lib32 /usr/lib32 none bind /ssd/usr/lib64 /usr/lib64 none bind /ssd/usr/libexec /usr/libexec none bind /ssd/usr/local /usr/local none bind /ssd/usr/sbin /usr/sbin none bind /ssd/usr/share /usr/share none bind This system also has an initramfs due to the separate /usr mounts, so it's possible I ran into a corner case. I eventually got gcc-6.4.0 to recompile itself as noted earlier, and manually removed /usr/lib32 after finishing the news item (and then moved /usr/lib to the SSD and did a bind-mount of that). So far I haven't run into any other problems with 17.1 on this system. I still have a server (without bind mounts) and my main workstation (with bind mounts) to transition to 17.1 after I more fully test this backup system. I'll log the output unsymlink-lib script when I transition the workstation. If I encounter the same issue I'll post it here. (In reply to Ulenrich from comment #12) > I could perfectly change to profile 17.1 when following the NEWS > I came from profile 17.0 : > I had done all the 17.0 change long before head (emerge -e world) > Perhaps doing the transition 13.0 to 17.1 in one step instead of two steps > is just too much of an effort ? All of my systems were already at 17.0 before I transitioned my 'test' system to 17.1. I agree that going directly from 13.0 to 17.1 could be fraught with difficulties. The bind mounts explain why it couldn't replace lib32 with a symlink. Ok, I'm going to assume this whole issue boils down to /usr/lib32 being a bind-mount. I think that unsymlink-lib should have thrown an error in this case but maybe rename() works different. I will investigate this further. That works for me. The reason I switched to 17.1 so soon on this system was because I wanted to sort out what blew up before 17.1 hit stable and impacted my production systems. Honestly, as one of the separate /usr guys swimming against the systemd tide I knew I was going to be a corner case, and I actually encountered far fewer issues than I expected. Nothing show-stopping so far. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6fb34dac151d7fada49ad4693b77d26fa643d84 commit a6fb34dac151d7fada49ad4693b77d26fa643d84 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2018-01-09 17:17:51 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2018-01-09 17:19:23 +0000 app-portage/unsymlink-lib: Bump to v10 Bump to v10 that detects mount point at lib32. Sadly, it does not support replacing it yet but it should fail early. Bug: https://bugs.gentoo.org/643632 app-portage/unsymlink-lib/Manifest | 1 + app-portage/unsymlink-lib/unsymlink-lib-10.ebuild | 25 +++++++++++++++++++++++ 2 files changed, 26 insertions(+)} I was wrong there. It doesn't stop with an error but merely prints information that it couldn't remove 'lib32' and that you need to replace it with the symlink manually. I suppose you might have missed that. Given that we support resuming --finish nowadays, maybe I should just make it fatal and ask the user to unmount and then resume. (In reply to Michał Górny from comment #19) > I was wrong there. It doesn't stop with an error but merely prints > information that it couldn't remove 'lib32' and that you need to replace it > with the symlink manually. I suppose you might have missed that. > > Given that we support resuming --finish nowadays, maybe I should just make > it fatal and ask the user to unmount and then resume. Yes, it's possible I might have missed that. I remember doing --pretend on the other steps and looking closely at the output, but not on the --finish step. I was just happy it rebooted and I could log back in to KDE :-) I guess it worked for the most part because most of the system is 64-bit; it was only when it started doing multilib stuff like gcc that issues arose. Since us bind-mount guys will likely bind /usr/lib anyway (as I eventually did), forcing a stop and resume might make it more obvious what needs to be done manually for folks who have separate /usr mounts. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a514c6f017bfbf921745cfe87e54dd2b15b236b commit 6a514c6f017bfbf921745cfe87e54dd2b15b236b Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2018-01-10 09:17:47 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2018-01-10 09:30:47 +0000 app-portage/unsymlink-lib: Bump to v11, with lib32 removal fix Bump to v11 that improves handling of lib32 removal failures. The errors are now fatal and request resuming explicitly, rather than outputting a warning that is easily missed. This also lets us allow lib32 to be a mount point again. This version also tries to give more explicit explanation when lib32 is actually a mount point. However, the os.path.ismount() function does not seem to detect bind mounts, as in the linked bug report. Closes: https://bugs.gentoo.org/643632 app-portage/unsymlink-lib/Manifest | 1 + app-portage/unsymlink-lib/unsymlink-lib-11.ebuild | 25 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) |