[postgis-users] PostGIS install on postgres 8.3 running on 64bit OpenSuse10.3

58 views
Skip to first unread message

Calum Byrom

unread,
May 1, 2008, 11:27:15 AM5/1/08
to postgi...@postgis.refractions.net
Hi,

Has anyone managed to get PostGIS working on Postgres 8.3 running on OpenSuse10.3 on 64bit hardware?

I've gone through the install instructions described at:

http://liangzou.blogspot.com/2008/02/setting-up-postgresql-with-postgis-on.html

and everything works ok until I get to the point of running:

psql -d dgvbr -f lwpostgis.sql

- this then throws up the error:

BEGIN
psql:/home/cbyrom/postgis-1.3.3/lwpostgis.sql:44: NOTICE:  type "histogram2d" is not yet defined
DETAIL:  Creating a shell type definition.
psql:/home/cbyrom/postgis-1.3.3/lwpostgis.sql:44: ERROR:  incompatible library "/usr/lib64/postgresql/liblwgeom.so": versi
on mismatch
DETAIL:  Server is version 8.3, library is version 8.2.


I've downloaded and installed the latest versions of the required software:

postgresql-8.3.1
proj-4.6.0
geos-3.0.0
postgis-1.3.3

- I've also retried with postgresql 8.2 - just to check - and this works ok with the above script.  Unfortunately, I need the tsvector functionality that is provided by postgres 8.3.

I can't see where this mismatch is coming in since it appears from other distros that postgis should be ok on postgres 8.3.

Anyone have an idea what might be going on here?

Many thanks,

Calum


Facundo Garat

unread,
May 1, 2008, 1:34:08 PM5/1/08
to PostGIS Users Discussion
Calum,
 you have rpm packages on opensuse repositories

for postgis:
http://download.opensuse.org/repositories/Application:/Geo/

for postgres:
 http://download.opensuse.org/repositories/server:/database:/postgresql/


facundo.-

_______________________________________________
postgis-users mailing list
postgi...@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users




--
-----------------------------------------
Facundo Garat Mayer
fac...@garat.net

Mark Cave-Ayland

unread,
May 2, 2008, 4:34:30 AM5/2/08
to PostGIS Users Discussion


Hi Calum,

It sounds as if you have 2 PostgreSQL installations on your machine -
perhaps one installed as packages, and one compiled by hand. And it
seems the ./configure picked up the source headers for the wrong version...

ATB,

Mark.

--
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063

Calum Byrom

unread,
May 2, 2008, 6:11:36 AM5/2/08
to PostGIS Users Discussion
Hi,

Thankyou Facundo, for providing the links to the various rpms - I've used these via yast2 to upgrade everything from 8.2 to 8.3 + installed proj, geos and postgis using these.  I'm still getting the, same error when I run lwpostgis.sql - i.e.:

psql:lwpostgis.sql:44: NOTICE:  type "histogram2d" is not yet defined

DETAIL:  Creating a shell type definition.
psql:lwpostgis.sql:44: ERROR:  incompatible library "/usr/lib64/liblwgeom.so.1.3": version mismatch

DETAIL:  Server is version 8.3, library is version 8.2.

- this suggests to me that you might be right, Mark.  I'm not sure how to check, however, what postgres install has been picked up by ./configure - I can't spot anything in the output from the make file - it does display DUSEVERSION=83 which I think means its using the proper version.  Is there anything else I can check.  NB, not sure if its important but when I run the build of postgis, I get the following warnings:

lwgeom_geos_c.c: In function 'GEOS2LWGEOM':
lwgeom_geos_c.c:2994: warning: assignment discards qualifiers from pointer target type
lwgeom_geos_c.c:3003: warning: assignment discards qualifiers from pointer target type
lwgeom_geos_c.c:3013: warning: assignment discards qualifiers from pointer target type
lwgeom_geos_c.c:3014: warning: assignment discards qualifiers from pointer target type
lwgeom_geos_c.c:3018: warning: assignment discards qualifiers from pointer target type
lwgeom_geos_c.c:3019: warning: assignment discards qualifiers from pointer target type
lwgeom_geos_c.c:3040: warning: assignment discards qualifiers from pointer target type
lwgeom_geos_c.c: In function 'polygonize_garray':
lwgeom_geos_c.c:3404: warning: passing argument 1 of 'GEOSPolygonize' from incompatible pointer type
lwgeom_geos_c.c: In function 'LWGEOM_buildarea':
lwgeom_geos_c.c:3554: warning: passing argument 1 of 'GEOSPolygonize' from incompatible pointer type
lwgeom_geos_c.c:3597: warning: assignment discards qualifiers from pointer target type
lwgeom_transform.c:207: warning: initialization from incompatible pointer type
lwgeom_chip.c: In function 'CHIP_in':
lwgeom_chip.c:128: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'
shpopen.c:176: warning: 'rcsid' defined but not used
dbfopen.c:206: warning: 'rcsid' defined but not used


