[omniORB] Problems compiling omniORB 2.6.1 on AIX and HP-UX

Gary D. Duzan gdd0@gte.com
Fri, 13 Nov 1998 09:01:19 -0500


In Message <364B5140.B3D1ACF7@t-online.de> ,
   Harald.Karch@t-online.de (Harald Karch) wrote:

=>we have an AIX-4.2 machine and are also using the CSet++  compiler.
=>
=>We have no problems by patching the Makefiles of all shared libraries in
=>
=>the following way:
=>
=>rm -f libomnithread2.a.0; \
=> /usr/lpp/xlC/bin/makeC++SharedLib\
=>       -lC_r -lc_r -lpthreads -p 40 \    <------------
=>             -o libomnithread.so.2.0  \
=>         posix.o ; \
=>         ar cq libomnithread2.a.0 libomnithread.so.2.0;
=>         rm -f libomnithread.so.2.0 ; \

   Fact is, it should be using "makeC++SharedLib_r" in the first place,
which shouldn't need "-lC_r -lc_r" at all. If you don't have
makeC++SharedLib_r or you have an omniORB release which doesn't use it,
I'd be interested in hearing about it. 2.6.1 builds fine on AIX
4.2.1/xlC 3.1.4.7 with only a single change: modify
mk/platforms/powerpc_aix_4.2.mk to use "bsdinstall instead of "cp" and
build as root. Getting a GNU version of "cp" might get around the
problem as well.
   Also, if you are using "/usr/lpp/xlC/bin/makeC++SharedLib -lC -lc ..."
for libomniORB2 as well, that will cause your code to eventually break
too, since you will be combining thread-safe new/delete with the
non-thread-safe ones, eventually causing memory corruption. You'll see
it a lot faster on a multiprocessor box, but eventually on a
uniprocessor as well. Make the same change and you should be fine. To
check to see if it is right, try this:

% dump -H omniORB_2.6.1/lib/powerpc_aix_4.2/libomniORB26.a

omniORB_2.6.1/lib/powerpc_aix_4.2/libomniORB26.a[libomniORB2.so.6.0]:

			***Loader Section***
                      Loader Header Information
VERSION#         #SYMtableENT     #RELOCent        LENidSTR
0x00000001       0x00000521       0x00001da8       0x000000ae       

#IMPfilID        OFFidSTR         LENstrTBL        OFFstrTBL
0x00000005       0x0001df18       0x0000eba2       0x0001dfc6       


			***Import File Strings***
INDEX  PATH                          BASE                MEMBER              
0      ../../../../lib/powerpc_aix_4.2:/usr/lpp/xlC/lib:/usr/lib/threads:/usr/lib:/lib                                         
1                                    libomnithread2.a    libomnithread.so.2.0
2                                    libc_r.a            shr.o               
3                                    libC_r.a            shr.o               
4                                    libpthreads.a       shr.o               

   Note that there is no reference to "libC.a" or "libc.a", which is
how it should be, though it might be a bit different on other versions
of AIX.

					Gary Duzan
					GTE Laboratories