Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nfs-utils on musl: ldd failure on installed .so #53785

Open
Vaelatern opened this issue Jan 1, 2025 · 9 comments
Open

nfs-utils on musl: ldd failure on installed .so #53785

Vaelatern opened this issue Jan 1, 2025 · 9 comments
Labels
bug Something isn't working

Comments

@Vaelatern
Copy link
Member

Is this a new report?

Yes

System Info

Void 6.6.67_1 x86_64-musl GenuineIntel notuptodate rrrnDDFFFFFFFFFFFF

Package(s) Affected

nfs-utils libnfsidmap

Does a report exist for this bug with the project's home (upstream) and/or another distro?

No response

Expected behaviour

On glibc:

$ ldd /usr/lib/libnfsidmap/regex.so
        linux-vdso.so.1 (0x00007ffc5abab000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007fdadaa22000)
        /usr/lib64/ld-linux-x86-64.so.2 (0x00007fdadac3b000)

Actual behaviour

On muslc:

$ ldd /usr/lib/libnfsidmap/regex.so
	ldd (0x7f0f5f58f000)
	libc.so => ldd (0x7f0f5f58f000)
Error relocating /usr/lib/libnfsidmap/regex.so: nfsidmap_config_get: symbol not found
Error relocating /usr/lib/libnfsidmap/regex.so: nfs4_get_default_domain: symbol not found
Error relocating /usr/lib/libnfsidmap/regex.so: idmap_verbosity: symbol not found
Error relocating /usr/lib/libnfsidmap/regex.so: idmap_log_func: symbol not found

Steps to reproduce

This breaks my void-mklive workflows making dracut images of x86_64-musl with the nfs library installed. I remove the nfs library and it works again, so I've narrowed down my build problems to this library.

It seems consistently broken on musl, fixed on glibc. I've checked and it seems the libs are in fact compiled fresh on each build. Upgrading to 2.8.2 didn't help #53784

I've not yet looked at how it's actually being built to see what is broken there.

@Vaelatern Vaelatern added bug Something isn't working needs-testing Testing a PR or reproducing an issue needed labels Jan 1, 2025
@Vaelatern Vaelatern changed the title nfs-utils on void: ldd failure on installed .so nfs-utils on musl: ldd failure on installed .so Jan 1, 2025
@slymattz
Copy link
Contributor

slymattz commented Jan 1, 2025

Hi!

I can reproduce ACTUAL BEHAVIOR on a musl-based Void live system both for nfs-utils 2.7.1 and nfs-utils 2.8.2. Just for the record, there seems to be a similar report for Gentoo describing similar underlinking on musl.

@Vaelatern Vaelatern removed the needs-testing Testing a PR or reproducing an issue needed label Jan 2, 2025
@Vaelatern
Copy link
Member Author

And this problem is also present on Alpine. @ncopa

Skimmed the build itself, it's heavily indirected Make.

@classabbyamp
Copy link
Member

this also happens with nsswitch.so, static.so, and umich_ldap.so in the same dir

@classabbyamp
Copy link
Member

can confirm it also happens on chimera, too

@classabbyamp
Copy link
Member

ok, this isn't underlinking but dracut trying to find dependencies for something that should only be loaded as a plugin, not as a standalone library. reported to upstream: dracut-ng/dracut-ng#1087

@jozzsi
Copy link

jozzsi commented Jan 4, 2025

Can somebody please help and test this speculative fix - dracut-ng/dracut-ng#1088 ?

@Vaelatern
Copy link
Member Author

Attempting a test on the rig where I detected the problem for starters. It's a big one and unwieldy and I did it with a manual sed but I'll see if I get results.

@Vaelatern
Copy link
Member Author

Negative @jozzsi

--- /usr/lib/dracut/modules.d/95nfs/module-setup.sh.bck 2025-01-05 07:52:19.142252800 +0000
+++ /usr/lib/dracut/modules.d/95nfs/module-setup.sh     2025-01-05 07:52:19.144252826 +0000
@@ -94,7 +94,7 @@
         echo "alias nfs4 nfs" > "$initdir"/etc/modprobe.d/nfs.conf
     fi

-    inst_libdir_file 'libnfsidmap_nsswitch.so*' 'libnfsidmap/*.so' 'libnfsidmap*.so*'
+    inst_libdir_file -o 'libnfsidmap_nsswitch.so*' 'libnfsidmap/*.so' 'libnfsidmap*.so*'

     _nsslibs=$(
         cat "$dracutsysrootdir"/{,usr/}etc/nsswitch.conf 2> /dev/null \
dracut-install: ERROR: 'ldd /var/tmp/dracut.Ju4kiT/initramfs/usr/lib/libnfsidmap/nsswitch.so' failed with 141
dracut-install: ERROR: 'ldd /var/tmp/dracut.Ju4kiT/initramfs/usr/lib/libnfsidmap/static.so' failed with 141
dracut-install: ERROR: 'ldd /var/tmp/dracut.Ju4kiT/initramfs/usr/lib/libnfsidmap/umich_ldap.so' failed with 127
dracut-install: ERROR: 'ldd /var/tmp/dracut.Ju4kiT/initramfs/usr/lib/libnfsidmap/regex.so' failed with 141

@jozzsi
Copy link

jozzsi commented Jan 5, 2025

@Vaelatern Thanks for helping debugging this issue that probably has been there over 10 years.

I will need more help as I am not yet able to reproduce this environment in the dracut test suite.

1./ Can you please confirm that omitting nfs module (e.g. -o nfs on command line or omit_dracutmodules+=" nfs " in a dracut config file a workaround ? Does void-mklive needs nfs module to function properly ?

2./ Speculatively would commenting out the following line in dracut.sh resolve it/make a difference ?

#[[ "$dracutsysrootdir" ]] || [[ "$noexec" ]] || export DRACUT_RESOLVE_LAZY="1"  

The goal is to make sure that DRACUT_RESOLVE_LAZY is NOT set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants