0

Im porting a command line application from windows to linux. This application uses some 3rd Party closed source libraries.

Using one such library (with a .so file) i get a number of linker errors:

3rdparty.so: undefined reference to `sem_getvalue@GLIBC_2.34'
3rdparty.so: undefined reference to `pthread_create@GLIBC_2.34'
3rdparty.so: undefined reference to `lstat@GLIBC_2.33'
3rdparty.so: undefined reference to `sem_close@GLIBC_2.34'
3rdparty.so: undefined reference to `dlclose@GLIBC_2.34'
3rdparty.so: undefined reference to `dlsym@GLIBC_2.34'
3rdparty.so: undefined reference to `sem_open@GLIBC_2.34'
3rdparty.so: undefined reference to `sem_trywait@GLIBC_2.34'
3rdparty.so: undefined reference to `pthread_setspecific@GLIBC_2.34'
3rdparty.so: undefined reference to `dlopen@GLIBC_2.34'
3rdparty.so: undefined reference to `dlerror@GLIBC_2.34'
3rdparty.so: undefined reference to `pthread_getspecific@GLIBC_2.34'
3rdparty.so: undefined reference to `sem_init@GLIBC_2.34'
3rdparty.so: undefined reference to `sem_destroy@GLIBC_2.34'
3rdparty.so: undefined reference to `pthread_join@GLIBC_2.34'
3rdparty.so: undefined reference to `sem_post@GLIBC_2.34'
3rdparty.so: undefined reference to `stat@GLIBC_2.33'
3rdparty.so: undefined reference to `fstat@GLIBC_2.33'
3rdparty.so: undefined reference to `pthread_once@GLIBC_2.34'
3rdparty.so: undefined reference to `sem_wait@GLIBC_2.34'
3rdparty.so: undefined reference to `pthread_key_create@GLIBC_2.34'

The problem here is NOT that i.e. pthreads would be missing. This is used and successfully linked in the main application itself. If i omit 3rdparty.so the program links and runs using pthreads etc.

It seems that 3rdparty.so was linked using vers 2.33 AND 2.34 (probably by some external dependencies).

So i tried to download and build these versions separately as described here: How can I get glibc 2.35 on Ubuntu 20.04? I succeeded to build these libs and even was able to link them, but then other link errors occur.

Whats the correct way to solve this problem..

Environment: gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)

Eclipse Version: 2021-12 (4.22.0) Build id: 20211202-1639

1 Answers1

0

From the vendor of the 3rdparty.so i just got the following advice:

the SDK has been compiled on a Ubuntu 22.04 and needs a glibc version of at least 2.34 . ...sadly the gcc/glibc/Linux version (on your machine) is too old. Unfortunately that means that you have to upgrade to a more recent Ubuntu version (i.e. at least Ubuntu 22.04).

I think that clarifies the problem.