1

几天以来我遇到了一个问题:我正在努力在 Buildroot 上添加 postGIS 包,但在配置步骤中出现以下错误:

checking libpq-fe.h usability... no
checking libpq-fe.h presence... no
checking for libpq-fe.h... no
configure: error: could not find libpq-fe.h

使用配置命令行:

./configure --target=arm-buildroot-linux-gnueabi --host=arm-buildroot-linux-gnueabi --build=x86_64-pc-linux-gnu --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --localstatedir=/var --program-prefix="" --disable-gtk-doc --disable-gtk-doc-html --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no --disable-dependency-tracking --enable-ipv6 --disable-nls --disable-static --enable-shared  --prefix=/usr/bin

我尝试使用相同的参数自己运行配置,它最初显示了几个错误,包括这个错误,但在安装依赖项后所有错误都消失了

  • postgresql-全部

  • libxml2-dev

  • libgeos开发

  • libproj-开发

(剩下的唯一错误是关于在我进行交叉编译时无法运行的测试,但它出现在经过验证的 libpq 检查之后)。但是,使用 buildroot 构建时 libpq-fe.h 问题仍然存在(postgresql v11.5 软件包也安装在 buildroot 上)

查看 buildroot 日志时,我看到在配置脚本之前正在执行一些命令,我​​尝试在配置之前手动执行它们,结果是它不会改变任何东西,除非修改路径(添加 buildroot/output/host/ bin 和 sbin 到 PATH),这使得配置失败并出现以下错误:

checking for xml2-config... /usr/bin/xml2-config
checking libxml/tree.h usability... no
checking libxml/tree.h presence... no
checking for libxml/tree.h... no
configure: error: could not find headers include related to libxml2


与以前的错误不同,但相似。我很确定 buildroot 弄乱了配置脚本,它没有在正确的位置寻找标题,我可能在某处丢失了一个参数,但我安装了一些其他配置几乎相同的外部包,它运行良好!我找不到要修改的内容,如果有人对如何解决这个烂摊子有任何建议,我很乐意尝试!:) 也可以随时问我更多细节(下面是 postgis.mk 文件和 config.log 文件)

问候, 蒂博

这是我的 postgis.mk 文件:

POSTGIS_VERSION = 3.0.1
POSTGIS_SOURCE = postgis-$(POSTGIS_VERSION).tar.gz
POSTGIS_SITE = http://download.osgeo.org/postgis/source
POSTGIS_LICENSE = MIT
POSTGIS_LICENSE_FILES = COPYING
POSTGIS_INSTALL_STAGING = YES
POSTGIS_CFLAGS = $(TARGET_CFLAGS)
POSTGIS_CONF_OPTS = --prefix=/usr/bin 
POSTGIS_CONF_ENV = CFLAGS="$(POSTGIS_CFLAGS)"
POSTGIS_DEPENDENCIES = proj geos postgresql
$(eval $(autotools-package)) ```

config.log 可以在这里找到:https ://pastebin.com/NvDi4NQv

4

1 回答 1

0

自从提出这个问题以来,postgis 已添加到上游 Buildroot 中,并进行了所有必要的修复。所以它可能不再相关。

于 2021-08-29T19:28:12.467 回答