Operating System - HP-UX
1832317 Members
2008 Online
110041 Solutions
New Discussion

problem with pthread on hp-ux 10.20

 
Rohinton Daruwala_1
Occasional Contributor

problem with pthread on hp-ux 10.20

I was compiling a program with g++ with the
-lpthread option on hp-ux 10.20
The compiler says it can't find the library.
Is the pthread library supposed to be present on hp-ux 10.20?
If its not, do I have any options?
Any help would be appreciated

Thanks and Regards
Rohinton Daruwala
2 REPLIES 2
Steve Steel
Honored Contributor

Re: problem with pthread on hp-ux 10.20

Hi

The library libpthread does not exist on 10.20 ,this library is for kernel threads, which is only properly supported at 11.0.


Therefore this will never work at 10.20. unless you can use CMA threads (user space threads) which uses the library libcma.1.
This was part of the DCE client S/w and bundled in with the O/S from 10.01 till 10.20.


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Umapathy S
Honored Contributor

Re: problem with pthread on hp-ux 10.20

Rohinton,

(I am out of office/work till next week, but wanted to give more info on this).

Adding to M.Steele, hpux 10.20 has only user space threads implemented in the form of dce threads or CMA threads. DCE client comes with the OS itself. Install it to get those libraries. I personally use /opt/dce/lib/libdce.a since it works most of the time than the libcma.a (This is my personal experience). Add -ldce option to your link command.

Moreover I have found it doesnt work/scale very well with C++. If you are not writing C++ code then link with gcc. Also hp compiler is better than gcc in this respect.

HTH,
Umapathy

Arise Awake and Stop NOT till the goal is Reached!