Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 823716 - sys-kernel/genkernel with glibc-2.34 fails to create initramfs: create_initramfs(): append_data(): append_busybox(): copy_system_binaries(): System binary '/usr/lib64/libnss_dns.so' could not be found!
Summary: sys-kernel/genkernel with glibc-2.34 fails to create initramfs: create_initra...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: glibc-2.34
  Show dependency tree
 
Reported: 2021-11-14 10:58 UTC by Matthew Smith
Modified: 2022-10-12 17:30 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/etc/genkernel.conf (genkernel.conf,11.41 KB, text/plain)
2021-11-14 10:59 UTC, Matthew Smith
Details
emerge --info sys-kernel/genkernel (emerge-info,6.27 KB, text/plain)
2021-11-14 11:00 UTC, Matthew Smith
Details
/var/log/genkernel.log (genkernel.log.gz,319.74 KB, application/gzip)
2021-11-14 11:01 UTC, Matthew Smith
Details
Same Fail with genkernel Version 4.2.5 (genkernel-4.2.5.log_libnss_dns.so_error,302.99 KB, text/plain)
2021-11-16 00:20 UTC, Argh!... Rats!...
Details
after update to genkernel 4.2.6 i get a fail at btrfs-progs build most probably due to libudev not found (genkernel-4.2.6.udev_error_btrfs-progs-failed,57.89 KB, text/plain)
2021-11-16 00:22 UTC, Argh!... Rats!...
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Smith gentoo-dev 2021-11-14 10:58:57 UTC
After running `genkernel all`:

> ERROR: create_initramfs(): append_data(): append_busybox(): copy_system_binaries(): System binary '/usr/lib64/libnss_dns.so' could not be found!
Comment 1 Matthew Smith gentoo-dev 2021-11-14 10:59:21 UTC
Created attachment 751053 [details]
/etc/genkernel.conf
Comment 2 Matthew Smith gentoo-dev 2021-11-14 11:00:12 UTC
Created attachment 751056 [details]
emerge --info sys-kernel/genkernel
Comment 3 Matthew Smith gentoo-dev 2021-11-14 11:01:00 UTC
Created attachment 751059 [details]
/var/log/genkernel.log
Comment 4 Matthew Smith gentoo-dev 2021-11-14 11:20:53 UTC
I have tried clearing out /var/cache/genkernel, which did not help.

For what it's worth, /usr/lib64/libnss_dns.so seems to have recently disappeared from my system (it's still in my mlocate database).  Maybe removed after a recent glibc upgrade?

I'm not sure why genkernel is trying to copy this library, I ran the following command and nothing seems to link to it:

    find /bin /lib64 /usr/bin /usr/lib64 -type f -exec ldd \{\} \; 2>/dev/null
      | awk '/nss/ { print $1 }'
      | sort -u'
Comment 5 Sergey Ilinykh 2021-11-14 12:19:59 UTC
same problem for me.
Comment 6 Søren Dalby Larsen 2021-11-14 13:01:24 UTC
I have that issue as well.
Comment 7 Søren Dalby Larsen 2021-11-14 13:19:17 UTC
I suspect the recent glibc-2.34-r1 update.

equery b /usr/lib64/libnss_dns.so says the file belongs to glibc, even it's not there.

manually symlinking /lib64/libnss_dns.so.2 to /usr/lib64/libnss_dns.so seems to fix it for me.
Comment 8 Sergey Ilinykh 2021-11-14 15:16:19 UTC
replacing ${libdir} with /lib64 for the corresponding line in genkernel sources also seems to work. At least booted w/o problem.
Comment 9 Sergey Ilinykh 2021-11-14 15:17:10 UTC
sorry. file name changed too of course
Comment 10 Mike Gilbert gentoo-dev 2021-11-14 21:35:40 UTC
Looks like this is hard-coded in genkernel.

https://gitweb.gentoo.org/proj/genkernel.git/tree/gen_initramfs.sh?h=v4.2.5#n566
Comment 11 Larry the Git Cow gentoo-dev 2021-11-15 03:35:06 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=ab723c54aa0fef50384dbbb936614c7430f5413b

