Skip to content

Instantly share code, notes, and snippets.

@argent-smith
Created May 10, 2011 08:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save argent-smith/964101 to your computer and use it in GitHub Desktop.
Save argent-smith/964101 to your computer and use it in GitHub Desktop.
Getting rid of the mystic FreeBSD 'xmlto bug'

Often in the last year I (and other experienced FreeBSD users) face the same problem: "Error loading external entity" messages and thus, the compilation failure.

I've found several ways to fix it and the likes:

  • You should open /usr/local/bin/xmlto script and comment out the following line:

    XSLTOPTS="$XSLTOPTS --nonet"
    

The fix works only if you've got a live Internet connection. The best way probably is to fix local dtd catalogue layout for docbook* things but I still don't know how; advise needed!

  • It also may require to go into the failing port's subdir, find the Makefile corresponding to the (probably) man generation, find xsltproc call there and remove -nonet parameter; then either build the port manually via make invocation or portupgrade -fw it.

  • Go into the corresponding Makefile(s) and change network URI into a local one (/usr/local/**)

  • Rebuild the port with NO_INSTALL_MANPAGES defined

  • Find the failing xmlto script and set SKIP_VALIDATION variable to 1 (since the thing is actually complaining on the source xml validity)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment