[postgis-devel] building wktraster

Jeff Hamann jeff.hamann at forestinformatics.com
Mon Jul 12 14:07:03 PDT 2010


As part of an update process, I've been building PostgreSQL(8.4.4)+PostGIS(1.5.1)+WKTRaster(0.1.6d). 

I've built and tested the first two.

When I try to build WKTRaster:

$ ./configure  \
 CC="gcc -arch i386" \
 CXX="g++ -arch i386" \
 OBJC="gcc -arch i386" \
 F77="gfortran -arch i386" \
 FC="gfortran -arch i386" \
 --with-postgis-sources=/Users/hamannj/Documents/rufus/postgresql-8.4.4/contrib/postgis-1.5.1

which get's me to here:

Version: 0.1.6d
Build date: 2010-07-12 20:37:11

Run make to build WKT Raster extension

Jeff-Hamanns-MacBook-Pro:wktraster-0.1.6d hamannj$ make

and yields:

Jeff-Hamanns-MacBook-Pro:wktraster-0.1.6d hamannj$ make
make -C rt_core
cc -g -O2  -fno-common -DPIC   -I/Users/hamannj/Documents/rufus/postgresql-8.4.4/contrib/postgis-1.5.1/liblwgeom -I/usr/local/include     -c -o rt_api.o rt_api.c
ar rs librtcore.a rt_api.o 
ar: creating archive librtcore.a
make -C rt_pg
gcc -arch i386 -O1 -g3 -no-cpp-precomp -O1 -g3 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -g  -bundle -multiply_defined suppress  rt_pg.o -bundle_loader /usr/local/pgsql/bin/postgres -L/usr/local/lib -L/usr/local/pgsql/lib ../rt_core/librtcore.a /Users/hamannj/Documents/rufus/postgresql-8.4.4/contrib/postgis-1.5.1/liblwgeom/liblwgeom.a -lgdal  -o rtpostgis.so
ld: warning: in ../rt_core/librtcore.a, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols:
  "_rt_raster_get_srid", referenced from:
      _RASTER_getSRID in rt_pg.o
  "_rt_band_get_pixel", referenced from:
      _RASTER_getPixelValue in rt_pg.o
  "_rt_raster_get_num_bands", referenced from:
      _RASTER_getNumBands in rt_pg.o
  "_rt_band_get_nodata", referenced from:
      _RASTER_getBandNoDataValue in rt_pg.o
  "_rt_raster_get_pixel_height", referenced from:
      _RASTER_getYPixelSize in rt_pg.o
  "_rt_raster_deserialize", referenced from:
      _RASTER_getPixelValue in rt_pg.o
      _RASTER_setBandNoDataValue in rt_pg.o
      _RASTER_getBandNoDataValue in rt_pg.o
      _RASTER_setBandHasNoDataValue in rt_pg.o
      _RASTER_getBandHasNoDataValue in rt_pg.o
      _RASTER_getBandPixelType in rt_pg.o
      _RASTER_setUpperLeftXY in rt_pg.o
      _RASTER_getYUpperLeft in rt_pg.o
      _RASTER_getXUpperLeft in rt_pg.o
      _RASTER_setSkewXY in rt_pg.o
      _RASTER_setSkew in rt_pg.o
      _RASTER_getYSkew in rt_pg.o
      _RASTER_getXSkew in rt_pg.o
      _RASTER_setPixelSizeXY in rt_pg.o
      _RASTER_setPixelSize in rt_pg.o
      _RASTER_getYPixelSize in rt_pg.o
      _RASTER_getXPixelSize in rt_pg.o
      _RASTER_getNumBands in rt_pg.o
      _RASTER_getHeight in rt_pg.o
      _RASTER_getWidth in rt_pg.o
      _RASTER_setSRID in rt_pg.o
      _RASTER_getSRID in rt_pg.o
      _RASTER_convex_hull in rt_pg.o
      _RASTER_to_bytea in rt_pg.o
      _RASTER_out in rt_pg.o
      _RASTER_dumpAsWKTPolygons in rt_pg.o
      _RASTER_to_binary in rt_pg.o
      _RASTER_getBandPath in rt_pg.o
      _RASTER_getBandPixelTypeName in rt_pg.o
  "_rt_context_set_message_handlers", referenced from:
      _get_rt_context in rt_pg.o
      _RASTER_dumpAsWKTPolygons in rt_pg.o
  "_rt_band_get_hasnodata_flag", referenced from:
      _RASTER_getBandHasNoDataValue in rt_pg.o
  "_rt_raster_set_pixel_sizes", referenced from:
      _RASTER_setPixelSizeXY in rt_pg.o
      _RASTER_setPixelSize in rt_pg.o
      _RASTER_makeEmpty in rt_pg.o
  "_rt_raster_from_hexwkb", referenced from:
      _RASTER_in in rt_pg.o
  "_rt_raster_get_width", referenced from:
      _RASTER_getWidth in rt_pg.o
  "_rt_band_set_hasnodata_flag", referenced from:
      _RASTER_setBandHasNoDataValue in rt_pg.o
  "_rt_raster_set_offsets", referenced from:
      _RASTER_setUpperLeftXY in rt_pg.o
      _RASTER_makeEmpty in rt_pg.o
  "_rt_raster_get_band", referenced from:
      _RASTER_getPixelValue in rt_pg.o
      _RASTER_setBandNoDataValue in rt_pg.o
      _RASTER_getBandNoDataValue in rt_pg.o
      _RASTER_setBandHasNoDataValue in rt_pg.o
      _RASTER_getBandHasNoDataValue in rt_pg.o
      _RASTER_getBandPixelType in rt_pg.o
      _RASTER_getBandPath in rt_pg.o
      _RASTER_getBandPixelTypeName in rt_pg.o
  "_rt_raster_get_y_offset", referenced from:
      _RASTER_getYUpperLeft in rt_pg.o
  "_rt_raster_to_hexwkb", referenced from:
      _RASTER_out in rt_pg.o
  "_rt_raster_get_pixel_width", referenced from:
      _RASTER_getXPixelSize in rt_pg.o
  "_rt_raster_dump_as_wktpolygons", referenced from:
      _RASTER_dumpAsWKTPolygons in rt_pg.o
  "_rt_raster_get_x_skew", referenced from:
      _RASTER_getXSkew in rt_pg.o
  "_rt_band_get_ext_path", referenced from:
      _RASTER_getBandPath in rt_pg.o
  "_rt_raster_serialize", referenced from:
      _RASTER_setBandNoDataValue in rt_pg.o
      _RASTER_setBandHasNoDataValue in rt_pg.o
      _RASTER_setUpperLeftXY in rt_pg.o
      _RASTER_setSkewXY in rt_pg.o
      _RASTER_setSkew in rt_pg.o
      _RASTER_setPixelSizeXY in rt_pg.o
      _RASTER_setPixelSize in rt_pg.o
      _RASTER_setSRID in rt_pg.o
      _RASTER_makeEmpty in rt_pg.o
      _RASTER_in in rt_pg.o
  "_rt_raster_get_y_skew", referenced from:
      _RASTER_getYSkew in rt_pg.o
  "_rt_raster_set_srid", referenced from:
      _RASTER_setSRID in rt_pg.o
      _RASTER_makeEmpty in rt_pg.o
  "_rt_raster_new", referenced from:
      _RASTER_makeEmpty in rt_pg.o
  "_rt_context_new", referenced from:
      _get_rt_context in rt_pg.o
      _RASTER_dumpAsWKTPolygons in rt_pg.o
  "_rt_band_set_nodata", referenced from:
      _RASTER_setBandNoDataValue in rt_pg.o
  "_rt_raster_get_height", referenced from:
      _RASTER_getHeight in rt_pg.o
  "_rt_raster_set_skews", referenced from:
      _RASTER_setSkewXY in rt_pg.o
      _RASTER_setSkew in rt_pg.o
      _RASTER_makeEmpty in rt_pg.o
  "_rt_raster_get_convex_hull", referenced from:
      _RASTER_convex_hull in rt_pg.o
  "_rt_raster_to_wkb", referenced from:
      _RASTER_to_bytea in rt_pg.o
      _RASTER_to_binary in rt_pg.o
  "_rt_raster_get_x_offset", referenced from:
      _RASTER_getXUpperLeft in rt_pg.o
  "_rt_band_get_pixtype", referenced from:
      _RASTER_getBandPixelType in rt_pg.o
      _RASTER_getBandPixelTypeName in rt_pg.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [rtpostgis.so] Error 1
