Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 683966

Summary: dev-libs/ell-0.19 undefined symbol: dlclose
Product: Gentoo Linux Reporter: Sorrow <lynx1534>
Component: Current packagesAssignee: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Status: RESOLVED OBSOLETE    
Severity: normal CC: bkohler, mjo
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info

Description Sorrow 2019-04-21 13:42:45 UTC
Created attachment 573514 [details]
emerge --info

When application linked with libell.so (net-wireless/iwd for example) starts, it crashes with error libell.so.0: undefined symbol: dlclose. ldd -r /usr/lib64/libell.so gives this output:

	linux-vdso.so.1 (0x00007fffcece5000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f3fffdad000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f3fffff2000)
undefined symbol: dlclose	(/usr/lib64/libell.so)
undefined symbol: dlopen	(/usr/lib64/libell.so)
undefined symbol: dlsym	(/usr/lib64/libell.so)
undefined symbol: dlerror	(/usr/lib64/libell.so)

With LD_PRELOAD=/lib64/libdl-2.29.so application starts normally.
Comment 1 Sorrow 2019-11-18 06:08:49 UTC
any update on this? bug still persists
Comment 2 Ben Kohler gentoo-dev 2020-03-25 15:47:30 UTC
I can reproduce the ldd -r output, but I have never been able to reproduce any crash
Comment 3 Michael Orlitzky gentoo-dev 2020-07-24 19:28:03 UTC
I just hit this, me and the reporter have this in common:

> ld GNU gold (Gentoo 2.32 p1 2.32.0) 1.16
Comment 4 Michael Orlitzky gentoo-dev 2020-07-24 19:42:30 UTC
The build system is missing -ldl somewhere, you can fix this temporarily (wrongly) by adding "-ldl" to your LDFLAGS.
Comment 5 Ben Kohler gentoo-dev 2020-09-01 17:38:39 UTC
I'm still not sure how to reproduce any runtime or build failure.  This makes it harder to report upstream.

Yes ell should be linked to libdl but since iwd is linked to it anyway, I cannot see any failure *here*.
Comment 6 Sorrow 2020-09-01 18:03:41 UTC
I guess, in some cases (e.g. GOLD linker, or LTO, or some other linker flags) the resulting iwd binary is not linked to libdl and then it crashes.
Comment 7 Michael Orlitzky gentoo-dev 2020-09-01 18:42:08 UTC
The gold linker should be all you need to reproduce it. We have --as-needed in LDFLAGS by default forever now.
Comment 8 Ben Kohler gentoo-dev 2020-09-01 19:12:43 UTC
Building both ell & iwd with ld.gold, I can now see an undefined symbol problem in "ldd -r /usr/libexec/iwd" output, but I'm still not able to reproduce any runtime crash.

I will still work on sending this upstream.
Comment 9 Ben Kohler gentoo-dev 2020-09-17 13:31:55 UTC
Upstream has removed all code using libdl so this will "resolve itself" on next release:

https://git.kernel.org/pub/scm/libs/ell/ell.git/commit/?id=e129cb4cd2270f308c1564e75859672643dd902b
Comment 10 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2021-01-22 09:55:02 UTC
I suppose this can be closed. We're already at ell-0.35 in stable...