# Building docbook html from Mac

**URL:** <https://igraph.discourse.group/t/building-docbook-html-from-mac/1089>\
**Category:** Development\
**Created:** [29 January 2022 10:45 UTC](https://igraph.discourse.group/t/building-docbook-html-from-mac/1089 "2022-01-29T10:45:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GroteGnoom](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/grotegnoom/32/428_2.png) [@GroteGnoom](https://igraph.discourse.group/u/GroteGnoom)\
**Post date:** [29 January 2022 10:45 UTC](https://igraph.discourse.group/t/building-docbook-html-from-mac/1089/1 "2022-01-29T10:45:35Z")

</div>

When I try `cmake --build . --target html`

I get these kind of errors:

```auto
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd
[...]/igraph/build/doc/arpack.xml:7: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
]>
  ^
[...]/igraph/build/doc/arpack.xml:32: parser error : Entity 'mdash' not defined
<title><function>igraph_blas_ddot</function> &mdash; Dot product of two vectors

```

The first error seems to find something like docbook 4.3, even though I have 5.1\_1 installed with brew. I also installed xmlto, and also docbooks-xsl, to see if that would fix it.

I work on a macOS 10.14.6, and don’t have the rights to install a newer version.

---

<div class="post-metadata">

**Author:** ![tamas](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/tamas/32/1261_2.png) [@tamas](https://igraph.discourse.group/u/tamas)\
**Post date:** [31 January 2022 18:23 UTC](https://igraph.discourse.group/t/building-docbook-html-from-mac/1089/2 "2022-01-31T18:23:25Z")

</div>

What happens if you try to open [http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd](http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd) from a browser? It seems to work for me and it yields a file with 5703 bytes.

---

<div class="post-metadata">

**Author:** ![szhorvat](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/szhorvat/32/3_2.png) [@szhorvat](https://igraph.discourse.group/u/szhorvat)\
**Post date:** [31 January 2022 18:29 UTC](https://igraph.discourse.group/t/building-docbook-html-from-mac/1089/3 "2022-01-31T18:29:25Z")

</div>

It works for me too, but this file _should_ be installed locally (it is for me).

---

<div class="post-metadata">

**Author:** ![GroteGnoom](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/grotegnoom/32/428_2.png) [@GroteGnoom](https://igraph.discourse.group/u/GroteGnoom)\
**Post date:** [31 January 2022 18:53 UTC](https://igraph.discourse.group/t/building-docbook-html-from-mac/1089/4 "2022-01-31T18:53:52Z")

</div>

I can just download it and open it, with either curl or safari.

Cellar/docbook/5.1\_1/docbook/xml/4.3/docbookx.dtd also exists and is the same file.

---

<div class="post-metadata">

**Author:** ![GroteGnoom](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/grotegnoom/32/428_2.png) [@GroteGnoom](https://igraph.discourse.group/u/GroteGnoom)\
**Post date:** [30 October 2022 11:27 UTC](https://igraph.discourse.group/t/building-docbook-html-from-mac/1089/5 "2022-10-30T11:27:24Z")

</div>

I have the same issue on a linux system (this time with full rights). Almost everything is the same, except now I have docbook version 5.0.1

If I do --skip-validation on the XMLTO, then I’m left with this error:

```auto
FAILED: doc/html/stamp /home/daniel/Documents/igraph/build/doc/html/stamp 
cd /home/daniel/Documents/igraph/build/doc && /home/daniel/.nix-profile/bin/xmlto --skip-validation -x /home/daniel/Documents/igraph/doc/gtk-doc.xsl -o html xhtml igraph-docs.xml && /nix/store/kydypcx7vrsxqk8jf4g0gy5lvfm23wz4-cmake-3.24.2/bin/cmake -E copy /home/daniel/Documents/igraph/doc/html/*.css /home/daniel/Documents/igraph/build/doc/html && /nix/store/kydypcx7vrsxqk8jf4g0gy5lvfm23wz4-cmake-3.24.2/bin/cmake -E copy /home/daniel/Documents/igraph/doc/html/*.js /home/daniel/Documents/igraph/build/doc/html && /nix/store/kydypcx7vrsxqk8jf4g0gy5lvfm23wz4-cmake-3.24.2/bin/cmake -E copy /home/daniel/Documents/igraph/doc/html/*.png /home/daniel/Documents/igraph/build/doc/html && /nix/store/kydypcx7vrsxqk8jf4g0gy5lvfm23wz4-cmake-3.24.2/bin/cmake -E touch /home/daniel/Documents/igraph/build/doc/html/stamp
I/O error : Attempt to load network entity http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"
compilation error: file /home/daniel/Documents/igraph/doc/gtk-doc.xsl line 6 element import
xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
ninja: build stopped: subcommand failed.

```

Also reported by someone else here:

> **[FS#23456 : \[xmlto\] Failed to load network entity.](https://bugs.archlinux.org/task/23456)**
>
> Flyspray, a Bug Tracking System written in PHP.

I also tried adding docbook-xsl-ns and docbook-dtd-43 packages. Doesn’t seem to help.

To build PDFs I’d need `xsltproc`, `xmllint`, which I can’t find with my package managers (pacman and nix), and when I try it anyway it takes minutes to get past `Resolving includes in DocBook XML source` and then fails with

```auto
FAILED: doc/igraph-docs.fo /home/daniel/Documents/igraph/build/doc/igraph-docs.fo 
cd /home/daniel/Documents/igraph/build/doc && /usr/bin/xsltproc --output igraph-docs.fo --stringparam paper.type A4 http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl igraph-docs-with-resolved-includes.xml
error : Unknown IO error
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"
cannot parse http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl

```

which makes sense because xsltproc is not installed, but it does show that it’s always failing with these external entity errors, which seem completely unrelated to external entities. All stackoverflow solutions for  
‘xmlto failed to load external entity’ all seem unrelated to external entities and dependent on the project (so no general solution that applies to igraph I think).