Thanks,

Calum.

Mark Cave-Ayland

unread,
May 2, 2008, 6:30:49 AM5/2/08
to PostGIS Users Discussion


Hi Calum,

Okay, looks like something is not quite right in your installation. For
example, above it seems like liblwgeom.so has been installed under
/usr/lib which is wrong - it should be installed in the postgresql lib
directory which is typically under /usr/lib/pgsql/lib or
/usr/lib/postgresql/lib. Did you pass in any non-standard parameters to
configure?

As a first course of action, I would try removing all liblwgeom files
from /usr/lib64 and trying to run lwpostgis.sql again.

Calum Byrom

unread,
May 2, 2008, 8:40:57 AM5/2/08
to PostGIS Users Discussion
Hi Mark,

Thanks for the quick response.  I've tried what you suggested but to no avail.  Observations whilst doing this:

i) If I install PostGIS from the unzipped source, via a ./configure, gmake, sudo gmake install, the lwpostgis.sql, etc scripts get put in /usr/share and contain unexpanded $libdir variables.  The liblwgeom files end up under /usr/lib64/postgresql

ii) If I install PostGIS via the rpm, using the YaST2 GUI, the lwpostgis.sql, etc scripts get put in /usr/share/postgis and the $libdir variable they use is expanded to /usr/lib64 (although I don't think any expansion is actually being done since the timestamp on these files is quite old - so they're just being unpacked to this dir).  The liblwgeom files here get unpacked this libdir - i.e. /usr/lib64

I've not done anything out of standard for any of the installs except for configuring the postgres install using, LDFLAGS=-lstdc++ ./configure  - as suggested in the setup guide I was following (see link in first mail).

Any other suggestions?

Thanks,

Calum.

Mark Cave-Ayland

