Thread: AIX buildfarm failure

AIX buildfarm failure

From
"Rocco Altier"
Date:
I am seeing buildfarm failures on AIX because stdio.h is being included
before pg_config.h (which has the definition of _LARGE_FILES).

The problem is stemming from math.h including stdlib.h, which (after
several more inclusions) ends up including stdio.h.

This is where the fgetpos64 different definitions is coming from.

If I move <math.h> down after "postgres.h" in nodeHash.c, the problem
goes away.

Do we want to consider putting math.h into the standard include set?

Or is there a general rule that postgres.h needs to be the first include
file (before system headers, etc)?

Thanks,-rocco


Re: AIX buildfarm failure

From
Tom Lane
Date:
"Rocco Altier" <RoccoA@Routescape.com> writes:
> If I move <math.h> down after "postgres.h" in nodeHash.c, the problem
> goes away.

Bruce, you broke it.  Have you forgotten the fundamental inclusion rule?
postgres.h (or postgres_fe.h, or c.h) first, then system headers, then
our own other headers.
        regards, tom lane


Re: AIX buildfarm failure

From
Bruce Momjian
Date:
Fixed.

---------------------------------------------------------------------------

Tom Lane wrote:
> "Rocco Altier" <RoccoA@Routescape.com> writes:
> > If I move <math.h> down after "postgres.h" in nodeHash.c, the problem
> > goes away.
> 
> Bruce, you broke it.  Have you forgotten the fundamental inclusion rule?
> postgres.h (or postgres_fe.h, or c.h) first, then system headers, then
> our own other headers.
> 
>             regards, tom lane

--  Bruce Momjian   bruce@momjian.us EnterpriseDB    http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


Re: AIX buildfarm failure

From
"Rocco Altier"
Date:
Now it dies on nodeSubplan.c...

I am guessing there will be others as well.

Perhaps a check to make sure postgres.h is first in the includes can be
added to the include checking scripts you have been updating?

Thanks,-rocco

> -----Original Message-----
> From: Bruce Momjian [mailto:bruce@momjian.us]
> Sent: Thursday, July 13, 2006 4:14 PM
> To: Tom Lane
> Cc: Rocco Altier; pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] AIX buildfarm failure
>
>
>
> Fixed.
>
> --------------------------------------------------------------
> -------------
>
> Tom Lane wrote:
> > "Rocco Altier" <RoccoA@Routescape.com> writes:
> > > If I move <math.h> down after "postgres.h" in nodeHash.c,
> the problem
> > > goes away.
> >
> > Bruce, you broke it.  Have you forgotten the fundamental
> inclusion rule?
> > postgres.h (or postgres_fe.h, or c.h) first, then system
> headers, then
> > our own other headers.
> >
> >             regards, tom lane
>
> --
>   Bruce Momjian   bruce@momjian.us
>   EnterpriseDB    http://www.enterprisedb.com
>
>   + If your life is a hard drive, Christ can be your backup. +
>


Re: AIX buildfarm failure

From
Bruce Momjian
Date:
Rocco Altier wrote:
> Now it dies on nodeSubplan.c...
> 
> I am guessing there will be others as well.

I check them all the math.h mentions.

---------------------------------------------------------------------------


> 
> Perhaps a check to make sure postgres.h is first in the includes can be
> added to the include checking scripts you have been updating?
> 
> Thanks,
>     -rocco
> 
> > -----Original Message-----
> > From: Bruce Momjian [mailto:bruce@momjian.us] 
> > Sent: Thursday, July 13, 2006 4:14 PM
> > To: Tom Lane
> > Cc: Rocco Altier; pgsql-hackers@postgresql.org
> > Subject: Re: [HACKERS] AIX buildfarm failure
> > 
> > 
> > 
> > Fixed.
> > 
> > --------------------------------------------------------------
> > -------------
> > 
> > Tom Lane wrote:
> > > "Rocco Altier" <RoccoA@Routescape.com> writes:
> > > > If I move <math.h> down after "postgres.h" in nodeHash.c, 
> > the problem
> > > > goes away.
> > > 
> > > Bruce, you broke it.  Have you forgotten the fundamental 
> > inclusion rule?
> > > postgres.h (or postgres_fe.h, or c.h) first, then system 
> > headers, then
> > > our own other headers.
> > > 
> > >             regards, tom lane
> > 
> > -- 
> >   Bruce Momjian   bruce@momjian.us
> >   EnterpriseDB    http://www.enterprisedb.com
> > 
> >   + If your life is a hard drive, Christ can be your backup. +
> > 

--  Bruce Momjian   bruce@momjian.us EnterpriseDB    http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +