# FreeBSD 8.2 KDE upgrade xmlto problem



## achix (Mar 26, 2011)

Hello I am running into this:

```
===>  Building for xmlto-0.0.23
make  all-am
for xml in xmlif.xml xmlto.xml; do  FORMAT_DIR=./format  /usr/local/bin/bash ./xmlto -o man/man1 man ./doc/$xml ;  done || ( RC=$?; exit $RC )
xmlto: /usr/ports/textproc/xmlto/work/xmlto-0.0.23/./doc/xmlif.xml does not validate (status 3)
xmlto: Fix document syntax or use --skip-validation option
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd
/usr/ports/textproc/xmlto/work/xmlto-0.0.23/./doc/xmlif.xml:4: warning: failed to load external entity "http://www.oasis-
open.org/docbook/xml/4.2/docbookx.dtd"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
                                                            ^
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd
warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
Document /usr/ports/textproc/xmlto/work/xmlto-0.0.23/./doc/xmlif.xml does not validate
xmlto: /usr/ports/textproc/xmlto/work/xmlto-0.0.23/./doc/xmlto.xml does not validate (status 3)
xmlto: Fix document syntax or use --skip-validation option
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd
/usr/ports/textproc/xmlto/work/xmlto-0.0.23/./doc/xmlto.xml:3: warning: failed to load external entity "http://www.oasis-
open.org/docbook/xml/4.2/docbookx.dtd"
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
                                                          ^
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd
warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
Document /usr/ports/textproc/xmlto/work/xmlto-0.0.23/./doc/xmlto.xml does not validate
*** Error code 13

Stop in /usr/ports/textproc/xmlto/work/xmlto-0.0.23.
*** Error code 1

Stop in /usr/ports/textproc/xmlto/work/xmlto-0.0.23.
*** Error code 1

Stop in /usr/ports/textproc/xmlto.
*** Error code 1

Stop in /usr/ports/textproc/xmlto.
```

Yes I tried with --skip-validation, I tried reinstalling docbook, I read the xmlto FAQ, I searched left and right but nothing helped. Anyone managed to upgrade KDE to the latest?

(Which translates into upgrading system-config-printer-1.1.16_2 to system-config-printer-1.1.16_3)

It is on an i386 system.


----------



## avilla@ (Mar 27, 2011)

Reinstall/upgrade textproc/docbook-xml.


----------



## achix (Mar 27, 2011)

Hi Avila, thanks for your input.
Unfortunately, yesterday under tones of the usual FreeBSD ports upgrade frustration I tried getting a new fresh ports tree in the hope that something had changed (solved), only to find out the KDE moved to 4.6. Anyway now I face a very similar error in astro/gpsd needed by KDE as well. The error reads :

```
changing mode of ./build/scripts-2.7/gpsprof from 644 to 755
changing mode of ./build/scripts-2.7/xgps from 644 to 755
changing mode of ./build/scripts-2.7/xgpsspeed from 644 to 755
echo 'timestamp for stamp-gps-manpages' > 'stamp-gps-manpages.tmp' &&  xmlto  man './gps.xml' &&  mv -f 'stamp-gps-manpages.tmp' 'stamp-gps-
manpages'
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
compilation error: file /tmp/xmlto-xsl.bjRr0K line 4 element import
xsl:import : unable to load [url]http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl[/url]
*** Error code 1

Stop in /usr/ports/astro/gpsd/work/gpsd-2.96.
*** Error code 1

Stop in /usr/ports/astro/gpsd/work/gpsd-2.96.
*** Error code 1

Stop in /usr/ports/astro/gpsd.
*** Error code 1

Stop in /usr/ports/astro/gpsd.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20110327-97035-cnuy22-0 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=gpsd-
2.95 UPGRADE_PORT_VER=2.95 make
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
	! astro/gpsd (gpsd-2.95)	(unknown build error)
```
so again something xmlto, docbook* related. I reinstalled docbook-xml to no avail.


----------



## achix (Mar 27, 2011)

Yesterday, after the original post, some time later I "cheated", installing xmlto via its package. Just 1 minute earlier i tried again portupgrading (-f) xmlto-0.0.23 and I got the same error :

```
config.status: creating config.h
config.status: executing depfiles commands
===>  Building for xmlto-0.0.23
make  all-am
depbase=`echo xmlif/xmlif.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; cc -DHAVE_CONFIG_H -I.      -O2 -pipe -fno-strict-aliasing -MT xmlif/xmlif.o -MD 
-MP -MF $depbase.Tpo -c -o xmlif/xmlif.o xmlif/xmlif.c && mv -f $depbase.Tpo $depbase.Po
cc  -O2 -pipe -fno-strict-aliasing   -o xmlif/xmlif xmlif/xmlif.o  
for xml in xmlif.xml xmlto.xml; do  FORMAT_DIR=./format  /usr/local/bin/bash ./xmlto -o man/man1 man ./doc/$xml ;  done || ( RC=$?; exit $RC )
xmlto: /usr/ports/textproc/xmlto/work/xmlto-0.0.23/./doc/xmlif.xml does not validate (status 3)
xmlto: Fix document syntax or use --skip-validation option
I/O error : Attempt to load network entity [url]http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd[/url]
/usr/ports/textproc/xmlto/work/xmlto-0.0.23/./doc/xmlif.xml:4: warning: failed to load external entity "http://www.oasis-
open.org/docbook/xml/4.2/docbookx.dtd"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
                                                            ^
