# Cannot build, install or update FreeBSD Documentation



## recluce (Jul 10, 2013)

I have run into a peculiar problem. After having the German and English documentation installed on my system for about 18 months, portupgrade ran into an error on both documentation sets. I tried alternatives to install this after removing the prior version: portmaster generated the same error, expectedly. `pkg install de-freebsd-doc` did not find any packages to install.

I finally tried SVN to install from /usr/doc/de_DE.ISO8859-1 - with the same errors that I got before from the ports system:


```
root@storez1202:/usr/doc/de_DE.ISO8859-1 # make 
===> articles (all)
===> articles/contributing (all)
/usr/bin/grep '^<?xml version=.*?>' article.xml > article.parsed.xml.tmp
echo '<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook XML V4.5-Based Extension//EN" "../../../share/xml/freebsd45.dtd">' >> article.parsed.xml.tmp
==> Basic validation
env XML_CATALOG_FILES="file:///usr/doc/de_DE.ISO8859-1/articles/contributing/catalog-cwd.xml  file:///usr/doc/de_DE.ISO8859-1/share/xml/catalog.xml  file:///usr/doc/share/xml/catalog.xml  file:///usr/doc/share/xml/catalog-common.xml  file:///usr/local/share/xml/catalog" /usr/local/bin/xmllint --nonet --noent --valid --xinclude --dropdtd /usr/doc/de_DE.ISO8859-1/articles/contributing/article.xml |  /usr/bin/grep -v '^<?xml version=.*?>' >> article.parsed.xml.tmp
/bin/mv article.parsed.xml.tmp article.parsed.xml
/usr/bin/sed 's|@@URL_RELPREFIX@@|http://www.FreeBSD.org|g' < article.parsed.xml > article.parsed.print.xml
/usr/bin/sed -i '' 's|@@URL_RELPREFIX@@|../../../..|g' article.parsed.xml
/bin/rm -f docbook.css
/bin/cat /usr/doc/share/misc/docbook.css > docbook.css
env XML_CATALOG_FILES="file:///usr/doc/de_DE.ISO8859-1/articles/contributing/catalog-cwd.xml  file:///usr/doc/de_DE.ISO8859-1/share/xml/catalog.xml  file:///usr/doc/share/xml/catalog.xml  file:///usr/doc/share/xml/catalog-common.xml  file:///usr/local/share/xml/catalog" /usr/local/bin/xsltproc  --xinclude --nonet /usr/doc/de_DE.ISO8859-1/share/xsl/freebsd-xhtml-chunk.xsl article.parsed.xml
Writing trademarks.html for legalnotice(trademarks)
No "de" localization of "Lastmodified" exists; using "en".
No "de" localization of "on" exists; using "en".
Writing contrib-how.html for sect1(contrib-how)
Writing index.html for article
Writing HTML.manifest
env XML_CATALOG_FILES="file:///usr/doc/de_DE.ISO8859-1/articles/contributing/catalog-cwd.xml  file:///usr/doc/de_DE.ISO8859-1/share/xml/catalog.xml  file:///usr/doc/share/xml/catalog.xml  file:///usr/doc/share/xml/catalog-common.xml  file:///usr/local/share/xml/catalog" /usr/local/bin/xsltproc  --xinclude --nonet /usr/doc/de_DE.ISO8859-1/share/xsl/freebsd-xhtml.xsl article.parsed.xml > article.html
No "de" localization of "Lastmodified" exists; using "en".
No "de" localization of "on" exists; using "en".
/usr/local/bin/w3m -dump  article.html > article.txt
/home/recluce/.shrc SP_ENCODING=XML /usr/local/bin/openjade -V tex-backend -ioutput.print -d /usr/doc/share/xml/default.dsl -ifreebsd.urls.absolute -V %generate-article-toc%  -ijade.compat -w no-valid -V openjade  -D /usr/doc/de_DE.ISO8859-1/articles/contributing/../../../share/images/articles/contributing -D /usr/obj/usr/doc/de_DE.ISO8859-1/articles/contributing  -c /usr/doc/de_DE.ISO8859-1/share/xml/catalog -c /usr/doc/share/xml/catalog -c /usr/local/share/sgml/docbook/dsssl/modular/catalog -c /usr/local/share/sgml/jade/catalog -t tex -o article.tex /usr/local/share/sgml/docbook/dsssl/modular/dtds/decls/xml.dcl article.parsed.print.xml
/usr/bin/sed -i '' -e 's|{1}\\def\\ScaleY%|{0.5}\\def\\ScaleY%|g'  -e 's|{1}\\def\\EntitySystemId%|{0.5}\\def\\EntitySystemId%|g'  article.tex
sed: article.tex: No such file or directory
*** [article.tex] Error code 1

Stop in /usr/doc/de_DE.ISO8859-1/articles/contributing.
*** [all] Error code 1

Stop in /usr/doc/de_DE.ISO8859-1/articles.
*** [all] Error code 1

Stop in /usr/doc/de_DE.ISO8859-1.
```

This is on FreeBSD 9.1-p4 (x64).

