We have successfully compiled shared libraries on AIX using GCC, however we do not use the GNU linker. After seeing comments from people with @ibm.com email addresses saying things like "GNU Binutils does not fully support AIX 5L" (http://gcc.gnu.org/ml/gcc-help/2003-07/msg00082.html), we decided to just use the standard AIX linker.
As for Xerces on AIX, we use IBM's compiler and linker for compiling the Xerces shared lib, and for compiling the only one of our shared libs that links to Xerces. Due to name-mangling differences between the compilers (and between GCC and the IBM linker) when using C++ code, this just seemed like the path of least resistance. :) -Nathan -----Original Message----- From: Simon Kitching [mailto:[EMAIL PROTECTED] Sent: Monday, July 19, 2004 10:55 PM To: [EMAIL PROTECTED] Subject: Re: Using xerces-c on AIX On Mon, 2004-07-19 at 23:31, David Cargill wrote: > For you link problem, the build for AIX assumes you are using xlC. So when > you specify a compiler of gcc/g++ it still uses xlC for the link. You > would need to override the Makefile.incl in /src/xercesc to test the > compiler and then point to the appropriate libraries for g++ and invoke > something other than makeC++SharedLib_r. Thanks for the very useful pointers above, David. The fact that code compiled with gcc/g++ is incompatible with the xlC linker rather makes the -c and -x options to the runConfigure script irrelevant, does it not? Anyway, this is now really a GCC-on-AIX problem rather than a xerces-c problem, so I won't take up any more bandwidth here. But just in case someone does have any last suggestions, here's what I'm getting after following David's suggestion as best I can. If anyone here has managed to compile any dynamic shared library on AIX using gcc tools, I would appreciate your comments, even if it's just to say that yes it is possible. -------------- I've modified Makefile.incl, but can't find the right combo of options to create a dynamic shared library on AIX using GNU "ld". The "-shared" option to ld is, according to the man pages, only available on "ELF, XCOFF and SunOS platforms". This matches nicely with the error message I'm getting: g++ -DAIX -shared -fPIC -Wl,-soname,libxerces-c25.so -o /home/simon/xerces-c-src_2_5_0/lib/libxerces-c25.0.so ... collect2: libxerces-c25.so: cannot open as COFF file The output of gld --help does state that "aixcoff-rs6000" is supported (the target server is AIX5.1 on rs6000). But I've tried using "--oformat aixcoff-rs6000" without success. Experiments continue.... [NB: the ld version installed is: GNU ld 2.9-aix43-010414] Cheers, and thanks for all the help. Simon --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]