在 MacOSX 上通过构建安装 GDAL

发布于 2024-10-01 18:24:32 字数 523 浏览 3 评论 0原文

我正在尝试通过 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

筱武穆 2024-10-08 18:24:32

我已经设法解决了这个问题 - 描述如下。

只是为了记录 - 在 MacOSX 上构建 GDAL 的正确配置(出于示例目的,我已经删除了其他内容):

[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"

您需要指定 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):

[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!

傲性难收 2024-10-08 18:24:32

构建对于很多事情来说都很棒,但即使是我也倾向于将一些责任交给操作系统。

整个巨大的地理堆栈就是其中之一。 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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文