[postgis-devel] Re: Problems building PostGIS Head on Linux
strk at refractions.net
strk at refractions.net
Sat Dec 10 08:05:17 PST 2005
[ moved to postgis-devel ]
On Fri, Dec 09, 2005 at 11:54:41AM -0700, Charlie Savage wrote:
> I've been building PostGIS on linux (and Windows) using the autoconf
> tool chain without problems, until the 1.1CVS version (I noticed the
> problem last month and I still have it).
> When building the current head version of CVS I run into two issues.
> First, the build scripts can't find postgres.h. Second, they install
> lwgeom in the wrong place.
> * postgresql 8.1 in usr/src/postgresql-8.1
> * postgis 1.0.6 in the contrib directory as postgis-1.0.6
> * postgis 1.1 cvs in the contrib directory as postgis
> With postgis 1.0.6 I can do ./configure --enable-autoconf --with-geos
> --with-proj4 and everything works as expected. With postgis 1.1CVS this
> does not work because when I run make gcc can't find postgres.h. To make
> it work I have to run make like this:
> make CPPFLAGS='-I/usr/src/postgresql-8.1/src/include'
> Then run I run make install the libraries get installed to /usr/bin,
> instead of /usr/bin/postgresql where they should go. I tried playing
> with the config --libdir and --libexecdir to no avail.
> Output from pg_config (where I think postgis is getting its build info
> from is) is included below. Wondering if I'm doing something wrong?
Postgis 1.1 ./configure scrip wants --with-pgsql=path_tp_pg_config
or uses whatever pg_config is found in path. Last message by
./configure is a report of what have been found (or set)
showing that would help.
Beside that, postgis expects that full server headers of postgresql
are installed, as it won't look at postgresql sources anymore.
In older postgresql versions (up to 7.3?) this required an
"make install-all-headers". Probably distributions give it's
own name of the set of postgresql development files (postgresql-dev?)
What we need is the postgres.h file, try to find it.
About installation location, that is taken from pg_config --pkglibdir
which in your case (as shown below) is set to /usr/lib. If pg_config
is not broken that should not be a *bad* location for liblwgeom.so
(ie. $libdir should expand to *that* dir).
Note, finally, that you are no more forced to keep your postgis
sources under postgresql sources, actually you are not forced
to have postgresql sources around in order to build postgis 1.1.
> BINDIR = /usr/bin
> DOCDIR = /usr/doc
> INCLUDEDIR = /usr/include
> PKGINCLUDEDIR = /usr/include
> INCLUDEDIR-SERVER = /usr/include/server
> LIBDIR = /usr/lib
> PKGLIBDIR = /usr/lib
> LOCALEDIR =
> MANDIR = /usr/man
> SHAREDIR = /usr/share
> SYSCONFDIR = /usr/etc
> PGXS = /usr/lib/pgxs/src/makefiles/pgxs.mk
> CONFIGURE =
> CC = gcc
> CPPFLAGS = -D_GNU_SOURCE
> CFLAGS = -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
> -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
> CFLAGS_SL = -fpic
> LDFLAGS = -Wl,-rpath,/usr/local/pgsql/lib
> LDFLAGS_SL =
> LIBS = -lpgport -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm
> VERSION = PostgreSQL 8.1.0
> geos-devel mailing list
> geos-devel at geos.refractions.net
/"\ ASCII Ribbon Campaign
\ / Respect for low technology.
X Keep e-mail messages readable by any computer system.
/ \ Keep it ASCII.
More information about the postgis-devel