Re: unsatisfied pthread symbols in gcc (294 Views)
Reply
Occasional Visitor
Andreas Meinhardt
Posts: 4
Registered: ‎09-19-2008
Message 1 of 7 (294 Views)

unsatisfied pthread symbols in gcc

Hi all,

I dowloaded gcc 4.2.4 and 4.3.1 for HP-UX 11.11 (HP-UX hp9000 B.11.11 U 9000/785 2003690492 unlimited-user license
)from itrc and consistently have the following error:
-bash-3.2# /opt/hp-gcc64/bin/gcc hello.c
/usr/lib/pa20_64/dld.sl: Unsatisfied data symbol 'pthread_mutex_lock' in load module '/opt/hp-gcc64/bin/gcc'.
/usr/lib/pa20_64/dld.sl: Unsatisfied data symbol 'pthread_mutex_unlock' in load module '/opt/hp-gcc64/bin/gcc'.
/usr/lib/pa20_64/dld.sl: Unsatisfied data symbol 'pthread_attr_setdetachstate' in load module '/opt/hp-gcc64/bin/gcc'.
/usr/lib/pa20_64/dld.sl: Unsatisfied data symbol 'pthread_attr_destroy' in load module '/opt/hp-gcc64/bin/gcc'.
ABORT instruction (core dumped)


it's not that libpthread would be missing, it's where it's supposed to be:
-bash-3.2# find / -name libpthread* -print
/usr/lib/libpthread.1
/usr/lib/pa20_64/libp/libpthread.a
/usr/lib/pa20_64/libpthread.a
/usr/lib/pa20_64/libpthread_tr.a
/usr/lib/pa20_64/libpthread.1
/usr/lib/pa20_64/libpthread.sl
/usr/lib/pa20_64/libpthread_tr.1
/usr/lib/pa20_64/libpthread_tr.sl
/usr/lib/libpthread.sl
/usr/lib/libpthread_tr.1
/usr/lib/libpthread_tr.sl
/usr/lib/libp/libpthread.a
/usr/lib/libpthread.a
/usr/lib/libpthread_tr.a


Anyone seen this before??

I much appreciate any hint, as I never had this issue before!

Thanks

Andreas
Honored Contributor
OldSchool
Posts: 3,372
Registered: ‎09-09-2004
Message 2 of 7 (294 Views)

Re: unsatisfied pthread symbols in gcc

What, if anything, is in SHLIB_PATH?

You also might need to build w/ -l pthread
option
Occasional Visitor
Andreas Meinhardt
Posts: 4
Registered: ‎09-19-2008
Message 3 of 7 (294 Views)

Re: unsatisfied pthread symbols in gcc

SHLIBPATH is not set.

actually I am thinking of rebuilding gcc from source.

I also get this error on ANY program (example above is just HelloWorld.c), so it does not involve any threads at all.

Thanks

Andreas
Acclaimed Contributor
Dennis Handly
Posts: 25,283
Registered: ‎03-06-2006
Message 4 of 7 (294 Views)

Re: unsatisfied pthread symbols in gcc

>Anyone seen this before??

Over and over. You have a lemon libc. gcc expects that you have a newer one that supports the pthread_* stubs, since gcc isn't linked with libpthread, since it doesn't need it.

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1186353
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1023298

>OldSchool: What is in SHLIB_PATH?
>You also might need to build with -lpthread

Actually that's the whole purpose of the pthread_* stubs in libc. So you don't have to do that and so you don't lose performance.
Occasional Visitor
Andreas Meinhardt
Posts: 4
Registered: ‎09-19-2008
Message 5 of 7 (294 Views)

Re: unsatisfied pthread symbols in gcc

Dennis,
you're my hero!

Thanks a bunch!

Andreas
Occasional Visitor
Andreas Meinhardt
Posts: 4
Registered: ‎09-19-2008
Message 6 of 7 (294 Views)

Re: unsatisfied pthread symbols in gcc

Works like a charm after installing the patch!

Thank you!!

Andreas
Acclaimed Contributor
Dennis Handly
Posts: 25,283
Registered: ‎03-06-2006
Message 7 of 7 (294 Views)

Re: unsatisfied pthread symbols in gcc

>Works like a charm after installing the patch!

If you are happy with the answers, please read the following about assigning points and reopening threads:
http://forums.itrc.hp.com/service/forums/helptips.do?#33
http://forums.itrc.hp.com/service/forums/helptips.do?#41
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.