[omniORB] Successful HP-UX 11 build of omniORB-4.0.2 (working patch)

Tingle, Alex Alex.Tingle at bronermetals.com
Mon Oct 6 17:58:04 BST 2003


Claudio,

> Notice also that you have to build python using aCC to 
> compile the main() 
> function and link the executable.

You're cheating here. _omniidlmodule is C++ so it needs the C++ runtime. The
problem is that python is written in C, so it doesn't bring in the C++
runtime libraries (libCsup & libstd). Your solution is to compile python as
C++ so that it brings in the libraries. That may work, but it's hardly an
elegant solution. The omniORB solution is to explicitly bring in the
libraries at link time.

Nevertheless, your working example has lead me to understand what's really
going on. the current makefile calls for these libraries: -lstd_v2 -lCsup_v2
-lC In fact, libC is not required, and the _v2 versions are only required if
you choose to use the -AA option that switches in 'new-style' STL.

The following configuration works for me against a python built with cc:


	ifdef Compiler_aCC
	CXXDEBUGFLAGS     = -O
	CXXOPTIONS       += -w +inst_v +DAportable -mt
	CXXLINKOPTIONS   += -Wl,+s
	CDEBUGFLAGS       = -O
	COPTIONS          = -w -Aa -D_HPUX_SOURCE +DAportable
	CLINKOPTIONS      = -Wl,+s

	SHAREDLIB_CPPFLAGS += +Z
	SharedLibraryPlatformLinkFlagsTemplate = -b -Wl,+h$$soname -Wl,+s
-lstd -lCsup
	endif


My compiler is - "aCC: HP ANSI C++ B3910B A.03.37"
[patch file for mk/beforeauto.in attached].

Here's your config with my comments:

> ifdef Compiler_aCC
> CXXDEBUGFLAGS     = -O
> CXXOPTIONS   	 += -AA -mt -w +inst_v +DAportable \
>                     -D_THREAD_SAFE \
>                     -DRWSTD_MULTI_THREAD \
>                     -DRW_MULTI_THREAD 

* Isn't -AA is irrelevant here? It switches on the standards compliant STL,
as opposed to the HP-default. As I understand it, you need this option here
to link omniORB with your own -AA code, but it makes no difference to a
successful build of omniORB itself. BUT, you probably need to include
different libraries if you want to use -AA... see my alternative config
below.
* You have added the -mt option, but left in '-DRWSTD_MULTI_THREAD
-DRW_MULTI_THREAD'. These -D options are harmless, but superfluous.
* '-D_THREAD_SAFE' - this macro is never referenced.

> CXXLINKOPTIONS   +=  -AA -Wl,+s -lnsl

* -lnsl "Network services library". I don't need this to successfully link
anything. Are you certain that you need it?

> CDEBUGFLAGS       = -O
> COPTIONS	  = -w -Aa -D_HPUX_SOURCE +DAportable
> CLINKOPTIONS      = -noshared -Wl,+s

'-noshared' is ignored because of the '+DAportable' option.

> SHAREDLIB_CPPFLAGS += +Z
> SharedLibraryPlatformLinkFlagsTemplate = -b -Wl,+h$$soname -Wl,+s

I need the extra libraries -lstd(_v2) -lCsup(_v2), but only for the python
module. That's because my python was build with cc (the default) rather than
with aCC (as in your case).

> endif

If you need to build with -AA, I suspect that the following would be correct
(untested):


	ifdef Compiler_aCC
	CXXDEBUGFLAGS     = -O
	CXXOPTIONS       += -AA -w +inst_v +DAportable -mt
	CXXLINKOPTIONS   += -AA -Wl,+s
	CDEBUGFLAGS       = -O
	COPTIONS          = -w -Aa -D_HPUX_SOURCE +DAportable
	CLINKOPTIONS      = -Wl,+s

	SHAREDLIB_CPPFLAGS += +Z
	SharedLibraryPlatformLinkFlagsTemplate = -AA -b -Wl,+h$$soname
-Wl,+s -lstd_v2 -lCsup_v2
	endif


If anyone knows of a way to link the shared library so that it automatically
brings in the libstd & libCsup runtime libraries, then that would be an even
better solution.

I'd love to see a 64-bit build on omniORB on the HP-UX. (Built with
+DA2.0W). Anyone have any luck with 64 bit on HP?

regards,

-Alex

--

> -----Original Message-----
> From: Claudio Scafuri [mailto:claudio.scafuri at elettra.trieste.it]
> Sent: 06 October 2003 12:42
> To: omniorb-list at omniorb-support.com
> Subject: [omniORB] Successful HP-UX 11 build of omniORB-4.0.2 
> (works...)
> 
> 
> We were able to build and run omnoORB-4.0.2 on HP-UX 11 with 
> the following
> configuration, inserted into beforeauto.mk .
> 
> Notice also that you have to build python using aCC to 
> compile the main() 
> function and link the executable.
> .....
> 
> ifdef Compiler_aCC
> CXXDEBUGFLAGS     = -O
> CXXOPTIONS   	 += -AA -mt -w +inst_v +DAportable \
>                     -D_THREAD_SAFE \
>                     -DRWSTD_MULTI_THREAD \
>                     -DRW_MULTI_THREAD 
> CXXLINKOPTIONS   +=  -AA -Wl,+s -lnsl
> CDEBUGFLAGS       = -O
> COPTIONS	  = -w -Aa -D_HPUX_SOURCE +DAportable
> CLINKOPTIONS      = -noshared -Wl,+s
> 
> SHAREDLIB_CPPFLAGS += +Z
> SharedLibraryPlatformLinkFlagsTemplate = -b -Wl,+h$$soname -Wl,+s
> endif
> 
> ....
> 
> Claudio Scafuri
> 
> 
> 
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: beforeauto.mk.in.patch
Type: application/octet-stream
Size: 1241 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20031006/aad004d1/beforeauto.mk.in.obj


More information about the omniORB-list mailing list