unread,
May 2, 2008, 10:00:11 AM5/2/08
to PostGIS Users Discussion
Calum Byrom wrote:
> Hi Mark,
>
> Thanks for the quick response. I've tried what you suggested but to no
> avail. Observations whilst doing this:
>
> i) If I install PostGIS from the unzipped source, via a ./configure,
> gmake, sudo gmake install, the lwpostgis.sql, etc scripts get put in
> /usr/share and contain unexpanded $libdir variables. The liblwgeom
> files end up under /usr/lib64/postgresql
>
> ii) If I install PostGIS via the rpm, using the YaST2 GUI, the
> lwpostgis.sql, etc scripts get put in /usr/share/postgis and the $libdir
> variable they use is expanded to /usr/lib64 (although I don't think any
> expansion is actually being done since the timestamp on these files is
> quite old - so they're just being unpacked to this dir). The liblwgeom
> files here get unpacked this libdir - i.e. /usr/lib64
>
> I've not done anything out of standard for any of the installs except
> for configuring the postgres install using, LDFLAGS=-lstdc++
> ./configure - as suggested in the setup guide I was following (see link
> in first mail).
>
> Any other suggestions?
>
> Thanks,
>
> Calum.


Hi Calum,

What does the output of "pg_config" show? You should run this as the
same user you ran configure. You may also try "which pg_config" to see
from where configure is finding your PostgreSQL configuration information.

Calum Byrom

unread,
May 2, 2008, 10:26:22 AM5/2/08
to PostGIS Users Discussion
Hi,

All users that I might have used to do the install with have the same pg_config results - which are:

BINDIR = /usr/bin
DOCDIR = /usr/share/doc/packages/postgresql
INCLUDEDIR = /usr/include/pgsql
PKGINCLUDEDIR = /usr/include/pgsql
INCLUDEDIR-SERVER = /usr/include/pgsql/server
LIBDIR = /usr/lib64
PKGLIBDIR = /usr/lib64/postgresql
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/man
SHAREDIR = /usr/share/postgresql
SYSCONFDIR = /usr/etc/postgresql
PGXS = /usr/lib64/postgresql/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--prefix=/usr' '--libdir=/usr/lib64' '--bindir=/usr/bin' '--includedir=/usr/include/pgsql' '--datadir=/usr/share/postgresql' '--mandir=/usr/share/man' '--with-docdir=/usr/share/doc/packages' '--disable-rpath' '--enable-nls' '--enable-thread-safety' '--enable-integer-datetimes' '--without-python' '--without-perl' '--without-tcl' '--with-openssl' '--with-pam' '--with-krb5' '--with-gssapi' '--with-ldap' '--with-libxml' '--with-libxslt' '--with-system-tzdata=/usr/share/zoneinfo' 'CFLAGS=-fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -O2 '
CC = gcc
CPPFLAGS = -D_GNU_SOURCE -I/usr/include/libxml2
CFLAGS = -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -O2  -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
CFLAGS_SL = -fpic
LDFLAGS =
LDFLAGS_SL =
LIBS = -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lcrypt -ldl -lm
VERSION = PostgreSQL 8.3.1

- can you spot anything odd in there?

Thanks,

Calum.

Mark Cave-Ayland

unread,
May 2, 2008, 10:53:46 AM5/2/08
to PostGIS Users Discussion
Calum Byrom wrote:
> Hi,
>
> All users that I might have used to do the install with have the same
> pg_config results - which are:
>
> BINDIR = /usr/bin
> DOCDIR = /usr/share/doc/packages/postgresql
> INCLUDEDIR = /usr/include/pgsql
> PKGINCLUDEDIR = /usr/include/pgsql
> INCLUDEDIR-SERVER = /usr/include/pgsql/server
> LIBDIR = /usr/lib64
> PKGLIBDIR = /usr/lib64/postgresql
> LOCALEDIR = /usr/share/locale
> MANDIR = /usr/share/man
> SHAREDIR = /usr/share/postgresql
> SYSCONFDIR = /usr/etc/postgresql
> PGXS = /usr/lib64/postgresql/pgxs/src/makefiles/pgxs.mk <http://pgxs.mk>

> CONFIGURE = '--prefix=/usr' '--libdir=/usr/lib64' '--bindir=/usr/bin'
> '--includedir=/usr/include/pgsql' '--datadir=/usr/share/postgresql'
> '--mandir=/usr/share/man' '--with-docdir=/usr/share/doc/packages'
> '--disable-rpath' '--enable-nls' '--enable-thread-safety'
> '--enable-integer-datetimes' '--without-python' '--without-perl'
> '--without-tcl' '--with-openssl' '--with-pam' '--with-krb5'
> '--with-gssapi' '--with-ldap' '--with-libxml' '--with-libxslt'
> '--with-system-tzdata=/usr/share/zoneinfo' 'CFLAGS=-fmessage-length=0
> -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -O2 '
> CC = gcc
> CPPFLAGS = -D_GNU_SOURCE -I/usr/include/libxml2
> CFLAGS = -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
> -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
> -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
> CFLAGS_SL = -fpic
> LDFLAGS =
> LDFLAGS_SL =
> LIBS = -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz
> -lreadline -lcrypt -ldl -lm
> VERSION = PostgreSQL 8.3.1
>
> - can you spot anything odd in there?
>
> Thanks,
>
> Calum.


Hi Calum,

Apart from the strange libdir, everything looks good. The only other
thing I can think of is a mismatch between the server version and the
server headers (i.e. the postgresql-devel RPM still belongs to an older
PostgreSQL version).

What does "cat /usr/include/pgsql/pg_config.h | grep PG_VERSION" show?

Calum Byrom

unread,
May 2, 2008, 11:20:03 AM5/2/08
to PostGIS Users Discussion
Hi,

This returns:

#define PG_VERSION "8.3.1"
#define PG_VERSION_NUM 80301
#define PG_VERSION_STR "PostgreSQL 8.3.1 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.2.1 (SUSE Linux)"

- which looks ok to me....

Mark Cave-Ayland

unread,
May 2, 2008, 11:29:47 AM5/2/08
to PostGIS Users Discussion
Calum Byrom wrote:
> Hi,
>
> This returns:
>
> #define PG_VERSION "8.3.1"
> #define PG_VERSION_NUM 80301
> #define PG_VERSION_STR "PostgreSQL 8.3.1 on x86_64-unknown-linux-gnu,
> compiled by GCC gcc (GCC) 4.2.1 (SUSE Linux)"
>
> - which looks ok to me....

Okay. In that case all should be fine... *scratches head*... I would
advise renaming your existing your PostGIS build source directory,
re-extracting from the source tarball and then re-running configure/make
install to make sure that you have a completely vanilla build. You
should also make sure that any PostGIS RPMs have been completely
uninstalled before you do this.

Reply all
Reply to author
Forward
0 new messages