[postgis-devel] RC3 build/install script bugs

Rhys Ickeringill rhysi at omnilink.com.au
Mon Feb 28 17:03:38 PST 2005


G'day All.

Hope this is the right spot to post bugs. Just had a few little hitches
building RC3

Some system info in case it's pertinent:
OS: Linux 2.4.29 (Slackware 10.1)
postgreSQL: 7.4.7
make: 3.8
yacc: 1.9 (byacc)
bison: 1.35
flex: 2.5.4



First the easy one - when a "make install DESTDIR=/tmp/pkg" is issued in
postgis-1.1.0-rc3, I end up with a file 'share' in /tmp/pkg/usr/local/pgsql.
The file is actually (as I'm sure you've guessed) 'lwpostgis.sql'. This
error only shows up if the $DESTDIR/usr/local/share doesn't already exist.
Changing the action taken for target 'install-lwgeom-scripts' in
postgis-1.1.0-rc3/lwgeom/Makefile from

$(INSTALL_DATA) lwpostgis.sql $(DESTDIR)$(datadir)

to

$(INSTALL_DATA) lwpostgis.sql $(DESTDIR)$(datadir)/lwpostgis.sql

seems do the 'right' thing for me in all situations.


The next one seems to have been reported for RC2, but still exists in RC3.
When a "make" is issued in postgis-1.1.0-rc3, the make fails:

gcc -O2 -pipe -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-decl
arations -g -fexceptions -fPIC -DUSE_VERSION=74 -DPOSTGIS_LIB_VERSION='"1.0.
0RC3"' -DPOSTGIS_SCRIPTS_VERSION='"0.2.0"' -DPOSTGIS_BUILD_DATE='"2005-03-01
00:21:01"' -I/usr/local/include -DUSE_GEOS -I/usr/local/include -DUSE_PROJ -
I/usr/local/include -DAUTOCACHE_BBOX=1 -DUSE_STATS -fpic -I/usr/src/postgres
ql-7.4.7/contrib/postgis-1.0.0-rc3/../../src/include -D_GNU_SOURCE -c -o
wktparse.tab.o wktparse.tab.c
Plwg_parse_yy -i -f -o'lex.yy.c' wktparse.lex
make[1]: Plwg_parse_yy: Command not found
make[1]: [lex.yy.c] Error 127 (ignored)
gcc -O2 -pipe -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-decl
arations -g -fexceptions -fPIC -DUSE_VERSION=74 -DPOSTGIS_LIB_VERSION='"1.0.
0RC3"' -DPOSTGIS_SCRIPTS_VERSION='"0.2.0"' -DPOSTGIS_BUILD_DATE='"2005-03-01
00:21:01"' -I/usr/local/include -DUSE_GEOS -I/usr/local/include -DUSE_PROJ -
I/usr/local/include -DAUTOCACHE_BBOX=1 -DUSE_STATS -fpic -I/usr/src/postgres
ql-7.4.7/contrib/postgis-1.0.0-rc3/../../src/include -D_GNU_SOURCE -c -o
lex.yy.o lex.yy.c
gcc: lex.yy.c: No such file or directory
gcc: no input files
make[1]: *** [lex.yy.o] Error 1
make[1]: Leaving directory
`/usr/src/postgresql-7.4.7/contrib/postgis-1.0.0-rc3/lwgeom'
make: *** [liblwgeom] Error 2

Apparently this error is caused by $FLEX variable being incorrecly defined
in postgis-1.0.0-rc3/lwgeom/Makefile. From what I can tell, the $FLEX
variable comes from postgis-1.0.0-rc3/Makefile.config, which includes
'Makefile.global' from the directory $PGSQL_SRC (the postgreSQL source tree
root). In my $PGSQL_SRC/Makefile.global I have the line...

FLEX =

...which means the line in postgis-1.0.0-rc3/Makefile.config...

FLEX ?= flex

...keeps the definition of $FLEX from $PGSQL_SRC/Makefile.global (I assuming
that's what the ?= operator means - I'm no makefile expert)

To fix this for my specific case was trivial. But to continue leveraging the
info collected by the postgres configure script (I'm guessing this is why
$PGSQL_SRC/Makefile.global is included) perhaps it is worth replacing FLEX
?= flex with something like:
ifeq ($(strip $(FLEX)),)
    FLEX = flex
endif
Perhaps it would be also worthwhile to do the same for $YACC too.

Regards,

Rhys




More information about the postgis-devel mailing list