[postgis-devel] PostgreSQL 7.5 and PostGIS 0.8.1 or cvs
Craig Miller
craig.miller at spatialminds.com
Fri May 7 15:59:27 PDT 2004
I am getting closer. I am only having linker errors now.
In case anyone else wants to know what I did.
After getting the latest from CVS I first applied the changes to the
Makefile and postgis.h that others have already described.
I then tried to compile and received an error about using index and rindex
in postgis_inout.c. It turns out that these are non-ANSI versions of strchr
and strrchr respectivley. msvcrt.dll exports only the ANSI names, so I
changed the references to the non-ANSI names to strchr and strrchr
respectively. E.g. they now read:
first_paren= strchr (str,'(');
last_paren = strrchr(str,')');
So now I am left with the following linker errors. To be frank, I have not
used Make, autoconf, automake, etc in many years (too much Visual C++ and
Java lateley) so I am having trouble figuring out how to correct this
"correctly". If anyone has info on the correct way to fix this, that would
be appreciated. If not, I have my GNU Autoconf, automak, and libtool book
cracked open and should be able to get it figured out before too long.
Here is the link error I still have left.
dlltool --export-all --output-def postgis.def postgis_debug.o postgis_ops.o
postgis_fn.o postgis_inout.o postgis_proj.o postgis_chip.o
postgis_transform.o postgis_gist_72.o postgis_estimate.o postgis_geos.o
postgis_algo.o
dllwrap -o libpostgis.dll --dllname libpostgis.dll --def postgis.def
postgis_debug.o postgis_ops.o postgis_fn.o postgis_inout.o postgis_proj.o
postgis_chip.o postgis_transform.o postgis_gist_72.o postgis_estimate.o
postgis_geos.o
postgis_algo.o -L../../src/port -L../../src/port -L../../src/backend -lpost
gres
Info: resolving _default_statistics_target by linking to
__imp__default_statistics_target (auto-import)
fu000001.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
nmth000000.o(.idata$4+0x0): undefined reference to
`_nm__default_statistics_target'
c:\mingw\bin\dllwrap.exe: c:\mingw\bin\gcc exited with status 1
make: *** [libpostgis.a] Error 1
--Craig
-----Original Message-----
From: strk [mailto:strk at keybit.net]
Sent: Friday, May 07, 2004 3:51 AM
To: Craig Miller
Cc: postgis-devel at postgis.refractions.net
Subject: Re: [postgis-devel] PostgreSQL 7.5 and PostGIS 0.8.1 or cvs
On Thu, May 06, 2004 at 02:10:52PM -0700, Craig Miller wrote:
> Hi,
>
> I am trying to compile the unsupported combination of PostgreSQL 7.5
> (snapshot) and PostGIS 0.8.1 (or CVS). I know this question has come up
> before, but has anyone looked at the problem with the call to
> canonicalize_qual and determined how the call should be made to the
version
> of this method included in pgsql 7.5?
>
> The code:
> /*
> * If the index is partial, AND the index predicate with the
> * explicitly given indexquals to produce a more accurate idea of
> the
> * index restriction. This may produce redundant clauses, which
we
> * hope that cnfify and clauselist_selectivity will deal with
> * intelligently.
> *
> * Note that index->indpred and indexQuals are both in
implicit-AND
> form
> * to start with, which we have to make explicit to hand to
> * canonicalize_qual, and then we get back implicit-AND form
again.
> */
> if (index->indpred != NIL)
> {
> Expr *andedQuals;
>
> andedQuals =
> make_ands_explicit(nconc(listCopy(index->indpred),
>
> indexQuals));
> selectivityQuals = canonicalize_qual(andedQuals, true);
> }
>
>
> The error:
>
>
gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-declaratio
>
ns -g -fexceptions -I. -DFRONTEND -DSYSCONFDIR='"/pgSpatial/etc/postgresql
>
"' -DUSE_VERSION=74 -I../../src/include -I./src/include/port/win32 -DEXEC_
> BACKEND "-I../../src/include/port/win32" -c -o postgis_estimate.o
> postgis_estimate.c
>
> postgis_estimate.c: In function `genericcostestimate2':
> postgis_estimate.c:751: too many arguments to function `canonicalize_qual'
> postgis_estimate.c:751: warning: assignment from incompatible pointer type
> make: *** [postgis_estimate.o] Error 1
You are compiling against pg74, not 75 (-DUSE_VERSION=74).
To detect pgsql version, postgis Makefile goes:
ifneq ($(findstring 7.4,$(VERSION)),)
USE_VERSION=74
else
USE_VERSION=75
endif
What does your postgres snapshot's global Makefile use as $(VERSION) ?
--strk;
>
> Thanks for the help,
> --Craig
>
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
More information about the postgis-devel
mailing list