在 MacOSX 上通过构建安装 GDAL
我正在尝试通过 MacOSX 上的构建安装 GDAL。我有以下配置:
[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}
我尝试了许多其他配置,但我得到的只是以下错误: http://pastebin.com/s0WxfnUu
有任何线索吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我已经设法解决了这个问题 - 描述如下。
只是为了记录 - 在 MacOSX 上构建 GDAL 的正确配置(出于示例目的,我已经删除了其他内容):
您需要指定 libiconv (在我的示例中,我从源代码构建它) - 它将防止字符集错误。
另外我的问题出在 jpeglib 的版本上,所以我定义了
--with-jpeg=internal
这样 GDAL 将使用它自己的库。根据错误,您可以使用--with-png=internal
、--with-tiff=internal
等。祝你好运!
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):
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!
构建对于很多事情来说都很棒,但即使是我也倾向于将一些责任交给操作系统。
整个巨大的地理堆栈就是其中之一。 Gdal、geos、libproj4、mapnik,我不知道是什么。从源代码编译所有内容都太麻烦了,尤其是当您有很多依赖项时。
就您而言, gdal 编译的某些库似乎不匹配。参数长度错误。
我的建议是通过您的操作系统安装 gdal 和朋友(例如:windows 安装程序、apt-get、rpm,等等)。
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).