<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>Successful HP-UX 11 build of omniORB-4.0.2 (sort of).</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Summary:</FONT>
</P>
<P><FONT SIZE=2>To get omniORB-4.0.2 to compile and run on HP-UX 11, upgrade to a new version of python and change the Compiler_aCC section in build/mk/beforeauto.mk to read:</FONT></P>
<P> <FONT SIZE=2>ifdef Compiler_aCC</FONT>
<BR> <FONT SIZE=2>CXXDEBUGFLAGS = -O</FONT>
<BR> <FONT SIZE=2>CXXOPTIONS += -w +inst_v +DAportable -mt</FONT>
<BR> <FONT SIZE=2>CXXLINKOPTIONS += -Wl,+s</FONT>
<BR> <FONT SIZE=2>CDEBUGFLAGS = -O</FONT>
<BR> <FONT SIZE=2>COPTIONS = -w -Aa -D_HPUX_SOURCE +DAportable</FONT>
<BR> <FONT SIZE=2>CLINKOPTIONS = -Wl,+s</FONT>
</P>
<P> <FONT SIZE=2>SHAREDLIB_CPPFLAGS += +Z</FONT>
<BR> <FONT SIZE=2>SharedLibraryPlatformLinkFlagsTemplate = -b -Wl,+h$$soname -Wl,+s \</FONT>
<BR> <FONT SIZE=2> -lstd_v2 -lCsup_v2 -lC # <--- Only _omniidl requires these libs, they break</FONT>
<BR> <FONT SIZE=2>endif # other shared code.</FONT>
</P>
<BR>
<P><FONT SIZE=2>Full story. Sorry this is so 'chatty', but I wrote it as I went along:</FONT>
</P>
<P><FONT SIZE=2>>>> make[3]: *** [omniORB4/Naming.hh] Bus error (core dumped)</FONT>
</P>
<P><FONT SIZE=2>OK, I got past this point by upgrading my python installation to Python 2.2.3. I'm guessing that the latest changes have broken backwards compatability with python 1.5.2 which I had been using.</FONT></P>
<P><FONT SIZE=2>Sadly, that's not the end of the story. With the newer python, omniORB builds and installs, but it still doesn't run. For example, 'nameclt list' gives the following:</FONT></P>
<P> <FONT SIZE=2>omniORB: Warning: the config file is in the old pre-omniORB4 format.</FONT>
<BR> <FONT SIZE=2>aCC runtime: ERROR: Unexpected use of shared libraries</FONT>
<BR> <FONT SIZE=2>aCC runtime: ERROR: Read aCC manpage, +A option</FONT>
<BR> <FONT SIZE=2>/usr/lib/libnss_dns.1</FONT>
</P>
<P><FONT SIZE=2>Now, this is one of the most helpful error messages I've ever seen the HP-UX produce. Here's a fragment of the file build/mk/beforeauto.mk that ./configure generated for me:</FONT></P>
<P> <FONT SIZE=2>ifdef Compiler_aCC</FONT>
<BR> <FONT SIZE=2>CXXDEBUGFLAGS = -O</FONT>
<BR> <FONT SIZE=2>CXXOPTIONS += -w +inst_v +DAportable \</FONT>
<BR> <FONT SIZE=2> -D_THREAD_SAFE \</FONT>
<BR> <FONT SIZE=2> -DRWSTD_MULTI_THREAD \</FONT>
<BR> <FONT SIZE=2> -DRW_MULTI_THREAD </FONT>
<BR> <FONT SIZE=2>CXXLINKOPTIONS += +A -Wl,+s</FONT>
<BR> <FONT SIZE=2>CDEBUGFLAGS = -O</FONT>
<BR> <FONT SIZE=2>COPTIONS = -w -Aa -D_HPUX_SOURCE +DAportable</FONT>
<BR> <FONT SIZE=2>CLINKOPTIONS = -noshared -Wl,+s</FONT>
</P>
<P> <FONT SIZE=2>SHAREDLIB_CPPFLAGS += +Z</FONT>
<BR> <FONT SIZE=2>SharedLibraryPlatformLinkFlagsTemplate = -b -Wl,+h$$soname -Wl,+s -lstd_v2 -lCsup_v2 -lC</FONT>
<BR> <FONT SIZE=2>endif</FONT>
</P>
<P><FONT SIZE=2>CXXLINKOPTIONS is set wrong. aCC +A is incompatible with ld +s. Here are the relevant man page entries:</FONT>
</P>
<P> <FONT SIZE=2>man aCC</FONT>
</P>
<P> <FONT SIZE=2>+A Cause the linker ld(1) to use only archive libraries</FONT>
<BR> <FONT SIZE=2> for all occurrences of the -l option. Also inform the</FONT>
<BR> <FONT SIZE=2> C++ run-time environment that no shared libraries will</FONT>
<BR> <FONT SIZE=2> be used by the program.</FONT>
<BR> <FONT SIZE=2> NOTE: Cannot be used when calling shl_load(3) directly</FONT>
<BR> <FONT SIZE=2> or indirectly. See HP aC++ Online Programmer's Guide,</FONT>
<BR> <FONT SIZE=2> HP-UX Linker and Libraries Online User's Guide and</FONT>
<BR> <FONT SIZE=2> setlocale(3) for more information.</FONT>
</P>
<BR>
<P> <FONT SIZE=2>man ld</FONT>
</P>
<P> <FONT SIZE=2>+s Indicates that at run-time, the shared library</FONT>
<BR> <FONT SIZE=2> loader can use the environment variable SHLIB_PATH</FONT>
<BR> <FONT SIZE=2> and LD_LIBRARY_PATH (64-bit only) to locate shared</FONT>
<BR> <FONT SIZE=2> libraries needed by the executable output file</FONT>
<BR> <FONT SIZE=2> that were specified with either the -l or -l:</FONT>
<BR> <FONT SIZE=2> option. The environment variables should be set to</FONT>
<BR> <FONT SIZE=2> a colon-separated list of directories. If both +s</FONT>
<BR> <FONT SIZE=2> and +b are used, their relative order on the</FONT>
<BR> <FONT SIZE=2> command line indicates which path list will be</FONT>
<BR> <FONT SIZE=2> searched first (see the +b option).</FONT>
</P>
<P><FONT SIZE=2>Fixing this doesn't help much though. 'nameclt list' now just coredumps with a signal 11! So, I'll try and fix any other obvious problems.</FONT></P>
<P><FONT SIZE=2>CLINKOPTIONS is set incorrectly. The -noshared option is incompatible with the +DAportable architecture:</FONT>
</P>
<P> <FONT SIZE=2>man cc</FONT>
</P>
<P> <FONT SIZE=2>-noshared Creates statically bound executables. This option is</FONT>
<BR> <FONT SIZE=2> available with option +DA2.0W only. See -dynamic for</FONT>
<BR> <FONT SIZE=2> dynamically bound executables. The default behavior is</FONT>
<BR> <FONT SIZE=2> dynamic. </FONT>
</P>
<P><FONT SIZE=2>CXXOPTIONS is a little suspect too. The multi-thread flags are not supposed to be set explicitly, they should be turned on with the -mt option (which has other effects too, see: <A HREF="http://docs.hp.com/hpux/onlinedocs/2213/options.htm#option-mt" TARGET="_blank">http://docs.hp.com/hpux/onlinedocs/2213/options.htm#option-mt</A>). So I've replaced '-DRWSTD_MULTI_THREAD -DRW_MULTI_THREAD' with '-mt'. The flag '_THREAD_SAFE' is never referred to by the omniORB code, so I've removed that as well.</FONT></P>
<P><FONT SIZE=2>And the result? 'nameclt list' STILL coredumps with a signal 11!</FONT>
</P>
<P><FONT SIZE=2>Final change - (this actually makes it work)... SharedLibraryPlatformLinkFlagsTemplate explicitly links in some runtime libraries (-lstd_v2 -lCsup_v2 -lC). This can't be right can it? OK, so remove them.</FONT></P>
<P><FONT SIZE=2>AND IT WORKS!!!</FONT>
</P>
<P><FONT SIZE=2>...ish. I made all of the above changes whilst rebuilding with 'make clean; make'. 'make veryclean; make' now fails, with:</FONT></P>
<P> <FONT SIZE=2>make[3]: Entering directory `/users1/alext/src/omniORB-4.0.2/build/src/lib/omniORB'</FONT>
<BR> <FONT SIZE=2>/users1/alext/32bit/bin/python ../../../../bin/scripts/distdate.py \</FONT>
<BR> <FONT SIZE=2> <../../../../update.log >omniORB4/distdate.hh</FONT>
<BR> <FONT SIZE=2>../../../bin/omniidl -bcxx -Wba -p../../../../src/lib/omniORB -Wbdebug \</FONT>
<BR> <FONT SIZE=2> -v -ComniORB4 ../../../../idl/Naming.idl</FONT>
</P>
<P> <FONT SIZE=2>omniidl: ERROR!</FONT>
</P>
<P> <FONT SIZE=2>omniidl: Could not open IDL compiler module _omniidlmodule.so</FONT>
<BR> <FONT SIZE=2>omniidl: Please make sure it is in directory /users1/alext/src/omniORB-4.0.2/build/lib</FONT>
<BR> <FONT SIZE=2>omniidl: (or set the PYTHONPATH environment variable)</FONT>
</P>
<P> <FONT SIZE=2>omniidl: (The error was \</FONT>
<BR> <FONT SIZE=2> 'Failed to load /users1/alext/src/omniORB-4.0.2/build/lib/_omniidlmodule.sl')</FONT>
</P>
<P><FONT SIZE=2>So, although the changes above seem to work for omniORB libraries and executables, the omniidl python module no longer wants to load. I feel like I'm going round in circles!</FONT></P>
<P><FONT SIZE=2>But the solution to this is simply to undo the last change I made. Reintroduce the libraries '-lstd_v2 -lCsup_v2 -lC' to the SharedLibraryPlatformLinkFlagsTemplate macro, and the python module builds and loads successfully.</FONT></P>
<P><FONT SIZE=2>Anyone care to try and resolve this?</FONT>
</P>
<P><FONT SIZE=2>regards,</FONT>
</P>
<P><FONT SIZE=2>-Alex</FONT>
</P>
<P><FONT SIZE=2>--</FONT>
</P>
<P><FONT SIZE=2>> -----Original Message-----</FONT>
<BR><FONT SIZE=2>> From: Christophe Goua [<A HREF="mailto:cgoua@bibliomondo.com">mailto:cgoua@bibliomondo.com</A>]</FONT>
<BR><FONT SIZE=2>> Sent: 15 September 2003 18:32</FONT>
<BR><FONT SIZE=2>> To: Omniorb-List@Omniorb-Support. Com</FONT>
<BR><FONT SIZE=2>> Subject: RE: [omniORB] Re: HP-UX 11 build problem</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I've been trying to deal with these issues for a while now, </FONT>
<BR><FONT SIZE=2>> but with no</FONT>
<BR><FONT SIZE=2>> result...</FONT>
<BR><FONT SIZE=2>> I too would be glad to hear if someone has succesfully built </FONT>
<BR><FONT SIZE=2>> omniORB 4.x on</FONT>
<BR><FONT SIZE=2>> HP-UX...</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Christophe Goua</FONT>
<BR><FONT SIZE=2>> BiblioMondo Inc.</FONT>
<BR><FONT SIZE=2>> Montreal, Canada</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> > -----Original Message-----</FONT>
<BR><FONT SIZE=2>> > From: omniorb-list-bounces@omniorb-support.com</FONT>
<BR><FONT SIZE=2>> > [<A HREF="mailto:omniorb-list-bounces@omniorb-support.com">mailto:omniorb-list-bounces@omniorb-support.com</A>]On Behalf Of Pierre</FONT>
<BR><FONT SIZE=2>> > Pacchioni</FONT>
<BR><FONT SIZE=2>> > Sent: 15-Sep-2003 12:27</FONT>
<BR><FONT SIZE=2>> > To: omniorb-list@omniorb-support.com</FONT>
<BR><FONT SIZE=2>> > Subject: RE: [omniORB] Re: HP-UX 11 build problem</FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> > >../../../bin/omniidl -bcxx -Wba -p../../../../src/lib/omniORB</FONT>
<BR><FONT SIZE=2>> > -Wbdebug -v -</FONT>
<BR><FONT SIZE=2>> > C</FONT>
<BR><FONT SIZE=2>> > >omniORB4 ../../../../idl/Naming.idl</FONT>
<BR><FONT SIZE=2>> > >omniidl: Importing back-end 'cxx'</FONT>
<BR><FONT SIZE=2>> > >omniidl: 'cxx' imported from</FONT>
<BR><FONT SIZE=2>> > >'../../../../src/lib/omniORB/omniidl_be/cxx/__init__.py'</FONT>
<BR><FONT SIZE=2>> > >omniidl: Preprocessing '../../../../idl/Naming.idl' with</FONT>
<BR><FONT SIZE=2>> > >'/amd_tmp/needle-8/users0/cstaff/tpl/SRC/omniORB-4.0.1/omni/build</FONT>
<BR><FONT SIZE=2>> /lib/omnic</FONT>
<BR><FONT SIZE=2>> > p</FONT>
<BR><FONT SIZE=2>> > >p</FONT>
<BR><FONT SIZE=2>> > >-lang-c++ -undef -D__OMNIIDL__=0x2420 -D__OMNIIDL_CXX__</FONT>
<BR><FONT SIZE=2>> > >"../../../../idl/Naming.idl"'</FONT>
<BR><FONT SIZE=2>> > >omniidl: Running front end</FONT>
<BR><FONT SIZE=2>> > >omniidl: Running back-end 'cxx'</FONT>
<BR><FONT SIZE=2>> > >make[3]: *** [omniORB4/Naming.hh] Bus error (core dumped)</FONT>
<BR><FONT SIZE=2>> > >make[3]: *** Deleting file `omniORB4/Naming.hh'</FONT>
<BR><FONT SIZE=2>> > >make[3]: Leaving directory</FONT>
<BR><FONT SIZE=2>> > >`/amd_tmp/needle-8/users0/cstaff/tpl/SRC/omniORB-4.0.1/omni/build</FONT>
<BR><FONT SIZE=2>> /src/lib/o</FONT>
<BR><FONT SIZE=2>> > m</FONT>
<BR><FONT SIZE=2>> > >niORB'</FONT>
<BR><FONT SIZE=2>> > ></FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> > omniORB 4.0.2</FONT>
<BR><FONT SIZE=2>> > I have exactly the same behaviour on HPUX 11.00 with aCC A.03.33 and</FONT>
<BR><FONT SIZE=2>> > without -AA</FONT>
<BR><FONT SIZE=2>> > Could someone help me to solve (or to understand what the </FONT>
<BR><FONT SIZE=2>> problem is)?</FONT>
<BR><FONT SIZE=2>> > Thanks,</FONT>
<BR><FONT SIZE=2>> > Pierre.</FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> > _______________________________________________</FONT>
<BR><FONT SIZE=2>> > omniORB-list mailing list</FONT>
<BR><FONT SIZE=2>> > omniORB-list@omniorb-support.com</FONT>
<BR><FONT SIZE=2>> > <A HREF="http://www.omniorb-support.com/mailman/listinfo/omniorb-list" TARGET="_blank">http://www.omniorb-support.com/mailman/listinfo/omniorb-list</A></FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> _______________________________________________</FONT>
<BR><FONT SIZE=2>> omniORB-list mailing list</FONT>
<BR><FONT SIZE=2>> omniORB-list@omniorb-support.com</FONT>
<BR><FONT SIZE=2>> <A HREF="http://www.omniorb-support.com/mailman/listinfo/omniorb-list" TARGET="_blank">http://www.omniorb-support.com/mailman/listinfo/omniorb-list</A></FONT>
<BR><FONT SIZE=2>> </FONT>
</P>
</BODY>
</HTML>