Operating System - HP-UX
1834646 Members
2040 Online
110069 Solutions
New Discussion

dce 1.8 TxSeries 5.0 application build

 
Umapathy S
Honored Contributor

dce 1.8 TxSeries 5.0 application build

hi,
I am trying to build a sample DCE/TxSeries application on hpux11.11

uname -mrsv
HP-UX B.11.11 U 9000/800

DCE 1.8 and TxSeries/Encina 5.0 are installed. I wrote a sample program, compiled and try to start. Its core dumping. I tried out many machine options.

my makefile reads like this...

COMPILE_DEFS= -D_REENTRANT -D_POSIX_C_SOURCE=199506L -D_POSIX_D10_THREADS -Dunix -Dhpux -Dhp9000s800 +DD32


LDFLAGS = -z -Wl,-Bimmediate,-Bnonfatal,+s +z -lEncMonServ -lEncServer -lEncClient -lEncina -ldcekt -lpthread -lc


I have gone through DCE samples as well as Encina and used them in the makefile, but no use. When starting the server, it coredumps in the pthread init part.

Can anyone please guide me in giving the correct machine definitions, pthread/kernel reentrant libraries.

thanks in advance,
Umapathy

ps: I have cross posted this in general section also.
Arise Awake and Stop NOT till the goal is Reached!
4 REPLIES 4
Alex Glennie
Honored Contributor

Re: dce 1.8 TxSeries 5.0 application build

Well I know who the likely customer is so I have an interest getting this resolved. Unfortuantly DCE Programming is not my strong suit so could you help by giving me some more details ....

A core file is produced .... so "file core" produces what exactly ?

Have you tried passing this through say gdb to generate a stack trace at all ?

I've seen the following :

The way to compile a libcma pthread program for HPUX 11.0 is to use the
following syntax:
Uder HPUX 11.0 compile using :
cc -Aa -D_REENTRANT -D_HPUX_SOURCE -D_PTHREADS_DRAFT4 source.c -lcma

Under HPUX 10.20 compile using:
"cc -Aa -D_REENTRANT -D_HPUX source.c -lcma

The reason you need D_PTHREADS_DRAFT4 under HPUX 11 is that the normal default
compile/run
time is for kernel threads..This compile option insures you are really using
libcma instead of kernel threads.
(It is possible to compile and then have strange run time results if you omitt
this option).

Not to sure if this is still relevant ie default at 11.11 so have asked a Programming colleague to take a look at this when he gets time ..... the above earlier requested outputs therefore would be some use


Alex Glennie
Honored Contributor

Re: dce 1.8 TxSeries 5.0 application build

Andy Bennett my Programming colleague seems to think at least initially the MAKE file and associated flags look OK so the gdb stack trace & file core would be handy .....
Umapathy S
Honored Contributor

Re: dce 1.8 TxSeries 5.0 application build

hi Alex,
Thanks for the response. Well I was trying out different combinations, the stacktrace is

(gdb) bt
#0 0xc0064060 in _lwp_kill () from /usr/lib/libpthread.1
#1 0xc005c278 in __vp_kill () from /usr/lib/libpthread.1
#2 0xc005f1cc in pthread_kill () from /usr/lib/libpthread.1
#3 0xc474f918 in bde_thread_GenCore () from /usr/lib/libEncina.sl
#4 0xc4726894 in bde_FailFast () from /usr/lib/libEncina.sl
#5 0xc475bef0 in trace_Fatal () from /usr/lib/libEncina.sl
#6 0xc4eece44 in monUtil_FatalError () from /usr/lib/libEncMonServ.sl
#7 0xc4e43960 in CleanupCdsEntries () from /usr/lib/libEncMonServ.sl
#8 0xc474c884 in BaseStartFunc () from /usr/lib/libEncina.sl
#9 0xc005acc0 in __pthread_body () from /usr/lib/libpthread.1
#10 0xc0063d04 in __pthread_start () from /usr/lib/libpthread.1


I felt there is an error/missing definition for the pthreads compliance. I was going through the white paper for 'porting DCE threads programs to hpux 11.0 POSIX Threads'.

They say the 'Concert Multi Thread Architecture' (CMA) libcma is no longer needed in hpux11i and instead of we can use the kernel threads (libpthread) itself with libdcekt.

I was trying out exactly the same thing, but got confused in finding the correct definition -D_POSIX_D10_THREADS or -D_PTHREADS_DRAFT_4.

thanks,
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
Umapathy S
Honored Contributor

Re: dce 1.8 TxSeries 5.0 application build

Alex,
output of file core
core: core file from 'samp_server_t'

The gdb lists at the start

warning: core file may not match specified executable file.
Core was generated by `samp_server_t'.
Program terminated with signal 6, Aborted.

cheers
Umapathy
Arise Awake and Stop NOT till the goal is Reached!