Attach the genkernel.log. Also, the last part of the error is excerpted below. === [CC] lvm.static alpha-unknown-linux-gnu-gcc -Os -pipe -fomit-frame-pointer -I/var/tmp/genkernel/gk_ivgb1xZC/lvm/buildroot/usr/include -fPIC -L/var/tmp/genkernel/gk_ivgb1xZC/lvm/buildroot/usr/lib -Wl,-rpath-link,/var/tmp/genkernel/gk_ivgb1xZC/lvm/buildroot/usr/lib -L./libdm -L./lib -L./libdaemon/client -L./daemons/dmeventd -L../libdm -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 -L/var/tmp/genkernel/gk_ivgb1xZC/lvm/buildroot/usr/lib -ludev -ldl -L/var/tmp/genkernel/gk_ivgb1xZC/lvm/buildroot/usr/lib -lblkid -ldevmapper -laio -L/var/tmp/genkernel/gk_ivgb1xZC/lvm/buildroot/usr/lib -ludev -L/var/tmp/genkernel/gk_ivgb1xZC/lvm/buildroot/usr/lib -lblkid -lm -lpthread /usr/lib/gcc/alpha-unknown-linux-gnu/9.3.0/../../../../alpha-unknown-linux-gnu/bin/ld: ../lib/liblvm-internal.a(sharedlib.o): in function `load_shared_library': (.text+0x210): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/alpha-unknown-linux-gnu/9.3.0/../../../../alpha-unknown-linux-gnu/bin/ld: /var/tmp/genkernel/gk_ivgb1xZC/lvm/buildroot/usr/lib/libudev.a(util.o): in function `get_group_creds': (.text+0x2b48): warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/alpha-unknown-linux-gnu/9.3.0/../../../../alpha-unknown-linux-gnu/bin/ld: (.text+0x2ba4): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/alpha-unknown-linux-gnu/9.3.0/../../../../alpha-unknown-linux-gnu/bin/ld: /var/tmp/genkernel/gk_ivgb1xZC/lvm/buildroot/usr/lib/libudev.a(util.o): in function `get_user_creds': (.text+0x2a44): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/alpha-unknown-linux-gnu/9.3.0/../../../../alpha-unknown-linux-gnu/bin/ld: (.text+0x29b8): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/alpha-unknown-linux-gnu/9.3.0/../../../../alpha-unknown-linux-gnu/bin/ld: toollib.o: in function `_sigchld_handler': (.text+0x50): undefined reference to `wait4' /usr/lib/gcc/alpha-unknown-linux-gnu/9.3.0/../../../../alpha-unknown-linux-gnu/bin/ld: (.text+0x60): undefined reference to `wait4' /usr/lib/gcc/alpha-unknown-linux-gnu/9.3.0/../../../../alpha-unknown-linux-gnu/bin/ld: ../lib/liblvm-internal.a(lvm-exec.o): in function `exec_cmd': (.text+0x32c): undefined reference to `wait4' /usr/lib/gcc/alpha-unknown-linux-gnu/9.3.0/../../../../alpha-unknown-linux-gnu/bin/ld: (.text+0x33c): undefined reference to `wait4' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:167: lvm.static] Error 1 make[1]: Leaving directory '/var/tmp/genkernel/gk_ivgb1xZC/lvm/LVM2.2.02.187/tools' make: *** [make.tmpl:365: tools] Error 2 * ERROR: Command 'nice -n10 make -j1 V=1' failed! === Reproducible: Always Steps to Reproduce: 1.genkernel --clear-cachedir --install --kernel-config=/usr/src/linux/.config initramfs Actual Results: # genkernel --clear-cachedir --install --kernel-config=/usr/src/linux/.config initramfs * Gentoo Linux Genkernel; Version 4.1.2 * Using genkernel configuration from '/etc/genkernel.conf' ... * Running with options: --clear-cachedir --install --kernel-config=/usr/src/linux/.config initramfs * Working with Linux kernel 5.9.11-gentoo for alpha * Using kernel config file '/usr/src/linux-5.9.11-gentoo/.config' ... * Current kernel's LOCALVERSION is set to ''; Will ignore set --kernel-localversion value '-alpha' because kernel was not build ... * initramfs: >> Initializing ... * >> Appending devices cpio data ... * >> Appending base_layout cpio data ... * >> Appending util-linux cpio data ... * >> Appending eudev cpio data ... * >> Appending devicemanager cpio data ... * ERROR: Command 'nice -n10 make -j1 V=1' failed! * ERROR: create_initramfs(): append_data(): append_devicemanager(): populate_binpkg(): gkbuild(): Failed to create binpkg of lvm-2.02.187! * Please consult '/var/log/genkernel.log' for more information and any * errors that were reported above. * * Report any genkernel bugs to bugs.gentoo.org and * assign your bug to genkernel@gentoo.org. Please include * as much information as you can in your bug report; attaching * '/var/log/genkernel.log' so that your issue can be dealt with effectively. * * Please do *not* report kernel compilation failures as genkernel bugs! * I attribute it to glibc's commit below: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=09153638cfef9166586b0c21e852ea0d6f15a0fd I think the upstream commits above are useful for dynamic libraries, but not well for static libraries. That is, the system call wait4 cannot be used (cannot link by the loader) with the static library. For this reason, I think we need to support static libraries. I attach the proposed change "glibc-2.32-alpha-wait4-static.patch". Finally, I point out that in glibc, I'm concerned that the implementation of the system call wait4 differs from other architectures only in alpha.(I think it would be better to make it almost the same as other architectures, as recently fixed in 759001.)
Created attachment 681082 [details] genkernel.log
Created attachment 681085 [details] emerge --info
Created attachment 681088 [details, diff] patch for wait4.c
Filed upstream bug as https://sourceware.org/PR27150 Can you post the patch upstream to libc-alpha@? https://sourceware.org/glibc/wiki/Contribution%20checklist Once it gets merged we'll backport it.
Thank you for your action. I will post the patch upstream. Right now I'm reading the upstream's posting terms, so I'll let you know when I post a patch.
(In reply to Yoshihiko Iwama from comment #5) > Thank you for your action. > > I will post the patch upstream. > Right now I'm reading the upstream's posting terms, so I'll let you know > when I post a patch. Looks like upstream was so quick that they already pushed the fix: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=6cc992412cd8c8555ca5d67fa2b994e38ccb6c1f
Queued patch for 2.32 branch as https://gitweb.gentoo.org/fork/glibc.git/patch/?id=a80ad4ee7ee230f307e696c1be8fb59ef6d581c0 Until we cut a new patchset and push new glibc release you can drop it locally to /etc/portage/patches/sys-libs/glibc/ and rebuild glibc.
Thank you for information. I confirmed that it was fixed upstream.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e486a3e2bcba51de8672b544186e147079cdff0 commit 0e486a3e2bcba51de8672b544186e147079cdff0 Author: Andreas K. Huettel <dilfridge@gentoo.org> AuthorDate: 2021-01-07 11:24:02 +0000 Commit: Andreas K. Huettel <dilfridge@gentoo.org> CommitDate: 2021-01-07 11:24:27 +0000 sys-libs/glibc: Patchlevel bump Bug: https://bugs.gentoo.org/764176 Bug: https://bugs.gentoo.org/763618 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Andreas K. Huettel <dilfridge@gentoo.org> sys-libs/glibc/Manifest | 1 + sys-libs/glibc/glibc-2.32-r7.ebuild | 1513 +++++++++++++++++++++++++++++++++++ 2 files changed, 1514 insertions(+)