cvs version compile error on AIX 4.3.3 using xlc (long) - Mailing list pgsql-hackers
From | Weiping He |
---|---|
Subject | cvs version compile error on AIX 4.3.3 using xlc (long) |
Date | |
Msg-id | 3F0AA578.6040906@zhengmai.com.cn Whole thread Raw |
Responses |
Re: cvs version compile error on AIX 4.3.3 using xlc (long)
(Tom Lane <tgl@sss.pgh.pa.us>)
|
List | pgsql-hackers |
Hi, just try to compile newly updated 7.4-devl version on a AIX 4.4.3 box, (just checkouted about 24 hours) but seemsgot problem: ----------------------------------------8<------------------------------------------------------------------------------- make[3]: Entering directory `/home/postgres/pgsql-7.4/pgsql/src/backend/libpq' xlc -O2 -qmaxmem=16384 -qsrcmsg -qlonglong -I../../../src/include -I/usr/local/include/ -c -o be-fsstubs.o be-fsstubs.c xlc -O2 -qmaxmem=16384 -qsrcmsg -qlonglong -I../../../src/include -I/usr/local/include/ -c -o be-secure.o be-secure.c xlc -O2 -qmaxmem=16384 -qsrcmsg -qlonglong -I../../../src/include -I/usr/local/include/ -c -o auth.o auth.c xlc -O2 -qmaxmem=16384 -qsrcmsg -qlonglong -I../../../src/include -I/usr/local/include/ -c -o crypt.o crypt.c xlc -O2 -qmaxmem=16384 -qsrcmsg -qlonglong -I../../../src/include -I/usr/local/include/ -c -o hba.o hba.c 638 | hints.ai_flags = AI_NUMERICHOST; .................................a.............. a - 1506-045 (S) Undeclared identifier AI_NUMERICHOST. 1209 | hints.ai_flags = AI_NUMERICHOST; .........................a.............. a - 1506-045 (S) Undeclared identifier AI_NUMERICHOST. ----------------------------------------8<------------------------------------------------------------------------------- the configure command I used is: ./configure --prefix=/home/postgres/pgsql --with-includes=/usr/local/include/ --with-libs=/usr/local/lib and I installed readline and zlib into /usr/local/lib, the header file in /usr/local/include, the compiler is xlc from IBM: C for AIX Compiler, Version 5 I've check the macro, it's defined in getaddrinfo.h, and later included by src/backend/libpq/ip.h and then src/backend/libpq/libpq.h, all the include path seems ok, but I can only get it compile after I add the macro #define AI_NUMERICHOST 0x0004 could it continue to compile. but later, it reports: xlc -O2 -qmaxmem=16384 -qsrcmsg -qlonglong -I../../../src/include -I/usr/local/include/ -c -o dynloader.o dynloader.c "/usr/include/ldfcn.h", line 239.9: 1506-213 (S) Macro name FREAD cannot be redefined. "/usr/include/ldfcn.h", line 239.9: 1506-358 (I) "FREAD" is defined on line 217 of /usr/include/fcntl.h. "/usr/include/ldfcn.h", line 242.9: 1506-213 (S) Macro name FWRITE cannot be redefined. "/usr/include/ldfcn.h", line 242.9: 1506-358 (I) "FWRITE" is defined on line 218 of /usr/include/fcntl.h. remove the #include "ldfcn.h" to circumvent the problem, and later the compiler complain: make[3]: Entering directory `/home/postgres/pgsql-7.4/pgsql/src/backend/port' xlc -O2 -qmaxmem=16384 -qsrcmsg -qlonglong -I../../../src/include -c -o pg_shmem.o pg_shmem.c 310 | if ((hdr = (PGShmemHeader *) memAddress = PGSharedMemoryAttach( ...........................a.................................................... a - 1506-025 (S) Operand must be a modifiable lvalue. 340 | if ((hdr = ((PGShmemHeader *) memAddress)= PGSharedMemoryAttach(\ ...........................a.................................................... a - 1506-025 (S) Operand must be a modifiable lvalue. change the line to: memAddress = PGSharedMemoryAttach( UsedShmemSegID, &shmid, UsedShmemSegAddr); hdr = (PGShmemHeader *) memAddress; seem fix it, but seems a little ugly. continue compile, then again in src/interfaces/libpq/fe-connect.c, the AI_NUMERICHOST didn't defined. continue to compile: -------------------------8<---------------------------------------------------------------- touch libpq.a ../../../src/backend/port/aix/mkldexport.sh libpq.a > libpq.exp xlc -O2 -qmaxmem=16384 -qsrcmsg -qlonglong -Wl,-bnoentry -Wl,-H512 -Wl,-bM:SRE -o libpq.so libpq.a -L../../../src/port -L../../../src/port -lnsl -Wl,-bI:../../../src/backend/postgres.imp -Wl,-bE:libpq.exp ld: 0711-224 WARNING: Duplicate symbol: .EncryptMD5 ld: 0711-224 WARNING: Duplicate symbol: .md5_hash ... (lots of link warning) ------------------------8<----------------------------------------------------------------- then: ---------------------------8<--------------------------------------------------------------- make[4]: Entering directory `/home/postgres/pgsql-7.4/pgsql/src/interfaces/ecpg/pgtypeslib' xlc -O2 -qmaxmem=16384 -qsrcmsg -qlonglong -I../../../../src/interfaces/ecpg/include -I../../../../src/include/utils -I../../../../src/include -g -c -o dt_common.o dt_common.c 10 | static int day_tab[2][13] = { ...........a................. a - 1506-334 (S) Identifier day_tab has already been defined on line 219 of "dt.h". ---------------------------8<--------------------------------------------------------------- remove the 'static' in day_tab definition in src/interfaces/ecpg/pgtypeslib/dt_common.c, continue to compile, then: -----------------------------8<-------------------------------------------------------------- ld: 0711-317 ERROR: Undefined symbol: .ceil ld: 0711-317 ERROR: Undefined symbol: .floor make[4]: *** [libpgtypes.so] Error 8 ----------------------------8<--------------------------------------------------------------- seems my libm.a have been installed: -----------------------8<-------------------------------------------------------------------- "F85:/home/postgres/pgsql-7.4/pgsql>"lslpp -l bos.adt.libm Fileset Level State Description ---------------------------------------------------------------------------- Path: /usr/lib/objrepos bos.adt.libm 4.3.3.50 COMMITTED Base Application Development Math Library -----------------------8<-------------------------------------------------------------------- sorry for the long description, I just try to build a useable 7.4-devl version on my AIX box, then found those problem, so I just copy those compile error while writing this mail. And I doing something stupid? or there is some problem in postgresql? regards Laser then I give up.
pgsql-hackers by date: