[postgis-devel] RC3 build/install script bugs

Rhys Ickeringill rhysi at omnilink.com.au
Tue Mar 1 15:49:18 PST 2005


----- Original Message ----- 
From: <strk at refractions.net>
To: <postgis-devel at postgis.refractions.net>
Sent: Tuesday, March 01, 2005 7:30 PM
Subject: Re: [postgis-devel] RC3 build/install script bugs


> Thanks Rhys, I've fixed the lwpostgis.sql install rule
> and the FLEX/YACC settings.
>
> With the FLEX/YACC patch tough, you can't redefine them using
> environemnt variables. The question is: why doesn't PGSQL define
> them ?

Perhaps instead of replacing FLEX ?= flex with the ifeq( $(strip.....) why
not use one after the other?

To answer your question - in my case PGSQL didn't find flex, and hence
didn't define the variable.

>From PGSQL's configure script:
*** Without Flex you will not be able to build PostgreSQL from CVS or
*** change any of the scanner definition files. You can obtain Flex from
*** a GNU mirror site. (If you are using the official distribution of
*** PostgreSQL then you do not need to worry about this because the Flex
*** output is pre-generated.)

Hence my build went ahead anyway because I was using the official
distribution.

> --strk;
>

 - Rhys

> On Tue, Mar 01, 2005 at 12:03:38PM +1100, Rhys Ickeringill wrote:
> > 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
> >
> > _______________________________________________
> > postgis-devel mailing list
> > postgis-devel at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-devel
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
>




More information about the postgis-devel mailing list