troubles with pthread

Howdy, I didn’t change anything, I swear :) Suddenly, my PGI 5.2-4 installation on RHEL3 AS Update4 starting throwing nasty errors relating to pthread. For instance,

./mymodel: relocation error:
/usr/local/pgi-5.2-4/linux86/5.2/lib/libpthread.so.0: symbol _errno,
version GLIBC_2.0 not defined in file libc.so.6 with link time reference

So I googled around, and it was suggested somewhere to change the /lib/libpthread.so.0 link. I did such and now I am getting this error:

/usr/local/pgi-5.2-4/linux86/5.2/lib/libpgthread.so: undefined reference to
errno@GLIBC_PRIVATE' /usr/local/pgi-5.2-4/linux86/5.2/lib/libpgthread.so: undefined reference to __libc_dl_error_tsd@GLIBC_PRIVATE’
/usr/local/pgi-5.2-4/linux86/5.2/lib/libpgthread.so: undefined reference to
__resp@GLIBC_PRIVATE' /usr/local/pgi-5.2-4/linux86/5.2/lib/libpgthread.so: undefined reference to h_errno@GLIBC_PRIVATE’

Ugh, I am about worthless trying to figure this out :(

ls -l /usr/local/pgi-5.2-4/linux86/5.2/lib/libpgthread.so

lrwxrwxrwx 1 root root 20 Nov 18 14:44 /usr/local/pgi-5.2-4/linux86/5.2/lib/libpgthread.so -> /lib/libpthread.so.0

ls -l /lib/libpthread*

-rwxr-xr-x 1 root root 103948 Oct 22 04:01 /lib/libpthread-0.10.so
-rwxr-xr-x 1 root root 97712 Jan 24 21:01 /lib/libpthread-0.60.so
lrwxrwxrwx 1 root root 18 Jan 24 21:02 /lib/libpthread.so.0 -> libpthread-0.60.so

ls -l /usr/lib/libpthread*

-rw-r–r-- 1 root root 137008 Oct 22 03:04 /usr/lib/libpthread.a
-rw-r–r-- 1 root root 1052 Oct 22 03:04 /usr/lib/libpthread_nonshared.a
-rw-r–r-- 1 root root 216 Oct 22 02:54 /usr/lib/libpthread.so

Idears?

Except on Red Hat 7.3, “libpgthread” is just a link to your system’s “libpthread” library. Notice that on 1/24/05 someone has added “libpthread-0.60.so” to your system and updated the libpthread.so.0 link. My guess this new pthreads library has an incompatability. Reset the link back to “libpthread-0.10.so” and see if it compiles. You also might try compiling with “-lpgmp -lpthreads” to see if the problem is that the new pthreads library uses “libpthread_nonshared” whcih can also cause problems.

  • Mat

Hi,

Thanks for your comments. I wasn’t explicit in the email that I changed that libpthread link in /lib. I found a suggestion on the internet to do that. In fact, when I do, the debugger works. When I change back, it doesn’t (with the error above) and the same errors appear for the model code.

I will try the other compile options. Strange thing is that this was working fine up until a few weeks ago. One of RedHat’s updates must have caused trouble.

thanks
daryl