Created attachment 666536 [details] /var/log/genkernel.log Hi, Following emerge @world and update from =sys-kernel/genkernel-4.0.10 to =sys-kernel/genkernel-4.1.2-r3, I'm unable to compile any Linux kernel on my ia64 workstation. From /var/log/genkernel.log: [CC] liblvm2cmd.so ia64-unknown-linux-gnu-gcc -shared -Wl,-soname,liblvm2cmd.so.2.02 \ -Os -pipe -fomit-frame-pointer -I/var/tmp/genkernel/gk_VUq18tKK/lvm/buildroot/usr/include -fPIC -Wl,--version-script,.export.sym -L../libdm -L../lib -L../libdaemon/client -L../daemons/dmeventd -o liblvm2cmd.so \ -Wl,-whole-archive liblvm2cmd.a -Wl,-no-whole-archive \ -llvm-internal ../base/libbase.a -ldevmapper-event -ldaemonclient -L/var/tmp/genkernel/gk_VUq18tKK/lvm/buildroot/usr/lib -ludev -ldl -L/var/tmp/genkernel/gk_VUq18tKK/lvm/buildroot/usr/lib -lblkid -ldevmapper -laio /usr/lib/gcc/ia64-unknown-linux-gnu/10.2.0/../../../libc.a(vfprintf-internal.o): in function `printf_positional': (.text+0x1571): relocation truncated to fit: GPREL22 against symbol `__printf_arginfo_table' defined in __libc_freeres_ptrs section in /usr/lib/gcc/ia64-unknown-linux-gnu/10.2.0/../../../libc.a(reg-printf.o) (.text+0x16e2): relocation truncated to fit: GPREL22 against symbol `__printf_va_arg_table' defined in __libc_freeres_ptrs section in /usr/lib/gcc/ia64-unknown-linux-gnu/10.2.0/../../../libc.a(reg-type.o) (.text+0x41c2): relocation truncated to fit: GPREL22 against symbol `__printf_va_arg_table' defined in __libc_freeres_ptrs section in /usr/lib/gcc/ia64-unknown-linux-gnu/10.2.0/../../../libc.a(reg-type.o) /usr/lib/gcc/ia64-unknown-linux-gnu/10.2.0/../../../libc.a(vfprintf-internal.o): in function `__vfprintf_internal': (.text+0x53b1): relocation truncated to fit: GPREL22 against symbol `__printf_va_arg_table' defined in __libc_freeres_ptrs section in /usr/lib/gcc/ia64-unknown-linux-gnu/10.2.0/../../../libc.a(reg-type.o) collect2: error: ld returned 1 exit status make[1]: *** [Makefile:167: lvm.static] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/var/tmp/genkernel/gk_VUq18tKK/lvm/LVM2.2.02.187/tools' make: *** [make.tmpl:365: tools] Error 2 * ERROR: Command 'nice -n10 make -j3 V=1' failed! * ERROR: create_initramfs(): append_data(): append_devicemanager(): populate_binpkg(): gkbuild(): Failed to create binpkg of lvm-2.02.187! From https://bugs.gentoo.org/723268#c16, genkernel tries to link in static libc into a shared library. Please let me know how I can help further. Thanks, Émeric
emerge --info output: Portage 3.0.8 (python 3.7.9-final-0, default/linux/ia64/17.0/desktop/gnome, gcc-10.2.0, glibc-2.32-r2, 4.19.151-gentoo-ia64 ia64) ================================================================= System uname: Linux-4.19.151-gentoo-ia64-ia64-Madison-with-gentoo-2.7 KiB Mem: 24984432 total, 23344320 free KiB Swap: 499696 total, 499696 free Timestamp of repository gentoo: Fri, 16 Oct 2020 17:30:01 +0000 Head commit of repository gentoo: 2ed891b9d8baa2541f4e02d33c7abe73f31bc628 sh bash 5.0_p18 ld GNU ld (Gentoo 2.35.1 p1) 2.35.1 app-shells/bash: 5.0_p18::gentoo dev-lang/perl: 5.30.3-r1::gentoo dev-lang/python: 2.7.18-r4::gentoo, 3.7.9::gentoo, 3.8.6::gentoo, 3.9.0::gentoo dev-util/cmake: 3.18.4::gentoo sys-apps/baselayout: 2.7::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.2::gentoo sys-devel/binutils: 2.35.1::gentoo sys-devel/gcc: 9.3.0::gentoo, 10.2.0-r2::gentoo sys-devel/gcc-config: 2.3.2::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-r2::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-max-age: 24 sync-rsync-verify-jobs: 1 sync-rsync-extra-opts: sync-rsync-verify-metamanifest: yes localrepo location: /var/db/repos/localrepo masters: gentoo ACCEPT_KEYWORDS="ia64 ~ia64" ACCEPT_LICENSE="@FREE" CBUILD="ia64-unknown-linux-gnu" CFLAGS="-O2 -pipe" CHOST="ia64-unknown-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" CXXFLAGS="-O2 -pipe" DISTDIR="/var/cache/distfiles" 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="-O2 -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 qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/" LANG="fr_FR.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="fr" 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 acl acpi alsa berkdb branding bzip2 cairo cdda cdr cli colord crypt cups dbus dri dts dvdr eds elogind encode evo exif flac fortran gdbm gif gnome gnome-keyring gpm gstreamer gtk gui ia64 iconv icu introspection ipv6 jpeg lcms libglvnd libnotify libsecret libtirpc mad mng mp3 mp4 mpeg nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio readline sdl spell split-usr ssl startup-notification svg tcpd tiff tracker truetype udev udisks unicode upower usb vorbis wayland wxwidgets x264 xattr xcb xml xv xvid zlib" ADA_TARGET="gnat_2018" ALSA_CARDS="fm801" 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" 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="fr" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" RUBY_TARGETS="ruby25 ruby26" USERLAND="GNU" VIDEO_CARDS="fbdev radeon r300" 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
emerge -pqv output: [ebuild U ] sys-kernel/genkernel-4.1.2-r3 [4.0.10] USE="firmware (-ibm)"
Got the same issue as well on.
No regression. Patches welcome. I never hit this by myself.
Looks like the real command tries to link a static 'lvm.static' binary. My guess is that it overflows 16MB .text section default and overflows GPREL22 relocation. There probably is no simple workaround for it aside from disabling lvm support in genkernel. I'll try to check where most code bloat comes from. Maybe we can find a compiler option to mitigate it. guppy /var/tmp/genkernel/gk_MzQjifn7/lvm/LVM2.2.02.187/tools # LANG=C ia64-unknown-linux-gnu-gcc -Os -pipe -fomit-frame-pointer -I/var/tmp/genkernel/gk_MzQjifn7/lvm/buildroot/usr/include -fPIC -L/var/tmp/genkernel/gk_MzQjifn7/lvm/buildroot/usr/lib -Wl,-rpath-link,/var/tmp/genkernel/gk_MzQjifn7/lvm/buildroot/usr/lib -L./libdm -L./lib -L./libdaemon/client -L./daemons/dmeventd -L../l ibdm -L../lib -L../libdaemon/client -L../daemons/dmeventd -Wl,--no-export-dynamic -static -L../libdm/ioctl -o lvm.static command.o dumpconfig.o formats.o lvchange.o lvconvert.o lvconvert _poll.o lvcreate.o lvdisplay.o lvextend.o lvmcmdline.o lvmdiskscan.o lvreduce.o lvremove.o lvrename.o lvresize.o lvscan.o polldaemon.o pvchange.o pvck.o pvcreate.o pvdisplay.o pvmove.o pvmove_ poll.o pvremove.o pvresize.o pvscan.o reporter.o segtypes.o tags.o toollib.o vgcfgbackup.o vgcfgrestore.o vgchange.o vgck.o vgcreate.o vgconvert.o vgdisplay.o vgexport.o vgextend.o vgimport.o vgmerge.o vgmknodes.o lvpoll.o vgimportclone.o vgreduce.o vgremove.o vgrename.o vgscan.o vgsplit.o lvm-static.o -llvm-internal ../base/libbase.a -ldevmapper-event -ldaemonclient -ludev -ldl -lblkid -ldevmapper -laio -ludev -lblkid -lm -lpthread /usr/lib/gcc/ia64-unknown-linux-gnu/10.2.0/../../../../ia64-unknown-linux-gnu/bin/ld: ../lib/liblvm-internal.a(sharedlib.o): in function `load_shared_library': sharedlib.c:(.text+0x292): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/ia64-unknown-linux-gnu/10.2.0/../../../../ia64-unknown-linux-gnu/bin/ld: /var/tmp/genkernel/gk_MzQjifn7/lvm/buildroot/usr/lib/libudev.a(util.o): in function `get_group_creds': util.c:(.text+0x42c2): warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/ia64-unknown-linux-gnu/10.2.0/../../../../ia64-unknown-linux-gnu/bin/ld: util.c:(.text+0x4352): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/ia64-unknown-linux-gnu/10.2.0/../../../../ia64-unknown-linux-gnu/bin/ld: /var/tmp/genkernel/gk_MzQjifn7/lvm/buildroot/usr/lib/libudev.a(util.o): in function `get_user_creds': util.c:(.text+0x40b2): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/ia64-unknown-linux-gnu/10.2.0/../../../../ia64-unknown-linux-gnu/bin/ld: util.c:(.text+0x4022): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/ia64-unknown-linux-gnu/10.2.0/../../../libc.a(vfprintf-internal.o): in function `printf_positional': /var/tmp/portage/sys-libs/glibc-2.32-r8/work/glibc-2.32/stdio-common/vfprintf-internal.c:1821:(.text+0x1571): relocation truncated to fit: GPREL22 against symbol `__printf_arginfo_table' defined in __libc_freeres_ptrs section in /usr/lib/gcc/ia64-unknown-linux-gnu/10.2.0/../../../libc.a(reg-printf.o) /var/tmp/portage/sys-libs/glibc-2.32-r8/work/glibc-2.32/stdio-common/vfprintf-internal.c:1875:(.text+0x16e2): relocation truncated to fit: GPREL22 against symbol `__printf_va_arg_table' defined in __libc_freeres_ptrs section in /usr/lib/gcc/ia64-unknown-linux-gnu/10.2.0/../../../libc.a(reg-type.o) /var/tmp/portage/sys-libs/glibc-2.32-r8/work/glibc-2.32/stdio-common/vfprintf-internal.c:1875:(.text+0x41c2): relocation truncated to fit: GPREL22 against symbol `__printf_va_arg_table' defined in __libc_freeres_ptrs section in /usr/lib/gcc/ia64-unknown-linux-gnu/10.2.0/../../../libc.a(reg-type.o) /usr/lib/gcc/ia64-unknown-linux-gnu/10.2.0/../../../libc.a(vfprintf-internal.o): in function `__vfprintf_internal': /var/tmp/portage/sys-libs/glibc-2.32-r8/work/glibc-2.32/stdio-common/vfprintf-internal.c:1412:(.text+0x53b1): relocation truncated to fit: GPREL22 against symbol `__printf_va_arg_table' defined in __libc_freeres_ptrs section in /usr/lib/gcc/ia64-unknown-linux-gnu/10.2.0/../../../libc.a(reg-type.o) collect2: error: ld returned 1 exit status
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/releng.git/commit/?id=9d868b1b0f33250bd2733e7b2b11df918843eb99 commit 9d868b1b0f33250bd2733e7b2b11df918843eb99 Author: Andreas K. Hüttel <dilfridge@gentoo.org> AuthorDate: 2022-01-21 23:48:32 +0000 Commit: Andreas K. Hüttel <dilfridge@gentoo.org> CommitDate: 2022-01-21 23:49:46 +0000 ia64: Better an initrd without lvm2 than no installcd at all Bug: https://bugs.gentoo.org/749957 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> releases/specs/ia64/installcd-stage2-minimal.spec | 1 + 1 file changed, 1 insertion(+)
commit e27681c30c548f1a0cabba75db6acc8591c657e6 (HEAD -> master, origin/master, origin/HEAD) Author: Andreas K. Hüttel <dilfridge@gentoo.org> AuthorDate: Sat Jan 22 16:50:45 2022 +0100 Commit: Andreas K. Hüttel <dilfridge@gentoo.org> CommitDate: Sat Jan 22 16:50:45 2022 +0100 Revert "ia64: Better an initrd without lvm2 than no installcd at all" genkernel tries to build lvm2 in any case, even if it will be disabled. This reverts commit 9d868b1b0f33250bd2733e7b2b11df918843eb99. Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> releases/specs/ia64/installcd-stage2-minimal.spec | 1 - 1 file changed, 1 deletion(-)
Also seeing this on ia64. Disabling LVM in genkernel.conf does not help. I've switched to using dracut, which works OK.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=110cffbf0a10a6dabe902eecb9c139663ad737af commit 110cffbf0a10a6dabe902eecb9c139663ad737af Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2022-05-15 16:37:51 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2022-05-15 22:10:07 +0000 gen_initramfs.sh: append devicemanager only for specific modules dmraid luks lvm multipath Bug: https://bugs.gentoo.org/749957 Signed-off-by: Mike Gilbert <floppym@gentoo.org> gen_funcs.sh | 9 +++++++++ gen_initramfs.sh | 11 +++++++---- 2 files changed, 16 insertions(+), 4 deletions(-)