开发者

Installing GDAL via buildout on MacOSX

I'm trying to install GDAL via buildout on MacOSX. I have following config:

[gdal]
recipe = zc.recipe.cmmi
url = http://download.osgeo.org/gdal/gdal-1.7.2.tar.gz
extra_options =
    --with-geos=${geos:location}/bin/geos-config
 开发者_开发技巧   --with-static-proj4=${proj:location}
    --with-jpeg={libjpeg:location}
    --with-spatialite=${spatialite-lib:location}
    --with-sqlite=${spatialite-lib:location}

I tried many other configurations but all I've got is the following error: http://pastebin.com/s0WxfnUu

Any clues?


I've managed to resolve the problem - description below.

Just for the record - proper configuration for building GDAL on MacOSX (for example purposes I've cut off additional stuff):

[libiconv]
# ...

[gdal]
recipe = hexagonit.recipe.cmmi
url = http://download.osgeo.org/gdal/gdal-1.7.3.tar.gz
configure-options =
    --with-python
    --with-jpeg=internal
    --with-spatialite=${spatialite:location}
    CFLAGS=-I${libiconv:location}/include
    LIBS="${libiconv:location}/lib/libiconv.la ${libiconv:location}/lib/libcharset.la"

You need to specify libiconv (in my example I'm building it from source) - it will prevent charset errors.

Also my problem was in the version of jpeglib, so I've definied --with-jpeg=internal so the GDAL will use it's own libs. Depending on the error you can use --with-png=internal, --with-tiff=internal etc.

Good luck!


Buildout is great for a lot of things, but even I tend to hand over some responsibility to the OS.

The whole whopping geo stack is one of those things. Gdal, geos, libproj4, mapnik, I don't know what. Compiling everything from source is just too cumbersome, especially as you have a lot of dependencies.

In your case, it looks like there's a mismatch in some of the libraries that gdal compiles against. Wrong length of arguments.

My tip is to install gdal and friends via your OS (so: windows installer, apt-get, rpm, whatever).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