make: *** [pglib] Error 2
Jeff-Hamanns-MacBook-Pro:wktraster-0.1.6d hamannj$ 

Which for a wide variety of reasons, I have to build lots of stuff with those ./configure switches, so I'm stuck with them. 

I manually added the "-arch i386" to the rt_core Makefile, 

CFLAGS=-g -O2 -arch i386 -fno-common -DPIC   $(LIBLWGEOM_CFLAGS) $(LIBGDAL_CFLAGS) $(ENABLE_DEVELOPMENT_CFLAGS) 

and it's now builds, installs, everybody's happy. 

test1=# select PostGIS_Raster_Lib_Version();
 postgis_raster_lib_version 
----------------------------
 0.1.6d
(1 row)

test1=# 

I'm guessing the ./configure arguments aren't being sent to the subdirectory? 

I have no idea how to make that fix that except for manually editing the Makefile, which I did. 

Can I put  a request in, to have ./configure switches pass down to the subdirectories, please?

Thanks, 
Jeff.



Jeff Hamann, PhD
PO Box 1421
Corvallis, Oregon 97339-1421
541-754-2457
jeff.hamann[at]forestinformatics[dot]com
http://www.forestinformatics.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20100712/0ec78c35/attachment.html>


More information about the postgis-devel mailing list