Hi all,

I get the following build error when attempting to build 7.4 in a Linux
Vserver (like a FreeBSD jail) built on Slackware 9.1 with the 2.4.22
kernel:

make -C doc all
make[1]: Entering directory `/usr/local/src/postgresql-7.4/doc'
gzip -d -c man.tar.gz | /bin/tar xf -
for file in man1/*.1; do \
  mv $file $file.bak && \
  sed -e 's/\\fR(l)/\\fR(7)/' $file.bak >$file && \
  rm -f $file.bak || exit; \
done
/bin/sh ../config/mkinstalldirs man7
mkdir man7
for file in manl/*.l; do \
  sed -e '/^\.TH/s/"l"/"7"/'   \
              -e 's/\\fR(l)/\\fR(7)/' \
      $file >man7/`basename $file | sed 's/.l$/.7/'` || exit; \ done
make[1]: Leaving directory `/usr/local/src/postgresql-7.4/doc'
make -C src all
make[1]: Entering directory `/usr/local/src/postgresql-7.4/src'
make -C port all
make[2]: Entering directory `/usr/local/src/postgresql-7.4/src/port'
gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations prod -I../../src/include -D_GNU_SOURCE
-I/usr/include  -c -o path.o path.c
gcc: cannot specify -o with -c or -S and multiple compilations
make[2]: *** [path.o] Error 1
make[2]: Leaving directory `/usr/local/src/postgresql-7.4/src/port'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/src/postgresql-7.4/src'
make: *** [all] Error 2

root@developer:/usr/local/src/postgresql-7.4# uname -a Linux
developer.pgadmin.org 2.4.22-vs1.20 #14 SMP Wed Dec 10 19:49:23 GMT 2003
i686 unknown unknown GNU/Linux

root@developer:/usr/local/src/postgresql-7.4# gcc --version gcc (GCC)
3.2.3 Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

Configured with: ./configure --with-openssl=/usr

Any ideas what may be causing this? 

Thanks, Dave.

Thu, 11 Dec 2003 11:09:01 -0000
"Dave Page" <dpage@vale-housing.co.uk>
7.4 build problem on Linux Vserver
"Dave Page" <dpage@vale-housing.co.uk> writes:
> gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
> -Wmissing-declarations prod -I../../src/include -D_GNU_SOURCE
> -I/usr/include  -c -o path.o path.c
> gcc: cannot specify -o with -c or -S and multiple compilations

How is "prod" getting into that command line?  I suspect it's coming
from an environment variable like PROFILE or CFLAGS ...

			regards, tom lane

Thu, 11 Dec 2003 10:31:08 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: 7.4 build problem on Linux Vserver 
Tom Lane wrote:

>"Dave Page" <dpage@vale-housing.co.uk> writes:
>  
>
>>gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
>>-Wmissing-declarations prod -I../../src/include -D_GNU_SOURCE
>>-I/usr/include  -c -o path.o path.c
>>gcc: cannot specify -o with -c or -S and multiple compilations
>>    
>>
>
>How is "prod" getting into that command line?  I suspect it's coming
>from an environment variable like PROFILE or CFLAGS ...
>
>	
>

Is there a case for making Makefile/shell variables and defines we use 
have less generic names? I know I encountered a problem on Windows when 
doing initdb because it defines one of BINDIR/DATADIR (I forget which). 
It took me ages to find out what was going on, and I fixed it by 
prepending the variable (in this case a define) with "PG"

cheers

andrew


Thu, 11 Dec 2003 11:23:02 -0500
Andrew Dunstan <andrew@dunslane.net>
Re: 7.4 build problem on Linux Vserver
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> How is "prod" getting into that command line?  I suspect it's coming
>> from an environment variable like PROFILE or CFLAGS ...

> Is there a case for making Makefile/shell variables and defines we use 
> have less generic names?

Having configure/make depend on CC, CFLAGS, etc is standard behavior;
renaming those would increase the surprise factor, not reduce it.

PROFILE is maybe a borderline case, since I'm not sure how many packages
use it the way we do.  But I'd be at least as inclined to blame Dave's
environment for using a generic variable name as blame our makefiles.

			regards, tom lane

Thu, 11 Dec 2003 11:35:38 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: 7.4 build problem on Linux Vserver 