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




Thu, 07 Aug 2003 11:36:58 +0800
Weiping He <laser@zhengmai.com.cn>
compile error of 7.4 beta1 on AIX 4.3.3
Weiping He <laser@zhengmai.com.cn> writes:
> 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.

I don't think that's a good fix --- those are different symbols with
different purposes (and even different values, on other platforms).

Looking at src/include/getaddrinfo.h, it seems we assume we need to
supply definitions of AI_NUMERICHOST and NI_NUMERICHOST if and only
if not HAVE_STRUCT_ADDRINFO.  That's probably a bogus assumption.
Can you tell us what configure found for HAVE_STRUCT_ADDRINFO and
HAVE_GETADDRINFO?  Also, which of the macros defined in that file
exist in your system headers?

			regards, tom lane

Thu, 07 Aug 2003 09:48:23 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: compile error of 7.4 beta1 on AIX 4.3.3 
Weiping He <laser@zhengmai.com.cn> writes:
> I'm using xlc v 5.0 on AIX 4.3.3 to compile 7.4 beta1and got the error 
> below:

I think this is fixed as of CVS tip --- please try it on AIX.

BTW, problems with beta releases are better reported in -hackers or
-bugs than in -general.

			regards, tom lane

Thu, 07 Aug 2003 18:25:44 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: compile error of 7.4 beta1 on AIX 4.3.3 
Tom Lane wrote:

>Weiping He <laser@zhengmai.com.cn> writes:
>  
>
>>I'm using xlc v 5.0 on AIX 4.3.3 to compile 7.4 beta1and got the error 
>>below:
>>    
>>
>
>I think this is fixed as of CVS tip --- please try it on AIX.
>
>BTW, problems with beta releases are better reported in -hackers or
>-bugs than in -general.
>
>  
>
OK, the AI_NUMERICHOST problem removed with current cvs tip.
Still we got the duplicated value of ENOTEMPTY   and    EEXIST error.
would try to solve it and report back later.

Thanks and regards

Laser


Fri, 08 Aug 2003 16:19:16 +0800
Weiping He <laser@zhengmai.com.cn>
Re: compile error of 7.4 beta1 on AIX 4.3.3