compile error of 7.4 beta1 on AIX 4.3.3 - Mailing list pgsql-general

From Weiping He
Subject compile error of 7.4 beta1 on AIX 4.3.3
Date
Msg-id 3F31C95A.7070302@zhengmai.com.cn
Whole thread Raw
Responses Re: compile error of 7.4 beta1 on AIX 4.3.3  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: compile error of 7.4 beta1 on AIX 4.3.3  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I'm using xlc v 5.0 on AIX 4.3.3 to compile 7.4 beta1and got the error
below:
--------------------------------------------8<-------------------------------------------------------------------
xlc -O2 -qmaxmem=16384 -qsrcmsg -qlonglong -I../../../src/include
-I/usr/local/include/  -c -o hba.o hba.c
      651 |                 hints.ai_flags = AI_NUMERICHOST;
            .................................a..............
a - 1506-045 (S) Undeclared identifier AI_NUMERICHOST.
     1237 |         hints.ai_flags = AI_NUMERICHOST;
            .........................a..............
a - 1506-045 (S) Undeclared identifier AI_NUMERICHOST.
-----------------------------------------8<-----------------------------------------------------------------------

it seems we should use NI_NUMERICHOST in AIX, for I check the
/usr/include/netdb.h
there can't find AI_NUMERICHOST, just NI_NUMERICHOST. change AI_NUMERICHOST
to NI_NUMERICHOST fixed the problem. But I don't konw the best way to
fix it.

the other problem is that I'll have to comment out the
#include "ldfcn.h"
in src/backend/port/dynloader.c to get compile continue.

and another platform problem:

---------------------------------------8<-------------------------------------------------------------------------
make[4]: Entering directory
`/home/postgres/pgsql-7.4/postgresql-7.4beta1/src/backend/utils/error'
xlc -O2 -qmaxmem=16384 -qsrcmsg -qlonglong -I../../../../src/include
-I/usr/local/include/  -c -o elog.o elog.c
      546 |                 case 17: /* Directory not empty */
            .....................a............................
a - 1506-052 (S) Duplicate case label for value 17. Labels must be unique.
-------------------------------------8<---------------------------------------------------------------------------

in /usr/include/errno.h:

-------------------------------------8<---------------------------------------------------------------------------
/*
 * AIX returns EEXIST where 4.3BSD used ENOTEMPTY;
 * but, the standards insist on unique errno values for each errno.
 * A unique value is reserved for users that want to code case
 * statements for systems that return either EEXIST or ENOTEMPTY.
 */
#ifdef _ALL_SOURCE
#define ENOTEMPTY       EEXIST  /* Directory not empty */
#else   /* not _ALL_SOURCE */
#define ENOTEMPTY       87
#endif  /* _ALL_SOURCE */
-------------------------------------8<---------------------------------------------------------------------------

the default ENOTEMPTY is equal to EEXIST, so the error above.
don't know how to make _ALL_SOURCE macro effect, so I can't send a patch
now.

and  src/interfaces/libpq/fe-connect.c, still AI_NUMERICHOST problem.

and finally, the ecpg package:

-------------------------------------8<---------------------------------------------------------------------------
make[4]: Entering directory
`/home/postgres/pgsql-7.4/postgresql-7.4beta1/src/interfaces/ecpg/pgtypeslib'
../../../../src/backend/port/aix/mkldexport.sh libpgtypes.a > libpgtypes.exp
xlc -O2 -qmaxmem=16384 -qsrcmsg -qlonglong  -Wl,-bnoentry -Wl,-H512
-Wl,-bM:SRE -o libpgtypes.so libpgtypes.a -L../../../../src/port
-L/usr/local/lib  -L../../../../src/port -L/usr/local/lib
-Wl,-bI:../../../../src/backend/postgres.imp -Wl,-bE:libpgtypes.exp

ld: 0711-317 ERROR: Undefined symbol: .ceil
ld: 0711-317 ERROR: Undefined symbol: .floor
-------------------------------------8<---------------------------------------------------------------------------

try to fix that later, report here first.

Thanks and regards

Laser




pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: ext3 block size
Next
From: Weiping He
Date:
Subject: compile error on slackware 9.0 while --enable-thread-safety