MacOS 10.12上PostGIS 2.4.4的构建问题

MacOS 10.12上PostGIS 2.4.4的构建问题,postgis,macports,Postgis,Macports,我正在尝试在MacOS 10.12上构建PostGIS 2.4.4,并为各种库使用MacPorts。生成当前失败(链接shp2pgsql时): 一些研究表明MacPorts安装的libiconv存在一个问题,应该使用系统库,但我没有成功地使用libiconv前缀和libiconv指向/usr中的系统库。有人成功地做到了吗?我在尝试配置选项时不够勤奋;将其设置为显式使用已安装的MacPorts libconv有效: ./configure --with-libiconv-prefix=/opt/l

我正在尝试在MacOS 10.12上构建PostGIS 2.4.4,并为各种库使用MacPorts。生成当前失败(链接shp2pgsql时):


一些研究表明MacPorts安装的libiconv存在一个问题,应该使用系统库,但我没有成功地使用libiconv前缀和libiconv指向/usr中的系统库。有人成功地做到了吗?

我在尝试配置选项时不够勤奋;将其设置为显式使用已安装的MacPorts libconv有效:

./configure --with-libiconv-prefix=/opt/local --with-libiconv=/opt/local

你知道MacPorts提供了一个postgis版本的端口吗

$ port info postgis2
postgis2 @2.4.4 (databases, gis)
Variants:             comments, gui, [+]postgresql10, postgresql93, postgresql94, postgresql95, postgresql96, proj4, [+]raster, sfcgal, [+]topology, universal

Description:          PostGIS 2 adds geometrical, geographical and topological types, and functions operating thereon, to the PostGreSQL database.     The 2.0 release also provides raster handling and basic 3D geometry capacities
                      (TIN and polyhedra).
Homepage:             http://postgis.refractions.net/

Build Dependencies:   autoconf, automake, libtool, libxslt
Library Dependencies: geos, proj, libiconv, libxml2, json-c, postgresql10, gdal
Conflicts with:       postgis
Platforms:            darwin
License:              GPL-2+
Maintainers:          Email: vince@macports.org
                      Policy: openmaintainer

如果标头和库不匹配,则会出现此问题。例如,使用
/usr/include
中的iconv头进行编译,但与
/opt/local/lib
中的iconv库进行链接将导致此问题

这是因为MacPorts安装的iconv头包含一个
#define iconv libiconv
,这是库提供的符号。顺便说一句,MacPorts不决定发布此定义;这是上游违约

$ port info postgis2
postgis2 @2.4.4 (databases, gis)
Variants:             comments, gui, [+]postgresql10, postgresql93, postgresql94, postgresql95, postgresql96, proj4, [+]raster, sfcgal, [+]topology, universal

Description:          PostGIS 2 adds geometrical, geographical and topological types, and functions operating thereon, to the PostGreSQL database.     The 2.0 release also provides raster handling and basic 3D geometry capacities
                      (TIN and polyhedra).
Homepage:             http://postgis.refractions.net/

Build Dependencies:   autoconf, automake, libtool, libxslt
Library Dependencies: geos, proj, libiconv, libxml2, json-c, postgresql10, gdal
Conflicts with:       postgis
Platforms:            darwin
License:              GPL-2+
Maintainers:          Email: vince@macports.org
                      Policy: openmaintainer