[postgis-users] Compile errors with the latest SVN

Bruce Rindahl rindahl at lrcwe.com
Mon Sep 11 08:36:10 PDT 2006


I changed the location of the line you suggested but it had no effect.

In my /usr/local/include there are the following headers:
freetype2   geos      nad_list.h               projects.h  zlib.h
ft2build.h  geos.h    org_proj4_Projections.h  regex.h
gd.h        geos_c.h  proj_api.h               zconf.h

In the /usr/local/pgsql/include I have all the PostgreSQL headers:

ecpg_informix.h  internal            pg_config_os.h      pgtypes_timestamp.h
ecpgerrno.h      libpq               pgtypes_date.h      postgres_ext.h
ecpglib.h        libpq-fe.h          pgtypes_error.h     server
ecpgtype.h       pg_config.h         pgtypes_interval.h  sql3types.h
informix         pg_config_manual.h  pgtypes_numeric.h   sqlca.h

The pg_config.h gives the following versions of PostgreSQL:

/* Define to the full name of this package. */
#define PACKAGE_NAME "PostgreSQL"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "PostgreSQL 8.2devel"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "postgresql"

/* Define to the version of this package. */
#define PACKAGE_VERSION "8.2devel"

/* Define to the name of the default PostgreSQL service principal in
Kerberos.
   (--with-krb-srvnam=NAME) */
#define PG_KRB_SRVNAM "postgres"

/* PostgreSQL version as a string */
#define PG_VERSION "8.2devel"

/* PostgreSQL version as a number */
#define PG_VERSION_NUM 80200

/* A string containing the version number, platform, and C compiler */
#define PG_VERSION_STR "PostgreSQL 8.2devel on i686-pc-mingw32, compiled by
GCC gcc.exe (GCC) 3.4.4 (mingw special)"



Let me know if you need anymore information.
Thanks!
Bruce


-----Original Message-----
From: Michael Fuhr [mailto:mike at fuhr.org] 
Sent: Sunday, September 10, 2006 9:00 PM
To: Bruce Rindahl
Cc: postgis-users at postgis.refractions.net
Subject: Re: [postgis-users] Compile errors with the latest SVN

[Please copy the mailing list on replies so others can contribute
to and learn from the discussion.]

On Sun, Sep 10, 2006 at 07:18:24PM -0600, Bruce Rindahl wrote:
> I have an operating install of PostgreSQL that is version 8.1.4.  For
> testing, I have a CVS version to compile.  The path variables point to the
> CVS version.  From the MINGW window the result of pg_config --version is:
> PostgreSQL 8.2devel

Your compile command was:

> gcc -DUSE_VERSION=82 -DPOSTGIS_LIB_VERSION='"1.1.4CVS"'
> -DPOSTGIS_VERSION='"1.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1"'
> -DPOSTGIS_SCRIPTS_VERSION='"1.1.4CVS"' -DPOSTGIS_BUILD_DATE='"2006-09-09
> 18:17:30"' -I/usr/local/include -DUSE_PROJ
> -IC:/msys/1.0/local/pgsql/include/server
> -IC:/msys/1.0/local/pgsql/include/server/port/win32 -DAUTOCACHE_BBOX=1
> -DUSE_STATS -Wall -g -O2 -fPIC -fexceptions -DUSE_GEOS
-I/usr/local/include
> -c -o lwgeom_gist.o lwgeom_gist.c

I'm guessing that the 8.1.4 headers are under /usr/local/include
and the 8.2devel headers are under C:/msys/1.0/local/pgsql/include.
Is that right?  If so then the order of the -I options is causing
the build to find the 8.1.4 headers first, which results in errors
because USE_VERSION=82 tells the code to expect 8.2devel headers.
Try editing lwgeom/Makefile and moving the following line (line 69
or thereabouts) up a few lines to above the PROJ section:

override CFLAGS += $(PGBEINCLUDES) -DAUTOCACHE_BBOX=$(AUTOCACHE_BBOX)

Putting that line earlier should cause the 8.2devel headers to be
found first.

-- 
Michael Fuhr






More information about the postgis-users mailing list