Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 727442 - sys-kernel/genkernel-4.0.7-r1 fails to cross-compile busybox - * ERROR: create_initramfs(): append_data(): append_busybox(): copy_system_binaries(): System binary '/usr/armv6j-unknown-linux-gnueabihf/lib/libnss_dns-2.30.so' is linked to missing libraries
Summary: sys-kernel/genkernel-4.0.7-r1 fails to cross-compile busybox - * ERROR: creat...
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:
Depends on:
Blocks:
 
Reported: 2020-06-07 17:30 UTC by Michał Dec
Modified: 2020-06-16 15:44 UTC (History)
0 users

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


Attachments
Log of genkernel, juicy bits start in line 56605 (genkernel.log.xz,153.08 KB, application/x-xz)
2020-06-07 17:30 UTC, Michał Dec
Details
Kernel config used (kernel-config-arm-4.19.42-raspberrypi+.xz,31.42 KB, application/x-xz)
2020-06-07 17:31 UTC, Michał Dec
Details
genkernel config used (genkernel.conf.xz,4.31 KB, application/x-xz)
2020-06-07 17:32 UTC, Michał Dec
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Dec 2020-06-07 17:30:09 UTC
Created attachment 643844 [details]
Log of genkernel, juicy bits start in line 56605

I haven't had a need to crosscompile the kernel and initrd for a long time. In the meantime there was a genkernel update and it seems my previously working setup is now broken.

Required steps:
1. Install a crosscompiler with crossdev.
2. Emerge basically an entire Gentoo userland with said crosscompiler. In my scenario this is necessary to keep binary packages for hosts where compiling them would take too long.
3. Run genkernel such that it will crosscompile a kernel and initrd for the target system.
Comment 1 Michał Dec 2020-06-07 17:31:28 UTC
Created attachment 643846 [details]
Kernel config used
Comment 2 Michał Dec 2020-06-07 17:32:35 UTC
Created attachment 643848 [details]
genkernel config used
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2020-06-15 14:22:04 UTC
Thank you for the report. I was able to reproduce as described.
Comment 4 Larry the Git Cow gentoo-dev 2020-06-15 17:38:38 UTC
The bug has been closed via the following commit(s):

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

commit 04f9b87d25598130f4e2c91b9040b5f8638a8824
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-06-15 15:13:44 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-06-15 17:04:01 +0000

    gen_initramfs.sh: copy_system_binaries(): Don't check for non-existing linked libraries
    
    lddtree will always report "not found" when doing cross-compile.
    
    Because we will error out later nonetheless when copying will fail, we don't
    need such a check in advance.
    
    Closes: https://bugs.gentoo.org/727442
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 gen_initramfs.sh | 5 -----
 1 file changed, 5 deletions(-)
Comment 5 Michał Dec 2020-06-16 11:30:53 UTC
@whissi, using ldd on alien architecture ELFs is not a good idea. A smarter way to check what an ELF is linked to, no matter the architecture, is to call `objdump -p` and grep the output for NEEDED and `awk '{print $2}'`
Comment 6 Michał Dec 2020-06-16 15:44:25 UTC
Confirmed as fixed.