Bug 195538 - sysutils/polkit fails while building man target and reports recursion in catalog and being unable to load an external entity
Summary: sysutils/polkit fails while building man target and reports recursion in cata...
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-30 20:16 UTC by Trond Endrestøl
Modified: 2015-08-09 13:13 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Trond Endrestøl 2014-11-30 20:16:37 UTC
sysutils/polkit stopped while building the man target:

Making all in man
gmake[5]: Entering directory '/usr/ports/workdirs/usr/ports/sysutils/polkit/work/polkit-0.105/docs/man'
/usr/local/bin/xsltproc -nonet --stringparam man.base.url.for.relative.links /usr/local/share/gtk-doc/html/polkit-1/ --xinclude http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl polkit.xml
Catalog error : Detected recursion in catalog (null)
Catalog error : Detected recursion in catalog (null)
I/O error : Attempt to load network entity http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
cannot parse http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
Makefile:571: recipe for target 'polkit.8' failed
gmake[5]: *** [polkit.8] Error 4
gmake[5]: Leaving directory '/usr/ports/workdirs/usr/ports/sysutils/polkit/work/polkit-0.105/docs/man'
Makefile:329: recipe for target 'all-recursive' failed
gmake[4]: *** [all-recursive] Error 1
gmake[4]: Leaving directory '/usr/ports/workdirs/usr/ports/sysutils/polkit/work/polkit-0.105/docs'
Makefile:374: recipe for target 'all-recursive' failed
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory '/usr/ports/workdirs/usr/ports/sysutils/polkit/work/polkit-0.105'
Makefile:305: recipe for target 'all' failed
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory '/usr/ports/workdirs/usr/ports/sysutils/polkit/work/polkit-0.105'
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/sysutils/polkit
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/polkit
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-11-30 20:16:37 UTC
Auto-assigned to maintainer gnome@FreeBSD.org
Comment 2 Trond Endrestøl 2014-11-30 20:19:13 UTC
(In reply to Trond.Endrestol from comment #0)

> I/O error : Attempt to load network entity
> http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
> warning: failed to load external entity
> "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
> cannot parse
> http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl

I just clicked on the docbook link above from Firefox on the very same computer, and Firefox was able to access the docbook.xsl file.

Why can't the build enviroment access the file? There was no change in any network settings in between.
Comment 3 Mikhail Teterin freebsd_committer freebsd_triage 2015-02-15 15:39:39 UTC
(In reply to Trond.Endrestol from comment #2)
It must be the ``nonet'' part of the command-line -- the XML-processor is enjoined from accessing the network, but can not load the necessary file(s) without it.

No, I do not know, why it does not fail at ALL times, nor do I know, how to fix it.
Comment 4 Mikhail Teterin freebsd_committer freebsd_triage 2015-02-15 16:09:05 UTC
(In reply to Mikhail Teterin from comment #3)
> No, I do not know, why it does not fail at ALL times,

Ok, now I do. Before going to the Internet for referenced resource, the tools will try to find it locally. For that, it consults your ${LOCALBASE}/share/xml/catalog, which normally is just a shim for ${LOCALBASE}/share/xml/catalog.ports

If either of those files are somehow corrupt AND accessing the necessary file over the Internet is prohibited (which it normally is), the error will occur.

In my case here a filesystem corruption (or some other problem) left catalog.ports EMPTY... Something else may be the reason in your case.

> nor do I know, how to fix it.

Ok, catalog.ports can be restored with something like:

xmlcatmgr -c /usr/local/share/xml/catalog.ports create xml

(Obtained from https://forums.freebsd.org/threads/fixes-for-missing-xml-sgml-catalogs.43109/)

The ports-infrastructure really ought to handle such cases better, but with the current portmgr@'s emphasis on pre-built binary packages, tinkerers building from source are on their own.
Comment 5 Koop Mast freebsd_committer freebsd_triage 2015-08-09 13:13:38 UTC
The problem was with the local docbook setup.