FS#10913 - xmlto build fails with Attempt to load network entity error (xsltproc)

Attached to Project: Arch Linux
Opened by Bruno Widmann (bwid) - Tuesday, 15 July 2008, 00:05 GMT
Last edited by Jan de Groot (JGC) - Tuesday, 15 July 2008, 10:52 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Ronald van Haren (pressh)
Architecture All
Severity Low
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The abs build of xmlto fails to build:
for xml in xmlif.xml xmlto.xml; do \
FORMAT_DIR=./format \
/bin/bash ./xmlto -o man/man1 man ./doc/$xml ; \
done || ( RC=$?; cat ./FAQ; exit $RC )
for xml in xmlif.xml xmlto.xml; do \
FORMAT_DIR=./format \
/bin/bash ./xmlto -o man/man1 man ./doc/$xml ; \
done || ( RC=$?; cat ./FAQ; exit $RC )
I/O error : Attempt to load network entity http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
compilation error: file /tmp/xmlto-xsl.RhnXlr line 4 element import
xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl

I/O error : Attempt to load network entity http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl


On my system, the error happens when the bash script xmlto invokes xsltproc (from libxslt):
xsltproc --nonet --xinclude \
-o "/tmp/xmlto.panxbq/xmlif.proc" \
/tmp/xmlto-xsl.dNWB6G \
"/media/raid/archbuild/xmlto/src/xmlto-0.0.21/./doc/xmlif.xml"


backtrace at the point where xsltproc spits error:
#0 xmlNoNetExternalEntityLoader__internal_alias (URL=0x2268950 "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl", ID=0x0,
ctxt=0x2265e80) at xmlIO.c:3864
#1 0x0000000000401bf3 in xsltprocExternalEntityLoader (URL=0x2268950 "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl", ID=0x0,
ctxt=0x2265e80) at xsltproc.c:162
#2 0x00007fc3a1635478 in xmlLoadExternalEntity__internal_alias (URL=0x2268b80 "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl",
ID=0x0, ctxt=0x2265e80) at xmlIO.c:3824
#3 0x00007fc3a2007679 in xsltDocDefaultLoaderFunc (URI=<value optimized out>, dict=0x225e6f0, options=16398, ctxt=<value optimized out>,
type=<value optimized out>) at documents.c:85
#4 0x00007fc3a2006437 in xsltParseStylesheetImport (style=0x2268570, cur=0x22689d0) at imports.c:142
#5 0x00007fc3a1ff1c58 in xsltParseStylesheetProcess (ret=0x2268570, doc=<value optimized out>) at xslt.c:6051
#6 0x00007fc3a1ff3219 in xsltParseStylesheetImportedDoc (doc=0x22683e0, parentStyle=0x0) at xslt.c:6582
#7 0x00007fc3a1ff3285 in xsltParseStylesheetDoc (doc=0x2267ca0) at xslt.c:6619
#8 0x00000000004033a7 in main (argc=7, argv=0x7fffaa437d48) at xsltproc.c:825



I have found that removing "--nonet" from xsltproc args gets rid of the error. I think this will only work as long as you are connected to the network. I doubt this is the correct solution, but i don't know how to set up the XML catalogs correctly so that xmlto would build without patching.


--- xmlto.in.orig 2008-07-15 00:11:20.000000000 +0200
+++ xmlto.in 2008-07-15 00:11:34.000000000 +0200
@@ -178,7 +178,7 @@
export VERBOSE

# Disable network entities
-XSLTOPTS="$XSLTOPTS --nonet"
+#XSLTOPTS="$XSLTOPTS --nonet"

# The names parameter for the XSLT stylesheet
XSLTPARAMS=""




Additional info:
* package version(s)
xmlto 0.0.21
libxml2 2.6.32
libxslt 1.1.24

* config and/or log files etc.
Full makepkg output: http://rafb.net/p/pIgKDk54.html


This task depends upon

Closed by  Jan de Groot (JGC)
Tuesday, 15 July 2008, 10:52 GMT
Reason for closing:  Fixed
Comment by Jan de Groot (JGC) - Tuesday, 15 July 2008, 06:33 GMT
Is docbook-xsl installed on your system? This should be a makedependency.
Comment by Bruno Widmann (bwid) - Tuesday, 15 July 2008, 07:01 GMT
No, it was not. Just installed it, and now xmlto builds without problems.
Thanks!

Loading...