LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Need further help understanding GLIBC issue (http://www.linuxquestions.org/questions/programming-9/need-further-help-understanding-glibc-issue-902576/)

dwhitney67 09-12-2011 09:59 AM

Need further help understanding GLIBC issue
 
When I attempt to run an executable program, I get the following errors:
Code:

./app: /lib/tls/libpthread.so.0: version `GLIBC_2.1' not found (required by ./app)
./app: /lib/tls/libpthread.so.0: version `GLIBC_2.0' not found (required by ./app)
./app: /lib/tls/libc.so.6: version `GLIBC_2.1' not found (required by ./app)
./app: /lib/tls/libc.so.6: version `GLIBC_2.0' not found (required by ./app)

I have a basic understanding of what is going on, however I'm unsure how to verify which version of GLIBC my RHEL 4 system is using.

I've used the rpm utility to check on which glibc packages are installed on my system, however I'm not sure if the version number associated with these package correlates in any way to the version number required by the libpthread and libc libraries.
Code:

$ rpm -qa | grep -i glibc
glibc-common-2.3.4-2.54
glibc-headers-2.3.4-2.54
glibc-devel-2.3.4-2.54
glibc-kernheaders-2.4-9.1.103.EL
glibc-2.3.4-2.54

Can someone help me shed some light on what exactly is the deficiency on my system? I'm still waiting to hear from one of my co-workers as to where the app was originally built, and whether we have the source code for it. I believe it is a COTS app.

Peverel 09-12-2011 10:34 AM

It seems that it was originally compiled with an earlier version of GLIBC than you have in your system, so that it expects an earlier version of /lib/tls/libpthread.so.0 than you have; yours seems to be GLIBC 2.3. Do you actually have a directory /lib/tls? (I don't; my version of GLIBC is 2.10, where libpthread.so.0 is in the lib directory). If you do not have /lib/tls. then maybe you could get a copy or create it and put the GLIBC 2.1 run-time libraries into it.

Actually, a web search suggests that tls is a compatibility package for programs using GLIBC 2.0 or 2.1, so maybe you can find a version for your system. Apparently, tls originally held thread-related libraries, which were later merged into GLIBC, so it is likely you do not have /lib/tls.

dwhitney67 09-12-2011 10:53 AM

Yes, my system does have a /lib/tls directory, with the following contents:
Code:

$ ls -l
total 2020
drwxr-xr-x  2 root root    4096 Mar  4  2011 i486/
drwxr-xr-x  2 root root    4096 Mar  4  2011 i586/
drwxr-xr-x  3 root root    4096 Mar  4  2011 i686/
-rwxr-xr-x  1 root root 1547476 Jan 19  2011 libc-2.3.4.so*
lrwxrwxrwx  1 root root      13 Mar  3  2011 libc.so.6 -> libc-2.3.4.so*
-rwxr-xr-x  1 root root  214060 Jan 19  2011 libm-2.3.4.so*
lrwxrwxrwx  1 root root      13 Mar  3  2011 libm.so.6 -> libm-2.3.4.so*
-rwxr-xr-x  1 root root  107888 Jan 19  2011 libpthread-2.3.4.so*
lrwxrwxrwx  1 root root      19 Mar  3  2011 libpthread.so.0 -> libpthread-2.3.4.so*
-rwxr-xr-x  1 root root  50716 Jan 19  2011 librt-2.3.4.so*
lrwxrwxrwx  1 root root      14 Mar  3  2011 librt.so.1 -> librt-2.3.4.so*
-rwxr-xr-x  1 root root  32056 Jan 19  2011 libthread_db-1.0.so*
lrwxrwxrwx  1 root root      19 Mar  3  2011 libthread_db.so.1 -> libthread_db-1.0.so*
lrwxrwxrwx  1 root root      14 Jul  9  2009 libuuid.so.1 -> libuuid.so.1.2*
-rwxr-xr-x  1 root root  13792 Jan 27  2009 libuuid.so.1.2*


ta0kira 09-12-2011 11:54 AM

Quote:

Originally Posted by dwhitney67 (Post 4469676)
I've used the rpm utility to check on which glibc packages are installed on my system, however I'm not sure if the version number associated with these package correlates in any way to the version number required by the libpthread and libc libraries.

Version numbers are generally auto-generated by libtool based on the interface version, iteration, and backward-compatibility. This is so linking can be done correctly regardless of the versioning scheme of the project. It could be that the two coincide for glibc. Try ldd --version (taken from here).
Kevin Barry

dwhitney67 09-12-2011 12:00 PM

My system does indeed have Glibc 2.3.4:
Code:

$ ldd --version
ldd (GNU libc) 2.3.4
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

And when using ldd on the application that is causing grief:
Code:

$ ldd wrapper
./app: /lib/tls/libpthread.so.0: version `GLIBC_2.1' not found (required by ./app)
./app: /lib/tls/libpthread.so.0: version `GLIBC_2.0' not found (required by ./app)
./app: /lib/tls/libc.so.6: version `GLIBC_2.1' not found (required by ./app)
./app: /lib/tls/libc.so.6: version `GLIBC_2.0' not found (required by ./app)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0x008b6000)
        libc.so.6 => /lib/tls/libc.so.6 (0x00111000)
        /lib/ld-linux.so.2 (0x0063c000)

I've submitted a query to my system administrator to see if a) they've seen this problem before, and b) if they have a solution that I can use and that can be provided to my customers.

ta0kira 09-12-2011 01:01 PM

It doesn't sound like a matter of having a "high enough" version; it's a matter of having an exact version, i.e. glibc 2.1.x.
Kevin Barry


All times are GMT -5. The time now is 10:27 PM.