From f0422b41df9d5b638b59ffc9811f9bce135f3e35 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 31 Dec 2024 10:10:18 +0100 Subject: [PATCH] package/postgresql: workaround documentation build failure Since the bump of Postgresql to version 17.2 in commit cc77be28fc030f8583a4a7f9f724d0fc9543dba5, the build fails when host-libxml2 and host-libxslt have been built prior to Postgresql, or when xmllint and xsltproc are available on the host machine, with: I/O error : Attempt to load network entity: http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd ../doc/src/sgml/postgres.sgml:22: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" ]> ^ ../doc/src/sgml/postgres.sgml:24: element book: validity error : No declaration for attribute id of element book As this happens when building the documentation, this commit proposes to disable building the documentation. Unfortunately, passing -Ddocs=disabled -Ddocs_pdf=disabled is not sufficient, as the documentation building logic still does stuff when it detects xmllint and xsltproc, so we "poison" the detection of those tools so that they do not get used. This issue has been reported upstream as of bug #18760: https://www.postgresql.org/message-id/18760-82d1b83da31b898d%40postgresql.org Fixes: http://autobuild.buildroot.net/results/b061e6a68c885e47a254e66dbc073e2b548b8cd3/ Signed-off-by: Thomas Petazzoni [Julien: add link to bug report] Signed-off-by: Julien Olivain --- package/postgresql/postgresql.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk index 5ad3cea9e7..f4b58f58ed 100644 --- a/package/postgresql/postgresql.mk +++ b/package/postgresql/postgresql.mk @@ -14,7 +14,15 @@ POSTGRESQL_SELINUX_MODULES = postgresql POSTGRESQL_INSTALL_STAGING = YES POSTGRESQL_CONFIG_SCRIPTS = pg_config POSTGRESQL_CONF_ENV = LIBS=$(TARGET_NLS_LIBS) -POSTGRESQL_CONF_OPTS = -Drpath=false +# We have to force invalid paths for xmllint and xsltproc, otherwise +# if detected they get used, even with -Ddocs=disabled and +# -Ddocs_pdf=disabled, and it causes build failures +POSTGRESQL_CONF_OPTS = \ + -Drpath=false \ + -Ddocs=disabled \ + -Ddocs_pdf=disabled \ + -DXMLLINT=/nowhere \ + -DXSLTPROC=/nowhere POSTGRESQL_DEPENDENCIES = \ $(TARGET_NLS_DEPENDENCIES) \ host-bison \