Operating System - HP-UX
1832646 Members
2689 Online
110043 Solutions
New Discussion

Compiling HP-UX 10.20 legacy code based on DCE 1.5 on HP11

 
Rui Vilao
Regular Advisor

Compiling HP-UX 10.20 legacy code based on DCE 1.5 on HP11

HP-11 upgrade: Compiling HP-UX 10.20 legacy code based on DCE 1.5 on HP11

Greetings,

We have developed an application based on DCE 1.5 (SEC/CDS).

Does anyone know if it is possible to compile on HP-UX 11 without changing
the code?

Thanks in advance for your help,

Kind Regards,

Rui.
"We should never stop learning"_________ rui.vilao@rocketmail.com
4 REPLIES 4
Wodisch
Honored Contributor

Re: Compiling HP-UX 10.20 legacy code based on DCE 1.5 on HP11

Hello Rui,
you will have to change the "Makefile"s, especially for
the change from user-level threads to kernel-level
threads, and for the change in the API itself.
It is mostly done with a few define options to the
C-compiler. Read the example sources, which come
with the DCE-packages.
HTH,
Wodisch
Alex Glennie
Honored Contributor

Re: Compiling HP-UX 10.20 legacy code based on DCE 1.5 on HP11

DCE Implementation

1. Threads

Based on Draft4 of POSIX 1003.4a. This thread implementation
is entirely in user-space. Applications need to compile with
-D_REENTRANT -D_PTHREADS_DRAFT4 and link with libcma for threads.
(libdce will cause libcma to be loaded also).

Programs need to include at the *TOP* of their
code when using threads. Also, the threaded program needs to
be written in ANSI C. Compilation of the thread program will
use a commmand like this:

HP-UX 10.20

$ cc -Aa -D_REENTRANT -D_HPUX_SOURCE source.c -lbb -ldce

HP-UX 11.0

$ cc -Aa -D_REENTRANT -D_HPUX_SOURCE -D_PTHREADS_DRAFT4 source.c -lbb -ldce

Support for HP-UX kernel threads is now available at HP-UX 11.0
in a separate library (libdcekt.sl) and is based on POSIX 1003.1c.
Applications need to compile with either the -D_POSIX_D10_THREADS
or with the define _POSIX_C_SOURCE set to 199506L.

$ cc -Aa -D_REENTRANT -D_HPUX_SOURCE -D_POSIX_D10_THREADS source.c -ldcekt -lpthread (or pthread_tr)
Rui Vilao
Regular Advisor

Re: Compiling HP-UX 10.20 legacy code based on DCE 1.5 on HP11

Woodish and Alex,

First of all thanks a lot for your extreme valuable contribution!

Alex,

Thanks to your suggestion we have already started to compile our DCE 1.5 based software on a HP-UX 11 where we installed DCE 1.5.
So far,... so good!

I?ve seen from previous posts that you must be a DCE expert!
May be you can give me some additional help:
What about running software compiled on HP-UX 10.20 with DCE 1.5 on HP11 with DCE 1.7?

Thanks in advance for your help!

Kind Regards,

Rui.
"We should never stop learning"_________ rui.vilao@rocketmail.com
Nancy Berg
New Member

Re: Compiling HP-UX 10.20 legacy code based on DCE 1.5 on HP11

We have applications using the DCE model and Orbix
using kernel threads to be run on HP UX 11.0.
When attempting to use libdcekt, we received unresolved references when compiling the application code with just -D_REENTRANT -D_POSIX_D10_THREADS. If we also include -D_PTHREADS_DRAFT4, the unresolved references go away, but we receive unsatisfied symbols (we had removed libdce / libcma and replaced it with libdcekt and libpthread). The unsatisfied symbols seem to go away when libdce is also included, but of course this causes a core dump when attempting to run.

Can you point me to either the correct usage of the
compile flags and libraries or at least some documentation for this.

Thanks,

-Nancy