As I am sure other Fedora 28 users will know, the OS's glibc was recently updated to glibc 2.27. Amongst many other things, 2.27 has added new implementations of logf() and powf(). This has caused my application to fail to run on distributions with an older glibc (Debian, for example). When the application is invoked on Debian, the following error is produced:
- ... libm.so.6 version
GLIBC-2.27
not found (required by ./app_name)
I tracked the symbols down to logf and powf by using the following procedure:
objdump -T ./app_name | grep GLIBC_2.27
Which gave the following output:
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 powf
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.27 logf
And then...
objdump -T /lib/libm.so.6 | grep -w logf
objdump -T /lib/libm.so.6 | grep -w powf
Which gave the following output:
000397a0 g DF .text 00000135 GLIBC_2.27 logf
00010430 g DF .text 0000009e (GLIBC_2.0) logf
and...
000397a0 g DF .text 00000135 GLIBC_2.27 powf
00010430 g DF .text 0000009e (GLIBC_2.0) powf
So, armed with the information that powf() and logf() are also implemented in GLIBC-2.0, I added the following to my project (above main()) and recompiled.
__asm__(".symver logf,logf@GLIBC_2.0");
__asm__(".symver powf,powf@GLIBC_2.0");
Unfortunately, my project is still using powf and logf from GLIBC-2.27. It's actually quite important that I distributed binaries for Debian and I would prefer not to have to compile on that distribution if I can avoid it.
Historically, I have successfully used this procedure for symbols in libc.so.6 but not libm.so.6. Should I be doing things differently for libm.so.6?
Clearly, I am missing something here so I would be grateful for any help offered.
Many thanks
Amanda