[postgis-users] strange compile problems

Michael Fuhr mike at fuhr.org
Wed Sep 20 21:39:55 PDT 2006


On Wed, Sep 20, 2006 at 05:03:00PM -0700, Dylan Beaudette wrote:
> cd postgresql-8.1.3
> ./configure
> make
> sudo make install

Where did this install PostgreSQL?  If you didn't set --prefix when
you ran configure then everything probably went under /usr/local/pgsql.

> gcc -march=opteron -DUSE_VERSION=81 -DPOSTGIS_LIB_VERSION='"1.1.3"' -DPOSTGIS_VERSION='"1.1 
> USE_GEOS=1 USE_PROJ=1 
> USE_STATS=1"' -DPOSTGIS_SCRIPTS_VERSION='"1.1.3"' -DPOSTGIS_BUILD_DATE='"2006-09-20 
> 23:31:02"' -I/usr/local/include -DUSE_PROJ  -I/usr/include/postgresql/8.1/server -DAUTOCACHE_BBOX=1  -DUSE_STATS -Wall -g -O2 -fPIC -fexceptions -DUSE_GEOS -I/usr/local/include     -c -o 
> liblwgeom.o liblwgeom.c
> In file included from liblwgeom.c:26:
> lwgeom_pg.h:4:22: error: postgres.h: No such file or directory
> lwgeom_pg.h:5:29: error: utils/geo_decls.h: No such file or directory
> lwgeom_pg.h:6:18: error: fmgr.h: No such file or directory

The above gcc command is looking for PostgreSQL header files in
/usr/include/postgresql/8.1/server, which probably isn't where the
earlier PostgreSQL installation put them.

>    PGSQL: /usr/bin/pg_config

This looks like the culprit.  Is /usr/bin/pg_config from a previous
installation of PostgreSQL?  Perhaps installed via a pre-built
package and nobody installed the package with the server-side header
files?  Did your most recent PostgreSQL build install a file named
/usr/local/pgsql/bin/pg_config?

-- 
Michael Fuhr



More information about the postgis-users mailing list