commit ab723c54aa0fef50384dbbb936614c7430f5413b
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2021-11-14 23:57:12 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2021-11-15 01:23:26 +0000

    gen_initramfs.sh: append_busybox: NSS dns module was merged into libc in >=glibc-2.34
    
    Bug: https://bugs.gentoo.org/823716
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 gen_initramfs.sh | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=6473e0a96a03598a9e22904d1fe011913efaac5a

commit 6473e0a96a03598a9e22904d1fe011913efaac5a
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2021-11-14 23:46:30 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2021-11-14 23:46:30 +0000

    gen_compile.sh: populate_binpkg(): Use libc.a for testing if glibc has changed
    
    NSS files module was merged into libc in >=glibc-2.34 so it can't be used
    to test for changed glibc version anymore.
    
    Using libc.a seems to be the better alternative which we use already in
    get_chost_libdir() and depend on in general.
    
    In addition, a check was added to ensure that our glibc test file really
    exists (older-than check would pass if our test file would be missing
    which is not what we want).
    
    Fixes: 61049d29 ("gen_compile.sh: populate_binpkg(): Throw away binpkg when glibc has changed")
    Bug: https://bugs.gentoo.org/823716
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 gen_compile.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Comment 12 Thomas Deutschmann (RETIRED) gentoo-dev 2021-11-15 03:37:09 UTC
in git, genkernel-4.2.6 release is pending.
Comment 13 Sergey Ilinykh 2021-11-15 10:38:41 UTC
The fix work for me.
Comment 14 Argh!... Rats!... 2021-11-16 00:13:26 UTC
Had the same error with genkernel-4.2.5 
Summary: sys-kernel/genkernel-4.2.5 fails to create initramfs: create_initramfs(): append_data(): append_busybox(): copy_system_binaries(): System binary '/usr/lib64/libnss_dns.so' could not be found! → sys-kernel/genkernel with glibc-2.34 fails to create initramfs: create_initramfs(): append_data(): append_busybox(): copy_system_binaries(): System binary '/usr/lib64/libnss_dns.so' could not be found!


Now with genkernel-4.2.6 i have:
"ERROR: Command './configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --docdir=/usr/share/doc/btrfs-progs-5.15 --htmldir=/usr/share/doc/btrfs-progs-5.15/html --bindir=/sbin --disable-shared --disable-convert --disable-python --disable-documentation --enable-backtrace' failed!

* ERROR: create_initramfs(): append_data(): append_btrfs(): populate_binpkg(): gkbuild(): Failed to create binpkg of btrfs-progs-5.15!"
Comment 15 Argh!... Rats!... 2021-11-16 00:20:49 UTC
Created attachment 751362 [details]
Same Fail with genkernel Version 4.2.5
Comment 16 Argh!... Rats!... 2021-11-16 00:22:04 UTC
Created attachment 751366 [details]
after update to genkernel 4.2.6 i get a fail at btrfs-progs build  most probably due to libudev not found
Comment 17 dsunnerer 2021-11-16 14:54:59 UTC
(In reply to Argh!... Rats!... from comment #15)
> Created attachment 751362 [details]
> Same Fail with genkernel Version 4.2.5

I cannot confirm that.
Downgrading to 4.2.5 and replacing the path to libnss_dns.so.2 lets my kernel build with BTRFS modules succeed.
Comment 18 Thomas Deutschmann (RETIRED) gentoo-dev 2021-11-16 17:31:13 UTC
Released with genkernel-4.2.6.
Comment 19 Larry the Git Cow gentoo-dev 2021-11-16 17:38:31 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d7061a540ee6868e6e4b70868f838ddf5e6e07a

commit 5d7061a540ee6868e6e4b70868f838ddf5e6e07a
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2021-11-16 17:36:19 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2021-11-16 17:38:04 +0000

    sys-kernel/genkernel: fix building of btrfs-progs
    
    Bug: https://bugs.gentoo.org/823716
    Package-Manager: Portage-3.0.28, Repoman-3.0.3
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 .../genkernel-4.2.6-fix-btrfs-progs-deps.patch     | 24 ++++++++++++++++++++++
 ...rnel-4.2.6.ebuild => genkernel-4.2.6-r1.ebuild} |  2 ++
 2 files changed, 26 insertions(+)
Comment 20 Argh!... Rats!... 2021-11-17 08:39:04 UTC
Works! 
Genkernel 4.2.6 throws no errors anymore. thx alot!