>>>>> Markus Schaeffer writes: Markus> I had a lot of questions last Markus> year reagarding Muli-Threading on AIX 4.3.3. Markus> Guess what! We move to AIX 5.1 and of course I've got some problems. Markus> From: Markus.Schaeffer@xxxxxxxxxxx (Mattey) Markus> Newsgroups: gnu.gcc.help Markus> Subject: AIX 5.1 GCC 3.2.3 and Xerces 1.6.0 build problems! Markus> NNTP-Posting-Host: 213.157.7.2 Markus> Message-ID: <412a6c50.0403180728.73143cfe@xxxxxxxxxxxxxxxxxx> Markus> Hello, Markus> I am on working on AIX 5.1 ML5 with gcc 3.3.2 (binary from: Markus> http://aixpdslib.seas.ucla.edu/packages/gcc.html). --> By building an example that is using my Xerces build, I do get the Markus> following result: Markus> [aix3]$ make Markus> g++ -c -g -Wno-deprecated -pthread -DPOSIX -D_REENTRANT -D_AIX -I. Markus> -I../../include SAXPrintHandlers.cpp Markus> g++ -c -g -Wno-deprecated -pthread -DPOSIX -D_REENTRANT -D_AIX -I. Markus> -I../../include SAXPrint.cpp Markus> g++ SAXPrintHandlers.o SAXPrint.o -L/usr/lib -L/usr/local/lib Markus> -L/usr/ccs/lib -L../../lib -o superman -pthread -Wl,-brtl Markus> -Wl,-bnoquiet -Wl,-bnolibpath -Wl,-blibpath:./:../lib:./lib:/usr/lib Markus> -lxerces-c1_6_0 Markus> (ld): halt 4 Markus> (ld): setopt r/o->w Markus> (ld): setopt nodelcsect Markus> (ld): setopt rtl Markus> (ld): setopt rtllib Markus> (ld): setopt symbolic:1 Markus> (ld): lrgpage 0 Markus> (ld): savename superman Markus> (ld): filelist 12 2 Markus> (ld): i /lib/crt0_r.o Markus> (ld): i /tmp//ccCgIPbq.o Markus> (ld): i SAXPrintHandlers.o Markus> (ld): i SAXPrint.o Markus> (ld): lib ../../lib/libxerces-c1_6_0.a Markus> (ld): lib /usr/local/lib/libstdc++.a Markus> (ld): lib /usr/lib/libm.a Markus> (ld): lib /usr/local/lib/libgcc_s_pthread.a Markus> (ld): i Markus> /pkg/tools/compiler/gcc/bin/../lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.2.3/pthread/libgcc.a Markus> (ld): lib /usr/lib/libpthreads.a Markus> (ld): lib /usr/lib/libc.a Markus> (ld): lib /usr/lib/librtl.a Markus> LIBRARY: Shared object libxerces-c1_6_0.a: 5190 symbols imported. Markus> LIBRARY: Shared object libstdc++.a[libstdc++.so.5]: 2099 symbols Markus> imported. Markus> LIBRARY: Shared object libgcc_s_pthread.a[shr.o]: 100 symbols Markus> imported. Markus> LIBRARY: Shared object libpthreads.a[shr_comm.o]: 152 symbols Markus> imported. Markus> LIBRARY: Shared object libpthreads.a[shr_xpg5.o]: 125 symbols Markus> imported. Markus> LIBRARY: Shared object libc.a[shr.o]: 2463 symbols imported. Markus> LIBRARY: Shared object libc.a[meth.o]: 2 symbols imported. Markus> LIBRARY: Shared object libc.a[aio.o]: 11 symbols imported. Markus> LIBRARY: Shared object libc.a[pse.o]: 5 symbols imported. Markus> LIBRARY: Shared object libc.a[dl.o]: 4 symbols imported. Markus> LIBRARY: Shared object libc.a[pty.o]: 1 symbols imported. Markus> LIBRARY: Shared object librtl.a[shr.o]: 1 symbols imported. Markus> LIBRARY: Shared object librtl.a[lazy42.o]: 3 symbols imported. Markus> FILELIST: Number of previously inserted files processed: 12 Markus> (ld): exports /tmp//ccOaAmky.x Markus> EXPORTS: Symbols exported: 6 Markus> (ld): initfini _GLOBAL__FI_superman _GLOBAL__FD_superman Markus> (ld): resolve Markus> RESOLVE: 382 of 19049 symbols were kept. Markus> (ld): addgl /usr/lib/glink.o Markus> ADDGL: Glink code added for 41 symbols. Markus> (ld): er full Markus> ld: 0711-318 ERROR: Undefined symbols were found. Markus> The following symbols are in error: Markus> Symbol Inpndx TY CL Source-File(Object-File) OR Markus> Import-File{Shared-object} Markus> RLD: Address Section Rld-type Markus> Referencing Symbol Markus> ---------------------------------------------------------------------------------------------- Markus> ld: 0711-317 ERROR: Undefined symbol: typeinfo for SAXParseException Markus> typeinfo for SAXParseException[140] ER RW Markus> SAXPrintHandlers.cpp(SAXPrintHandlers.o) Markus> 00005b24 .data R_POS [2541] Markus> <typeinfo for SAXParseException> Markus> ld: 0711-317 ERROR: Undefined symbol: typeinfo for XMLException Markus> typeinfo for XMLException [74] ER RW SAXPrint.cpp(SAXPrint.o) Markus> 000015f0 .data R_POS [1230] Markus> <.data> Markus> ER: The return code is 8. Markus> collect2: ld returned 8 exit status Markus> make: *** [superman] Error 1 Markus> [aix3]$ --> The qeustion is what is my mistake? Are there any known issues? Markus> --------------------------------------------------------------------- Markus> XERCES Build Options: Markus> --------------------------------------------------------------------- Markus> CXX=g++ Markus> CFLAGS = -g \ Markus> -Wno-deprecated \ Markus> -pthread \ Markus> -fpic \ Markus> -D_THREAD_SAFE \ Markus> -D_REENTRANT \ Markus> -D__POSIX_C_SOURCE=199506L Markus> LDFLAGS = $(CXX) \ Markus> -shared \ Markus> -pthread \ Markus> -lpthreads_compat \ Markus> -Wl,-bnoquiet \ Markus> -Wl,-bnolibpath \ Markus> -Wl,-blibpath:/usr/lib:.:./lib:../lib \ Markus> -Wl,-bloadmap:loadmap \ Markus> -Wl,-bmap:map \ Markus> -Wl,-bM:SRE -Wl,-bnoentry -lstdc++ Markus> --------------------------------------------------------------------- Markus> . Markus> . Markus> /pkg/home/buzzy/src/xerces-c-src1_6_0/obj/AIX/XPathSymbols.o Markus> /pkg/home/buzzy/src/xerces-c-src1_6_0/obj/AIX/XUtil.o Markus> /pkg/home/buzzy/src/xerces-c-src1_6_0/obj/AIX/XercesAttGroupInfo.o Markus> /pkg/home/buzzy/src/xerces-c-src1_6_0/obj/AIX/XercesElementWildcard.o Markus> /pkg/home/buzzy/src/xerces-c-src1_6_0/obj/AIX/XercesGroupInfo.o Markus> /pkg/home/buzzy/src/xerces-c-src1_6_0/obj/AIX/XercesXPath.o Markus> /pkg/home/buzzy/src/xerces-c-src1_6_0/obj/AIX/YearDatatypeValidator.o Markus> /pkg/home/buzzy/src/xerces-c-src1_6_0/obj/AIX/YearMonthDatatypeValidator.o Markus> /pkg/home/buzzy/src/xerces-c-src1_6_0/obj/AIX/sax2Dummy.o Markus> (ld): halt 4 Markus> (ld): setopt r/o->w Markus> (ld): setopt nodelcsect Markus> (ld): lrgpage 0 Markus> (ld): savename /pkg/home/buzzy/src/xerces-c-src1_6_0/lib/libxerces-c1_6_0.a Markus> (ld): filelist 275 2 Markus> (ld): setopt noprogram Markus> (ld): noentry Markus> NOENTRY: There is no entry point. Markus> (ld): i /tmp//ccUYc42J.o Markus> (ld): lib /usr/lib/libpthreads_compat.a Markus> (ld): lib Markus> /pkg/tools/compiler/gcc/bin/../lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.2.3/../../../pthread/libstdc++.a Markus> (ld): i /pkg/home/buzzy/src/xerces-c-src1_6_0/obj/AIX/AIXPlatformUtils.o Markus> . Markus> . Markus> (ld): lib Markus> /pkg/tools/compiler/gcc/bin/../lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.2.3/../../../libgcc_s_pthread.a Markus> (ld): lib /usr/lib/libpthreads.a Markus> (ld): lib /usr/lib/libc.a Markus> LIBRARY: Shared object libpthreads_compat.a[shr.o]: 116 symbols Markus> imported. Markus> LIBRARY: Shared object libstdc++.a[libstdc++.so.5]: 2304 symbols Markus> imported. Markus> LIBRARY: Shared object libgcc_s_pthread.a[shr.o]: 94 symbols imported. Markus> LIBRARY: Shared object libpthreads.a[shr_comm.o]: 152 symbols Markus> imported. Markus> LIBRARY: Shared object libpthreads.a[shr_xpg5.o]: 125 symbols Markus> imported. Markus> LIBRARY: Shared object libc.a[shr.o]: 2463 symbols imported. Markus> LIBRARY: Shared object libc.a[meth.o]: 2 symbols imported. Markus> LIBRARY: Shared object libc.a[aio.o]: 11 symbols imported. Markus> LIBRARY: Shared object libc.a[pse.o]: 5 symbols imported. Markus> LIBRARY: Shared object libc.a[dl.o]: 4 symbols imported. Markus> LIBRARY: Shared object libc.a[pty.o]: 1 symbols imported. Markus> FILELIST: Number of previously inserted files processed: 275 Markus> (ld): exports /tmp//ccPjhPZ4.x Markus> EXPORTS: Symbols exported: 5190 Markus> (ld): initfini _GLOBAL__FI_libxerces_c1_6_0_a Markus> _GLOBAL__FD_libxerces_c1_6_0_a Markus> (ld): resolve Markus> RESOLVE: 11709 of 43633 symbols were kept. Markus> (ld): addgl /usr/lib/glink.o Markus> ADDGL: Glink code added for 69 symbols. Markus> (ld): er full Markus> ER: There are no unresolved symbols. Markus> (ld): mismatch Markus> MISMATCH: No type mismatches exist. Markus> (ld): comprld Markus> COMPRLD: Kept 79923 of 79923 relocation entries. Markus> (ld): origin page 0x10000000 0x20000000 Markus> (ld): libpath /usr/lib:.:./lib:../lib Markus> LIBPATH: Library path set to /usr/lib:.:./lib:../lib Markus> (ld): save SRE . Markus> SAVE: Section sizes = 3051864+645380+1788 (0x2E9158+0x9D904+0x6FC hex) Markus> SAVE: Size of TOC: 7520 (0x1D60 hex) Markus> SAVE: No .loader section relocation entries exist for the .text Markus> section. Markus> (ld): gen map map Markus> (ld): rc Markus> RC: Highest return code was 0. Markus> make[1]: Leaving directory `/pkg/home/buzzy/src/xerces-c-src1_6_0/obj' Markus> [aix3]$ This may be a limitation of G++ on AIX. Does you application require runtime type information? If not, you can compile with -fno-rtti. You do not specify which update of AIX 5.1 you are using. If you install the weak symbol feature for AIX 5.1 and rebuild GCC to utilize it, GCC might be able to handle C++ typeinfo language features better. I suspect the prebuild binaries on UCLA's aixpdslib are not built with AIX weak symbol support. David