Any help would be appreciated.


----------



## wblock@ (Jul 10, 2013)

Translations depend on shared code in the /usr/doc tree.  If you want to build the documentation from scratch, check out the whole doc tree: https://svn0.us-west.freebsd.org/doc/head/.

I can't speak to the packages or ports situation for built documentation, as I don't use either.  You can also consider just reading the built documents off the web site.  Go to freebsd.org, click on a language code on the right, click on the Documentation tab in red, then click on "Books and Articles Online".  For German, this leads to https://www.freebsd.org/de/docs/books.html.


----------



## recluce (Jul 10, 2013)

wblock@ said:
			
		

> Translations depend on shared code in the /usr/doc tree.  If you want to build the documentation from scratch, check out the whole doc tree: https://svn0.us-west.freebsd.org/doc/head/.
> 
> I can't speak to the packages or ports situation for built documentation, as I don't use either.  You can also consider just reading the built documents off the web site.  Go to freebsd.org, click on a language code on the right, click on the Documentation tab in red, then click on "Books and Articles Online".  For German, this leads to https://www.freebsd.org/de/docs/books.html.



I did check out the whole doc tree before trying to build from /usr/doc/de_DE.ISO8859-1 - but either building from that or a fresh ports tree, I always receive the same error.

Reading online is an interim solution - and thank you for the pointer - but I would like to get this working again.


----------



## ShelLuser (Jul 10, 2013)

recluce said:
			
		

> I did check out the whole doc tree before trying to build from /usr/doc/de_DE.ISO8859-1 - but either building from that or a fresh ports tree, I always receive the same error.


I just buil_t_ the German tree myself out of curiosity and it doesn't give me any errors, neither does the English tree.

So two questions which come to mind: What is the revision you're currently using? You should be able to find that out using `svn info` (from /usr/doc obviously).

And the next one: which "documentation project port" are you using? I assume you installed either textproc/docproj or one of the 'jadetex variants'?

The reason I'm wondering is because things seem to go wrong on your end right after openjade is being used. That is; there is no error message, but judging from the command after it (sed) the output file which it should have generated isn't there.

So your problem seems related to either openjade or perhaps any of the other tools it's using (assumption on my part there).


----------



## wblock@ (Jul 10, 2013)

recluce said:
			
		

> I did check out the whole doc tree before trying to build from /usr/doc/de_DE.ISO8859-1 - but either building from that or a fresh ports tree, I always receive the same error.
> 
> Reading online is an interim solution - and thank you for the pointer - but I would like to get this working again.



What version of textproc/docproj is installed?


----------



## recluce (Jul 11, 2013)

Thank you for all the help!

textproc/docproj is version 1.17_12. As far as openjade or other versions of jade are concerned:


```
root@store1202:/usr # portmaster -l | grep jade
===>>> jadetex-3.13_8
===>>> openjade-1.3.3p1_2
===>>> jade-1.2.1_9
```

`svn info` returns

```
root@storez1202:/usr/doc # svn info
Path: .
Working Copy Root Path: /usr/doc
URL: [url]https://svn0.us-west.freebsd.org/doc/head[/url]
Relative URL: ^/head
Repository Root: [url]https://svn0.us-west.freebsd.org/doc[/url]
Repository UUID: c2e8774f-c49f-e111-b436-862b2bbc8956
Revision: 42230
Node Kind: directory
Schedule: normal
Last Changed Author: rmacklem
Last Changed Rev: 42230
Last Changed Date: 2013-07-09 17:18:49 -0700 (Tue, 09 Jul 2013)
```


----------



## wblock@ (Jul 11, 2013)

Start with the basics.  Update the local working copy and try to build an English book in HTML.  The Porter's Handbook is a good test:

```
% cd /usr/doc/en_US.ISO8859-1/books/porters-handbook
% make book.html
```


----------



## recluce (Jul 11, 2013)

wblock@ said:
			
		

> Start with the basics.  Update the local working copy and try to build an English book in HTML.  The Porter's Handbook is a good test:
> 
> ```
> % cd /usr/doc/en_US.ISO8859-1/books/porters-handbook
> ...



That worked just fine!


----------



## wblock@ (Jul 11, 2013)

Okay, good.  Try the same thing again in the de_DE.ISO8859-1/books/porters-handbook subdirectory.  It will probably work.

Do you need the documents in any format other than HTML?  If not, just go up one directory, and do `make FORMATS=html` or `make FORMATS=html-split` if you prefer the versions with separate HTML files for each chapter.


----------



## recluce (Jul 12, 2013)

wblock@ said:
			
		

> Okay, good.  Try the same thing again in the de_DE.ISO8859-1/books/porters-handbook subdirectory.  It will probably work.
> 
> Do you need the documents in any format other than HTML?  If not, just go up one directory, and do `make FORMATS=html` or `make FORMATS=html-split` if you prefer the versions with separate HTML files for each chapter.



That worked, too. Actually, I can build the full documentation suite in English and German that way. I should be OK with the HTML books, so I will remove the documentation ports and just not worry about it. 

Thank you for the help!


----------

