Reputation: 11
I'm facing a problem since a few days : I'm working on adding postGIS package on Buildroot but I'm getting the following error in the configure step :
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
With the configure command line :
./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
I tried to run configure by myself with same args, it initially showed several errors including this one but all of them disappeared after installing dependencies
postgresql-all
libxml2-dev
libgeos-dev
libproj-dev
(the only error remaining is about tests that cannot be run as I'm cross-compiling but it appears way after the libpq check, which is validated). However the libpq-fe.h issue remains when building with buildroot (postgresql v11.5 package is also installed on buildroot)
When looking at buildroot logs, I saw some commands being executed just before configure script, I tried to manually execute them before configure, the result being that it doesn't change anything except when the path is modified (adding buildroot/output/host/bin and sbin to the PATH) which makes the configure fail with the following error :
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
Not the same error as before, but similar. I'm pretty sure buildroot messes up the configure script and it doesnt look for the headers in the right place, I'm probably missing a parameter somewhere but I installed some other external packages with almost same configurations and it worked well ! I can't find out what to modify, if anyone has a suggestion on how to fix that mess, I'd be glad to try ! :) Also feel free to ask me more details (below are postgis.mk file and config.log file)
Regards, Thibault
Here is my postgis.mk file :
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)) ```
And the config.log can be found here : https://pastebin.com/NvDi4NQv
Upvotes: 1
Views: 205
Reputation: 3464
Since this question was asked, postgis has been added to upstream Buildroot, with all necessary fixes. So it is probably no longer relevant.
Upvotes: 1