xsltproc fails to load docbook.xsl (in an attempt to build the documentation)

90 views
Skip to first unread message

James Widman

unread,
Oct 1, 2024, 10:26:15 AM10/1/24
to ninja-build
Hi all,

Has anyone had any luck in building the ninja manual on macOS?

I followed the instructions from the README, namely:

./configure.py
ninja manual

...but for me the result is:

[1/1] xsltproc --nonet doc/docbook.xsl build/manual.xml > doc/manual.html
FAILED: doc/manual.html
xsltproc --nonet doc/docbook.xsl build/manual.xml > doc/manual.html
I/O error : Attempt to load network entity http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"
compilation error: file doc/docbook.xsl line 8 element import
xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
ninja: build stopped: subcommand failed.

this is with the xsltproc bundled with macOS (or with Xcode...?):

% which xsltproc
/usr/bin/xsltproc
% xsltproc --version
Using libxml 20913, libxslt 10135 and libexslt 820
xsltproc was compiled against libxml 20913, libxslt 10135 and libexslt 820
libxslt 10135 was compiled against libxml 20913
libexslt 820 was compiled against libxml 20913

...and the situation is not improved when i change $PATH to use the one from homebrew (which appears to be the current version):

% xsltproc --nonet doc/docbook.xsl build/manual.xml > doc/manual.html
I/O error : unsupported protocol: https
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"
compilation error: file doc/docbook.xsl line 8 element import
xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
% which xsltproc
/opt/homebrew/opt/libxslt/bin/xsltproc
% realpath /opt/homebrew/opt/libxslt/bin/xsltproc
/opt/homebrew/Cellar/libxslt/1.1.42/bin/xsltproc

This is on macOS Sonoma 14.6.1 (23G93) on apple silicon.

James Widman

unread,
Oct 1, 2024, 10:45:52 AM10/1/24
to ninja-build
Never mind; i just installed DocBook XSLT stylesheets with:

brew install docbook-xsl

....and now the xsltproc command works.
Reply all
Reply to author
Forward
0 new messages