[Mapserver-users] PostGIS on W2000 trouble

paolopulli paolopulli at libero.it
Thu Jun 19 11:54:45 EDT 2003


On Windows2000 - Cygwin - Postgres:
Postgis doesn't work.
Where I wrong?

Cygwin setup.exe v2.340.2.5

cygipc-1.14-1.tar.bz2

$ cd /usr/src/postgresql-7.3.3-1/
$ ./configure
$ make
$ make install

Work fine. I able to connect via phpPgAdmin, too.

Patch
/usr/src/postgresql-7.3.3-1/src/include/optimizer/cost.h
as 
http://archives.postgresql.org/pgsql-ports/2003-03/msg00017.php

$ cd /usr/src/postgresql-7.3.3-1/contrib/
$ tar zxvf postgis-0.7.5.tar.gz
$ cd ..

$ ./configure --enable-multibyte --with-CXX
--prefix=/usr --sysconfdir=/etc
--docdir=/usr/doc/postgresql-$version > /configure_postGIS.txt 2>&1
$ make > make_postgres+GIS.txt 2>&1

$ cd usr/src/postgresql-7.3.3-1/contrib/postgis-0.7.4
(cd usr/src/postgresql-7.3.3-1/contrib/postgis-0.7.5 as same)
$ make > make_postGIS.txt 2>&1
....
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations  -g -I. -I../../src/include  -DFRONTEND -DSYSCONFDIR='"/etc/postgresql"' -DUSE_VERSION=73  -c -o postgis_transform.o postgis_transform.c
postgis_transform.c: In function `transform_geom':
postgis_transform.c:437: warning: control reaches end of non-void function
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations  -g -I. -I../../src/include  -DFRONTEND -DSYSCONFDIR='"/etc/postgresql"' -DUSE_VERSION=73  -c -o postgis_gist_72.o postgis_gist_72.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations  -g -I. -I../../src/include  -DFRONTEND -DSYSCONFDIR='"/etc/postgresql"' -DUSE_VERSION=73  -c -o postgis_estimate.o postgis_estimate.c
In file included from postgis_estimate.c:58:
../../src/include/optimizer/cost.h:39: syntax error before "double"
make: *** [postgis_estimate.o] Error 1



-----
Other prodedure

I patch cost.h and 
/usr/src/postgresql-7.3.3-1/src/makefiles/Makefile.win 
/usr/src/postgresql-7.3.3-1/src/template/win
as
http://archives.postgresql.org/pgsql-hackers/2003-02/msg00979.php

then
$ LDFLAGS=-L/usr/local/lib ./configure --enable-multibyte
--with-CXX --with-perl --prefix=/usr --sysconfdir=/etc
--docdir=/usr/doc/postgresql-$version
make
-OK-

$ cd /contrib/postgis-0.7.4
$ make

gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations  -g -I. -I../../src/in
clude  -DFRONTEND -DSYSCONFDIR='"/etc/postgresql"' -DUSE_VERSION=73  -c -o postg
is_estimate.o postgis_estimate.c
In file included from postgis_estimate.c:58:
../../src/include/optimizer/cost.h:38: syntax error before "double"
make: *** [postgis_estimate.o] Error 1



************************************************************
************************************************************
************************************************************

If I try to use cygPostGIS_731.tar.gz with postgres7.3x
Where
/usr/bin/shp2pgsql.exe - pgsql2shp.exe
/usr/bin/postgis.dll - libpostgis.a
/usr/share/postgres/contrib/postgis.sql - ....
and postgis.sql I substitute '$libdir/postgis.dll' with absolute path

$ psql -test -f postgis.sql > /logfile 2>&1

BEGIN
        message         
------------------------
 PL/PgSQL is installed.
(1 row)

psql:/usr/share/postgresql/contrib/postgis.sql:19: NOTICE:  ProcedureCreate: type histogram2d is not yet defined
psql:/usr/share/postgresql/contrib/postgis.sql:19: ERROR:  Load of file c:/cygwin/usr/lib/postgis.dll failed: dlopen: Win32 error 126
psql:/usr/share/postgresql/contrib/postgis.sql:24: ERROR:  current transaction is aborted, queries ignored until end of transaction block
...
psql:/usr/share/postgresql/contrib/postgis.sql:1134: ERROR:  current transaction is aborted, queries ignored until end of transaction block
COMMIT


***************************************************


I try also to confiure & install postgres-7.2.3 in order to use cygPostGIS_731.tar.gz, but:
$ /usr/src/postgresql-7.2.3/./configure

loading cache ./config.cache
checking host system type... i686-pc-cygwin
checking which template to use... win
checking whether to build with locale support... no
checking whether to build with recode support... no
checking whether to build with multibyte character support... no
checking whether NLS is wanted... no
checking for default port number... 5432
checking for default soft limit on number of connections... 32
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
using CFLAGS=-O2
checking whether the C compiler (gcc -O2 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.


************************************************************
************************************************************
Any help will appreciate.

Paolo






More information about the mapserver-users mailing list