Thread: contrib compilation probs

contrib compilation probs

From
"Christopher Kings-Lynne"
Date:
I just tried compiling all contribs on freebsd/alpha, and I saw these
issues:

gmake[1]: Entering directory `/home/chriskl/pgsql-temp/contrib/pgstattuple'
sed 's,MODULE_PATHNAME,$libdir/pgstattuple,g' pgstattuple.sql.in
>pgstattuple.sql
gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPI
C -I. -I../../src/include   -c -o pgstattuple.o pgstattuple.c -MMD
pgstattuple.c: In function `pgstattuple_real':
pgstattuple.c:203: warning: long long int format, long int arg (arg 4)
pgstattuple.c:204: warning: long long int format, long int arg (arg 4)
pgstattuple.c:205: warning: long long int format, long int arg (arg 4)
pgstattuple.c:207: warning: long long int format, long int arg (arg 4)
pgstattuple.c:208: warning: long long int format, long int arg (arg 4)
pgstattuple.c:210: warning: long long int format, long int arg (arg 4)
ar cr libpgstattuple.a `lorder pgstattuple.o | tsort`
ranlib libpgstattuple.a
gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPI
C -shared -Wl,-x,-soname,libpgstattuple.so.0
tattuple.o -L../../src/port    -o libpgstattuple.so.0
rm -f libpgstattuple.so
ln -s libpgstattuple.so.0 libpgstattuple.so
gmake[1]: Leaving directory `/home/chriskl/pgsql-temp/contrib/pgstattuple'



gmake[1]: Entering directory `/home/chriskl/pgsql-temp/contrib/pgbench'
gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -I../../sr
c/interfaces/libpq -I. -I../../src/include   -c -o pgbench.o pgbench.c -MMD
pgbench.c: In function `main':
pgbench.c:667: warning: unused variable `optopt'
pgbench.c:666: warning: unused variable `opterr'
gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations
pgbench.o -L../../src/interfaces/libpq -lpq -L../../src/port  -R/home/chrisk
l/local/lib -lz -lreadline -lcrypt -lcompat -lm -lutil  -lpgport -o pgbench
gmake[1]: Leaving directory `/home/chriskl/pgsql-temp/contrib/pgbench'

Just a heads up...

Chris



Re: contrib compilation probs

From
Tom Lane
Date:
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> I just tried compiling all contribs on freebsd/alpha, and I saw these
> issues:

Fixed, I think.  Give it another try.
        regards, tom lane


Re: contrib compilation probs

From
"Christopher Kings-Lynne"
Date:
> Fixed, I think.  Give it another try.

I didn't see any probs with the ones you fixed, but I see this:

gmake[1]: Entering directory `/home/chriskl/pgsql-temp/contrib/tsearch2'
sed 's,DATA_PATH,/home/chriskl/local/share/postgresql,g' < tsearch.sql._in >
tsearch2.sql.in
sed 's,MODULE_PATHNAME,$libdir/tsearch2,g' tsearch2.sql.in >tsearch2.sql
cp untsearch.sql.in untsearch2.sql
gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPI
C -I. -I. -I./snowball -I./ispell -I./wordparser -I../../src/include   -c -o
dict_ex.o dict_ex.c -MMD
gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPI
C -I. -I. -I./snowball -I./ispell -I./wordparser -I../../src/include   -c -o
dict.o dict.c -MMD
gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPI
C -I. -I. -I./snowball -I./ispell -I./wordparser -I../../src/include   -c -o
snmap.o snmap.c -MMD
gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPI
C -I. -I. -I./snowball -I./ispell -I./wordparser -I../../src/include   -c -o
stopword.o stopword.c -MMD
gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPI
C -I. -I. -I./snowball -I./ispell -I./wordparser -I../../src/include   -c -o
common.o common.c -MMD
gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPI
C -I. -I. -I./snowball -I./ispell -I./wordparser -I../../src/include   -c -o
prs_dcfg.o prs_dcfg.c -MMD
prs_dcfg.c: In function `parse_cfgdict':
prs_dcfg.c:65: warning: int format, different type arg (arg 2)
prs_dcfg.c:78: warning: int format, different type arg (arg 2)
prs_dcfg.c:87: warning: int format, different type arg (arg 2)
prs_dcfg.c:118: warning: int format, different type arg (arg 2)
prs_dcfg.c:128: warning: int format, different type arg (arg 3)
gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPI
C -I. -I. -I./snowball -I./ispell -I./wordparser -I../../src/include   -c -o
snowball/english_stem.o snowball/english_stem.c -MMD
cp: snowball/english_stem.d: No such file or directory
gmake[1]: *** [snowball/english_stem.o] Error 1
gmake[1]: *** Deleting file `snowball/english_stem.o'
gmake[1]: Leaving directory `/home/chriskl/pgsql-temp/contrib/tsearch2'
gmake: *** [all] Error 2

Chris



Re: contrib compilation probs

From
Tom Lane
Date:
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> I didn't see any probs with the ones you fixed, but I see this:

