Compiling wktraster for PostGIS

JP Glutting jpglutting at gmail.com
Fri Apr 8 23:37:44 PDT 2011


Hello All,

I am trying to compile the wktraster extension for PostGIS 1.5.2, which I
have installed through MacPorts. I also downloaded and unzipped the source
code to /opt/local/src/postgis-1.5.2/

Wktraster is an extension that provides the same geometry interface as other
PostGIS features. It has been included in the official PostGIS project as of
version 2.0, and is now called "PostGIS Raster", but I need to use it now
with PostGIS 1.5.2. See http://trac.osgeo.org/postgis/wiki/WKTRaster

>From that page, the recommended way to install PostGIS Raster is to use the
KyngKaos binaries, which is not a bad option, but I don't want to switch
back and forth between systems unless I absolutely have to, and I have
already compiled PL/R into this installation of Postgres, so I don't want to
start over and have to figure that out again.

This is what I have done. I have the source for wktraster in the
/opt/local/src/wktraster directory. I have configured the install with

./configure --with-postgis-sources=/opt/local/src/postgis-1.5.2

which works fine. I did this because I couldn't find the liblwgeom.h file
that wktraster needs anywhere on the system. "port install postgis" doesn't
seem to install this, and I can't figure out how to get it so leave the
source code on the system. This could be my big problem, and if anyone has
any general tips about compiling against the source of installed packages
with MacPorts, I would love to hear them. I haven't found anything much in
the documentation (I might have missed it).

I then run "make" on the configured wktraster source code, and I get this
error:

*make -C rt_core*
*cc -g -O2  -fno-common -DPIC  -Wall -Wmissing-prototypes
 -I/opt/local/src/postgis-1.5.2/liblwgeom -I/opt/local/include     -c -o
rt_api.o rt_api.c*
*In file included from rt_api.h:87,*
*                 from rt_api.c:33:*
*/opt/local/src/postgis-1.5.2/liblwgeom/liblwgeom.h:18:31: error:
../postgis_config.h: No such file or directory*
*make[1]: *** [rt_api.o] Error 1*
*make: *** [corelib] Error 2*

This is where I started guessing. I tried configuring and making the postgis
source code in the /opt/local/src/postgis directory, hoping that would
create a postgis_config.h file, but it complains that it can't find the
libproj files (I tried --with-projdir=/opt/locl/share/proj and
--with-projdir=/opt/local/lib and
even --with-projdir=/opt/local/var/macports/software/proj/4.7.0_0/opt/local/lib
but none of that works.

I downloaded the PROJ.4 source code, to try using that, but then it is
missing something different, and it seems like this will go on forever,
especially since I am just guessing at this point.

Any tips or suggestions welcome.

Thanks!
JP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20110409/cb136795/attachment.html>


More information about the macports-users mailing list