The following symlink is missing in the generated image /lib/ld-linux-aarch64.so.1 => /lib64/ld-linux-aarch64.so.1 048 has the same problem. With this symlink missing, only static binaries can be executed, but even /lib/systemd/systemd is not statically linked, so system does not boot. Reproducible: Always Steps to Reproduce: I tried generating dracut initramfs on my rockpro64 system (based on rk3399) For now I am using the following workaround install_items="/lib/ld-linux-aarch64.so.1"
@toolchain: Which path is canonical for the runtime linker on arm64?
As defined today gentoo installs things into /lib64 for 64-bit targets (multilib or not), defined by multilib_env(). Having said that gcc defaults to /lib on aarch64: gcc/config/aarch64/aarch64-linux.h #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" Same for clang: lib/Driver/ToolChains/Linux.cpp case llvm::Triple::aarch64: LibDir = "lib"; Loader = "ld-linux-aarch64.so.1"; Thus I think having a /lib -> /lib64 symlink is the correct way to express it. (It's also what crossdev happens to generate for me)
Andrius: Can you reproduce this problem with dracut-0.48? If that version works, we can just stabilize it. If that version is also broken, can you run a quick test and attach the output? mkdir /tmp/root /usr/lib/dracut/dracut-install -l -a -D /tmp/root --debug /lib/systemd/systemd
Created attachment 549400 [details] dracut_debug 048 doesn't work. I already mentioned it in comment #0. We don't need to stabilize yet anyway, this is arm64.
dracut-install: ldd: ' /lib/ld-linux-aarch64.so.1 => /lib64/ld-linux-aarch64.so.1 (0x0000007f96631000) dracut-install: ' dracut-install: dracut_install('/lib64/ld-linux-aarch64.so.1', '/lib64/ld-linux-aarch64.so.1') dracut-install: dracut_install('/lib64/ld-2.26.so', '/lib64/ld-2.26.so') dracut-install: dracut_install ret = 0 dracut-install: cp '/lib64/ld-2.26.so' '/tmp/root//lib64/ld-2.26.so' dracut-install: cp ret = 0 dracut-install: dracut_install ret = 0 dracut-install: ln -s '..//lib64/ld-2.26.so' '/tmp/root//lib64/ld-linux-aarch64.so.1' dracut-install: Lib install: '/lib64/ld-linux-aarch64.so.1' dracut-install: dracut_install('/lib64/ld-linux-aarch64.so', '/lib64/ld-linux-aarch64.so') dracut-install: dracut_install('//ld-linux-aarch64.so.1', '//ld-linux-aarch64.so.1') dracut-install: dracut_install('//ld-linux-aarch64.so', '//ld-linux-aarch64.so')
amd64 for comparison. dracut-install: ldd: ' /lib64/ld-linux-x86-64.so.2 (0x00007f4d7955e000) dracut-install: ' dracut-install: dracut_install('/lib64/ld-linux-x86-64.so.2', '/lib64/ld-linux-x86-64.so.2') dracut-install: dracut_install('/lib64/ld-2.27.so', '/lib64/ld-2.27.so') dracut-install: dracut_install ret = 0 dracut-install: cp '/lib64/ld-2.27.so' '/var/tmp/dracut.7pwXAX/initramfs/lib64/ld-2.27.so' dracut-install: dracut_install ret = 0 dracut-install: ln -s 'ld-2.27.so' '/var/tmp/dracut.7pwXAX/initramfs/lib64/ld-linux-x86-64.so.2' dracut-install: Lib install: '/lib64/ld-linux-x86-64.so.2' dracut-install: dracut_install('/lib64/ld-linux-x86-64.so', '/lib64/ld-linux-x86-64.so') dracut-install: dracut_install('//ld-linux-x86-64.so.2', '//ld-linux-x86-64.so.2') dracut-install: dracut_install('//ld-linux-x86-64.so', '//ld-linux-x86-64.so')
Created attachment 549402 [details, diff] simplify ldd parsing logic Please give this patch a try.
(In reply to Mike Gilbert from comment #7) > Created attachment 549402 [details, diff] [details, diff] > simplify ldd parsing logic > > Please give this patch a try. It worked for me!
Great, I have opened a pull request upstream.
(In reply to Sergei Trofimovich from comment #2) > Thus I think having a /lib -> /lib64 symlink is the correct way to express > it. > (It's also what crossdev happens to generate for me) I think it would really make more sense to put the library where gcc expects it. I don't think it needs to exist in /lib64 at all.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6093c44b4abfabbdd98b92aaf0faaf10c0646acc commit 6093c44b4abfabbdd98b92aaf0faaf10c0646acc Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2018-10-09 19:23:34 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2018-10-09 19:23:34 +0000 sys-kernel/dracut: simplify ldd parsing logic in dracut-install Closes: https://bugs.gentoo.org/667752 Package-Manager: Portage-2.3.50_p14, Repoman-2.3.11_p21 Signed-off-by: Mike Gilbert <floppym@gentoo.org> sys-kernel/dracut/dracut-048-r1.ebuild | 154 +++++++++++++++++++++ ...dracut-install-simplify-ldd-parsing-logic.patch | 41 ++++++ 2 files changed, 195 insertions(+)