I/O error : Attempt to load network entity [url]http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd[/url]
warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
Document /usr/ports/textproc/xmlto/work/xmlto-0.0.23/./doc/xmlif.xml does not validate
xmlto: /usr/ports/textproc/xmlto/work/xmlto-0.0.23/./doc/xmlto.xml does not validate (status 3)
xmlto: Fix document syntax or use --skip-validation option
I/O error : Attempt to load network entity [url]http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd[/url]
/usr/ports/textproc/xmlto/work/xmlto-0.0.23/./doc/xmlto.xml:3: warning: failed to load external entity "http://www.oasis-
open.org/docbook/xml/4.2/docbookx.dtd"
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
                                                          ^
I/O error : Attempt to load network entity [url]http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd[/url]
warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
Document /usr/ports/textproc/xmlto/work/xmlto-0.0.23/./doc/xmlto.xml does not validate
*** Error code 13

Stop in /usr/ports/textproc/xmlto/work/xmlto-0.0.23.
*** Error code 1

Stop in /usr/ports/textproc/xmlto/work/xmlto-0.0.23.
*** Error code 1

Stop in /usr/ports/textproc/xmlto.
*** Error code 1

Stop in /usr/ports/textproc/xmlto.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20110327-21243-10ib8pv-0 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=xmlto-
0.0.23 UPGRADE_PORT_VER=0.0.23 make
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
	! textproc/xmlto (xmlto-0.0.23)	(unknown build error)
```


----------



## achix (Mar 27, 2011)

By forcing xmlto to not delete its temp files, and by running *xsltproc* by hand, I get:

```
/usr/local/bin/xsltproc --nonet --xinclude -v -o "/tmp/xmlto.GGn7py/xgps.proc" /tmp/xmlto-xsl.s3UPOx /usr/local/src/gpsd-2.23/xgps.xml
creating dictionary for stylesheet
reusing dictionary from /tmp/xmlto-xsl.s3UPOx for stylesheet
xsltParseStylesheetProcess : found stylesheet
xsltPrecomputeStylesheet: removing ignorable blank node
Reusing dictionary for document
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
compilation error: file /tmp/xmlto-xsl.s3UPOx line 4 element import
xsl:import : unable to load [url]http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl[/url]
Reusing dictionary for document
xsltParseStylesheetProcess : found stylesheet
xsltPrecomputeStylesheet: removing ignorable blank node
Registering global param chunker.output.encoding
Defining global param chunker.output.encoding
Registering global param man.charmap.use.subset
Defining global param man.charmap.use.subset
parsed 0 templates
parsed 0 templates
freeing dictionary from stylesheet
```

So the problem is in the stack from libxslt-1.1.26_2 and below, or in some contract between xsltproc and xmlto. xsltproc is an executable, so any further debugging requires digging into the C sources.
However,
`$ strings /usr/local/lib/libxslt.so.2 | grep "to load"` gives:

```
Attempting to load plugin: %s for URI: %s
xsl:include : unable to load %s
xsl:import : unable to load %s
```


----------



## achix (Mar 27, 2011)

PR submitted here:
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/155968


----------



## avilla@ (Mar 27, 2011)

achix said:
			
		

> Hi Avila, thanks for your input.
> Unfortunately, yesterday under tones of the usual FreeBSD ports upgrade frustration I tried getting a new fresh ports tree in the hope that something had changed (solved), only to find out the KDE moved to 4.6. Anyway now I face a very similar error in astro/gpsd needed by KDE as well. The error reads :
> 
> so again something xmlto, docbook* related. I reinstalled docbook-xml to no avail.



Reinstall textproc/docbook-xsl as well. And yes, the PR is the best thing.


----------



## achix (Mar 27, 2011)

After having convinced my self that I had a really flawed system, (at one point py* ports failed because they found themselves already installed, read below on that), I wiped out the entire packages, portsnap fecth update and retry from scratch. So after 14 years of FreeBSD experience and after 4 days of non-stop compilation I still haven't got a system to work on!!! (for Kubuntu as a first timer it took me 2 hours to have everything, software raid, migrated data, full restoration of user's environments (from freebsd), including some failed attempts for full raid1 setup, and the download-burning of a new CD image..... two hours....)
For python, the problem was that both python26 and python27 were somehow installed at the same time. So here a new notion arises. A port that supposedly does not need update, actually it does. The system neither recognized that a port needs upgrade (py26-27), nor did it detect at install time that the py26<this_very_port> and py27<this_very_port> was the same port, nor did it install both of them, but broke the compilation instead,
Nasty stuff to even go from 8.2 to ..... 8.2... IMO that is *not* good.
Or maybe it was bad timing.

In general i think that since users are given the chance to stay -RELEASE as far as world/kernel is concerned, the same should happen with packages and ports. The ports/packages tags should follow world. This of course would mean that in this case FreeBSD stays behind in many ports like ubuntu does, but OTOH give the users some air to breath. (and some system to work on, and some guarantee that their port installation wont destroy their system).

Of course the current (ports=always HEAD) approach should be retained, but only for people who want this. Giving users the ability to stay release(=safe) on one hand without doing the same for ports, (which a big majority of the software used) is not correct. By any means. If people who have grown old with FreeBSD still cannot cope, I don't know what to expect from noobs.


----------