> prs_dcfg.c: In function `parse_cfgdict':
> prs_dcfg.c:65: warning: int format, different type arg (arg 2)
> prs_dcfg.c:78: warning: int format, different type arg (arg 2)
> prs_dcfg.c:87: warning: int format, different type arg (arg 2)
> prs_dcfg.c:118: warning: int format, different type arg (arg 2)
> prs_dcfg.c:128: warning: int format, different type arg (arg 3)

Fixed those.

> gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPI
> C -I. -I. -I./snowball -I./ispell -I./wordparser -I../../src/include   -c -o
> snowball/english_stem.o snowball/english_stem.c -MMD
> cp: snowball/english_stem.d: No such file or directory
> gmake[1]: *** [snowball/english_stem.o] Error 1

No idea about this; it doesn't happen here.  Anyone?
        regards, tom lane


Re: contrib compilation probs

From
"Christopher Kings-Lynne"
Date:
> >
gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPI
> >
-I. -I. -I./snowball -I./ispell -I./wordparser -I../../src/include   -c -o
> > snowball/english_stem.o snowball/english_stem.c -MMD
> > cp: snowball/english_stem.d: No such file or directory
> > gmake[1]: *** [snowball/english_stem.o] Error 1

Hmmm...looks like on my system english_stem.d is created in the tsearch2
dir, NOT in the snowball subdir.

Chris



Re: contrib compilation probs

From
Tom Lane
Date:
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPI
> 
> -I. -I. -I./snowball -I./ispell -I./wordparser -I../../src/include   -c -o
> snowball/english_stem.o snowball/english_stem.c -MMD
> cp: snowball/english_stem.d: No such file or directory
> gmake[1]: *** [snowball/english_stem.o] Error 1

> Hmmm...looks like on my system english_stem.d is created in the tsearch2
> dir, NOT in the snowball subdir.

I see no english_stem.d at all.  I speculate that this is a temp file
created during the gcc run, and that your gcc driver is brain-damaged
about compiling files that aren't in the current directory.
        regards, tom lane


Re: contrib compilation probs

From
"Christopher Kings-Lynne"
Date:
> > Hmmm...looks like on my system english_stem.d is created in the tsearch2
> > dir, NOT in the snowball subdir.
> 
> I see no english_stem.d at all.  I speculate that this is a temp file
> created during the gcc run, and that your gcc driver is brain-damaged
> about compiling files that aren't in the current directory.

It's just normal GNU CC...

Chris



Re: contrib compilation probs

From
Peter Eisentraut
Date:
Tom Lane writes:

> > gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPI
> > C -I. -I. -I./snowball -I./ispell -I./wordparser -I../../src/include   -c -o
> > snowball/english_stem.o snowball/english_stem.c -MMD
> > cp: snowball/english_stem.d: No such file or directory
> > gmake[1]: *** [snowball/english_stem.o] Error 1
>
> No idea about this; it doesn't happen here.  Anyone?

These files are created when --enable-depend is on.  The problem appears
to be that the Makefile is trying to create files in a directory not its
own.  You cannot do that; it creates all kinds of problems in complex
installation setups.

-- 
Peter Eisentraut   peter_e@gmx.net


Re: contrib compilation probs

From
Tom Lane
Date:
Peter Eisentraut <peter_e@gmx.net> writes:
> These files are created when --enable-depend is on.  The problem appears
> to be that the Makefile is trying to create files in a directory not its
> own.  You cannot do that; it creates all kinds of problems in complex
> installation setups.

I was afraid it was something like that.  Can we leave the directory
structure as-is and just make the .o (and .d) files get built in the
upper directory, that isgcc ... -o english_stem.o snowball/english_stem.c
?  Or must we go the full nine yards and make sub-Makefiles in the
subdirectories?
        regards, tom lane


Re: contrib compilation probs

From
Peter Eisentraut
Date:
Tom Lane writes:

> I was afraid it was something like that.  Can we leave the directory
> structure as-is and just make the .o (and .d) files get built in the
> upper directory, that is
>     gcc ... -o english_stem.o snowball/english_stem.c

That will fail for a more basic reason: not all compilers support the -o
option.

-- 
Peter Eisentraut   peter_e@gmx.net


Re: contrib compilation probs

From
Teodor Sigaev
Date:

Peter Eisentraut wrote:
> Tom Lane writes:
> 
> 
>>I was afraid it was something like that.  Can we leave the directory
>>structure as-is and just make the .o (and .d) files get built in the
>>upper directory, that is
>>    gcc ... -o english_stem.o snowball/english_stem.c
> 
> 
> That will fail for a more basic reason: not all compilers support the -o
> option.

I added sub-Makefiles. Christopher, try now, pls.

-- 
Teodor Sigaev                                  E-mail: teodor@sigaev.ru



Re: contrib compilation probs

From
"Christopher Kings-Lynne"
Date:
> > That will fail for a more basic reason: not all compilers support the -o
> > option.
> 
> I added sub-Makefiles. Christopher, try now, pls.

Works perfectly.  Thanks.

Chris



Re: contrib compilation probs

From
Kevin Brown
Date:
Peter Eisentraut wrote:
> Tom Lane writes:
> 
> > I was afraid it was something like that.  Can we leave the directory
> > structure as-is and just make the .o (and .d) files get built in the
> > upper directory, that is
> >     gcc ... -o english_stem.o snowball/english_stem.c
> 
> That will fail for a more basic reason: not all compilers support the -o
> option.

...jaw drops to ground...

I'm astounded.  There are such compilers still in use??  Which ones?



-- 
Kevin Brown                          kevin@sysexperts.com