Skip to contentSkip to conversation

package/postgresql: workaround documentation build failure

PATCH Applied Thomas Petazzoni via buildroot 3 participants 3 messages Dec 31, 2024 – Jan 2, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 <book id="postgres">

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.

Fixes:

http://autobuild.buildroot.net/results/b061e6a68c885e47a254e66dbc073e2b548b8cd3/

---
 package/postgresql/postgresql.mk | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
package/postgresql/postgresql.mk +9 -1
index 5ad3cea9e7..f4b58f58ed 100644
@@ -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 \
Signature · 6 lines
2.47.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hi Thomas,

Quoted 19 lines · Thomas Petazzoni via buildroot

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 <book id="postgres">

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.

Quoted 8 lines

This issue has been reported upstream as of bug #18760.

Fixes:

http://autobuild.buildroot.net/results/b061e6a68c885e47a254e66dbc073e2b548b8cd3/

I applied to master, thanks.

For info, I added the link of your bug report. This message was published after your bug patch submission. See:
https://www.postgresql.org/message-id/18760-82d1b83da31b898d%40postgresql.org

Best regards,

Julien.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

Reviewed-by on v1 1/1
#2 lore raw
In reply to Thomas Petazzoni via buildroot
Quoted 19 lines · Thomas Petazzoni

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 <book id="postgres">

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.

Quoted 7 lines

This issue has been reported upstream as of bug #18760.

Fixes:

   http://autobuild.buildroot.net/results/b061e6a68c885e47a254e66dbc073e2b548b8cd3/

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot