Tests fails with new glibc
Hi, the test section fro one of 'my' packages fails since the new glibc is active: [ 502s] [----------] 2 tests from SharedLibrary [ 502s] [ RUN ] SharedLibrary.Enumerations [ 502s] [ OK ] SharedLibrary.Enumerations (0 ms) [ 502s] [ RUN ] SharedLibrary.Basic [ 502s] E0926 16:45:19.856614 SharedLibrary.cpp:97] dlopen(libdl.so) failed: Error libdl.so: cannot open shared object file: No such file or directory [ 502s] unknown file: Failure [ 502s] Unknown C++ exception thrown in the test body. [ 502s] [ FAILED ] SharedLibrary.Basic (0 ms) was this libdl moved out? (sry, just packaging, but not programming C++) Thanks Axel
On 28.09.2021 08:37, Axel Braun wrote:
Hi, the test section fro one of 'my' packages fails since the new glibc is active:
[ 502s] [----------] 2 tests from SharedLibrary [ 502s] [ RUN ] SharedLibrary.Enumerations [ 502s] [ OK ] SharedLibrary.Enumerations (0 ms) [ 502s] [ RUN ] SharedLibrary.Basic [ 502s] E0926 16:45:19.856614 SharedLibrary.cpp:97] dlopen(libdl.so) failed: Error libdl.so: cannot open shared object file: No such file or directory [ 502s] unknown file: Failure [ 502s] Unknown C++ exception thrown in the test body. [ 502s] [ FAILED ] SharedLibrary.Basic (0 ms)
was this libdl moved out?
Yes. * In order to support smoother in-place-upgrades and to simplify the implementation of the runtime all functionality formerly implemented in the libraries libpthread, libdl, libutil, libanl has been integrated into libc. Runtime empty libdl.so.2 still exists and even static empty libdl.a is still provided, but not libdl.so. May be it should be offered for backward compatibility as well.
(sry, just packaging, but not programming C++)
Thanks Axel
Hello Andrei, Am Dienstag, 28. September 2021, 07:44:27 CEST schrieb Andrei Borzenkov:
On 28.09.2021 08:37, Axel Braun wrote: ....
was this libdl moved out?
Yes.
* In order to support smoother in-place-upgrades and to simplify
the implementation of the runtime all functionality formerly
implemented in the libraries libpthread, libdl, libutil, libanl has
been integrated into libc.
Runtime empty libdl.so.2 still exists and even static empty libdl.a is still provided, but not libdl.so.
Interesting...if it is implemented into libc I would expect it to be there. Do you know in which new library this is, resp. if the source code needs to be changed? Thanks Axel
Hi, Am Dienstag, 28. September 2021, 08:07:44 CEST schrieb Axel Braun:
Hello Andrei,
Am Dienstag, 28. September 2021, 07:44:27 CEST schrieb Andrei Borzenkov:
On 28.09.2021 08:37, Axel Braun wrote: ....
was this libdl moved out?
Yes.
* In order to support smoother in-place-upgrades and to simplify
the implementation of the runtime all functionality formerly
implemented in the libraries libpthread, libdl, libutil, libanl has
been integrated into libc.
Runtime empty libdl.so.2 still exists and even static empty libdl.a is still provided, but not libdl.so.
Interesting...if it is implemented into libc I would expect it to be there. Do you know in which new library this is, resp. if the source code needs to be changed?
libdl.so is only needed for linking against libdl dynamically (-ldl), and was thus only provided by glibc-devel. With the latest version, "-ldl" picks the empty libdl.a instead. So using dlopen("libdl.so.2") instead would be the correct fix for this. However, it would break with other libcs, where the filename might differ. I suggest dlopen("libdl.so") and fall back to dlopen("libdl.so.2") if it failed with ENOENT. Or the other way around. Cheers, Fabian
Thanks Axel
On Tue, Sep 28, Fabian Vogt wrote:
libdl.so is only needed for linking against libdl dynamically (-ldl), and was thus only provided by glibc-devel. With the latest version, "-ldl" picks the empty libdl.a instead. So using dlopen("libdl.so.2") instead would be the correct fix for this. However, it would break with other libcs, where the filename might differ. I suggest dlopen("libdl.so") and fall back to dlopen("libdl.so.2") if it failed with ENOENT. Or the other way around.
And using dlopen("libdl.so") will break if libdl.so.X changes incompatible. It's always a really bad idea to dlopen the *.so symlink, as you never know what you will really load and if this library then provides the ABI you are expecting. Always use the soname of the library for dlopen(). Thorsten -- Thorsten Kukuk, Distinguished Engineer, Senior Architect SLES & MicroOS SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany Managing Director: Felix Imendoerffer (HRB 36809, AG Nürnberg)
On Tuesday 2021-09-28 07:37, Axel Braun wrote:
Hi, the test section fro one of 'my' packages fails since the new glibc is active:
[ 502s] [----------] 2 tests from SharedLibrary [ 502s] [ RUN ] SharedLibrary.Enumerations [ 502s] [ OK ] SharedLibrary.Enumerations (0 ms) [ 502s] [ RUN ] SharedLibrary.Basic [ 502s] E0926 16:45:19.856614 SharedLibrary.cpp:97] dlopen(libdl.so) failed: Error libdl.so: cannot open shared object file: No such file or directory
Guess: The test is likely flawed and should use libdl.so.2 instead. Similar to https://github.com/coelckers/gzdoom/pull/1464/commits/0fc59ec057f8ce4ae2a928...
On Tue, Sep 28, 2021 at 2:37 AM Axel Braun
Hi, the test section fro one of 'my' packages fails since the new glibc is active:
[ 502s] [----------] 2 tests from SharedLibrary [ 502s] [ RUN ] SharedLibrary.Enumerations [ 502s] [ OK ] SharedLibrary.Enumerations (0 ms) [ 502s] [ RUN ] SharedLibrary.Basic [ 502s] E0926 16:45:19.856614 SharedLibrary.cpp:97] dlopen(libdl.so) failed: Error libdl.so: cannot open shared object file: No such file or directory [ 502s] unknown file: Failure [ 502s] Unknown C++ exception thrown in the test body. [ 502s] [ FAILED ] SharedLibrary.Basic (0 ms)
was this libdl moved out? (sry, just packaging, but not programming C++)
Thanks Axel
There is no real libdl around.. its functionality was summoned into libc.. dlopening libdl sounds like a recipe for very hard to debug problems, your test is probably invalid.
participants (6)
-
Andrei Borzenkov
-
Axel Braun
-
Cristian Rodríguez
-
Fabian Vogt
-
Jan Engelhardt
-
Thorsten Kukuk