Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build fails in man folder #1733

Closed
leikong opened this issue Jun 24, 2020 · 12 comments
Closed

build fails in man folder #1733

leikong opened this issue Jun 24, 2020 · 12 comments
Labels
Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer.

Comments

@leikong
Copy link

leikong commented Jun 24, 2020

Is this a known issue or my env issue? Thanks.

make[1]: Entering directory '/home/leikong/repo/mosquitto/man'
xsltproc --nonet libmosquitto.3.xml
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"
compilation error: file manpage.xsl line 3 element import
xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
compilation error: file libmosquitto.3.xml line 4 element refentry
xsltParseStylesheetProcess : document is not a stylesheet
Makefile:78: recipe for target 'libmosquitto.3' failed
make[1]: *** [libmosquitto.3] Error 5
make[1]: Leaving directory '/home/leikong/repo/mosquitto/man'
Makefile:50: recipe for target 'docs' failed
make: *** [docs] Error 2

@ralight
Copy link
Contributor

ralight commented Jun 24, 2020

It looks like your copy of xsltproc doesn't obey the --nonet argument to me, I don't know why that would be though.

@leikong
Copy link
Author

leikong commented Jun 24, 2020

Thanks for the quick reply.
I am on Ubuntu 18.04, do you have a docker build environment?

It looks like '--nonet' did what it's supposed to do.
--nonet : refuse to fetch DTDs or entities over network

$ xsltproc --version
Using libxml 20904, libxslt 10129 and libexslt 817
xsltproc was compiled against libxml 20904, libxslt 10129 and libexslt 817
libxslt 10129 was compiled against libxml 20904
libexslt 817 was compiled against libxml 20904
$ xsltproc --help
Unknown option --help
Usage: xsltproc [options] stylesheet file [file ...]
Options:
--version or -V: show the version of libxml and libxslt used
--verbose or -v: show logs of what's happening
--output file or -o file: save to a given file
--timing: display the time used
--repeat: run the transformation 20 times
--debug: dump the tree of the result instead
--dumpextensions: dump the registered extension elements and functions to stdout
--novalid skip the DTD loading phase
--nodtdattr do not default attributes from the DTD
--noout: do not dump the result
--maxdepth val : increase the maximum depth (default 3000)
--maxvars val : increase the maximum variables (default 15000)
--maxparserdepth val : increase the maximum parser depth
--seed-rand val : initialize pseudo random number generator with specific seed
--html: the input document is(are) an HTML file(s)
--encoding: the input document character encoding
--param name value : pass a (parameter,value) pair
name is a QName or a string of the form {URI}NCName.
value is an UTF8 XPath expression.
string values must be quoted like "'string'"
or use stringparam to avoid it
--stringparam name value : pass a (parameter, UTF8 string value) pair
--path 'paths': provide a set of paths for resources
--nonet : refuse to fetch DTDs or entities over network
--nowrite : refuse to write to any file or resource
--nomkdir : refuse to create directories
--writesubtree path : allow file write only with the path subtree
--catalogs : use SGML catalogs from $SGML_CATALOG_FILES
otherwise XML Catalogs starting from
file:///etc/xml/catalog are activated by default
--xinclude : do XInclude processing on document input
--xincludestyle : do XInclude processing on stylesheets
--load-trace : print trace of all external entites loaded
--profile or --norman : dump profiling information

@leikong
Copy link
Author

leikong commented Jun 24, 2020

The build failure only happens in your github master branch, build works fine if I download from https://mosquitto.org/download/

@leikong
Copy link
Author

leikong commented Jun 24, 2020

build passes if "--nonet" is removed from config.mk

@ralight
Copy link
Contributor

ralight commented Jul 15, 2020

I think I may have the answer - your installation does not include a local copy of the docbook-xsl files. Removing --nonet allows it to go to the network to find the resources. If you are on a Debian derived Linux system then installing docbook-xsl will be sufficient (this is mentioned in readme.md). If you are on a different system then I don't know the package name you would need.

@ralight ralight added the Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. label Jul 15, 2020
@leikong
Copy link
Author

leikong commented Jul 15, 2020

Yes, that was the issue, thanks!

@leikong leikong closed this as completed Jul 15, 2020
@petertorelli
Copy link

Removing --nonet from config.mk only gets you part way through the build, it still fails midway:

cc -I.. -I../lib  -Wall -ggdb -O2 -c mosquitto_passwd.c -o mosquitto_passwd.o
cc  mosquitto_passwd.o misc_mosq.o -o mosquitto_passwd  -lcrypto 
make[1]: Leaving directory '/home/eembc/git/mosquitto/src'
set -e; for d in man; do make -C ${d}; done
make[1]: Entering directory '/home/eembc/git/mosquitto/man'
xsltproc libmosquitto.3.xml
xsltproc mosquitto-tls.7.xml
xsltproc mosquitto.8.xml
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/common/refentry.xsl"

@ralight
Copy link
Contributor

ralight commented Sep 11, 2020

@petertorelli If you remove --nonet and then it can't access the URL that sounds like a network problem or a problem with xsltproc. You should just need the equivalent of the docbook-xsl package though, and then using --nonet would work.

@darkasassin44
Copy link

darkasassin44 commented Nov 13, 2020

The same error has occurred to me on Ubuntu 18.04 LTS. With ppa installation, mosquitto and mosquitto_sub, mosquito_pub worked perfectly. I cloned this repository and did make. Below is my error message on terminal

make[1]: Leaving directory '/home/conceptbug95/mosquitto/src'
set -e; for d in man; do make -C ${d}; done
make[1]: Entering directory '/home/conceptbug95/mosquitto/man'
xsltproc --nonet libmosquitto.3.xml
make[1]: xsltproc: Command not found
Makefile:78: recipe for target 'libmosquitto.3' failed
make[1]: *** [libmosquitto.3] Error 127
make[1]: Leaving directory '/home/conceptbug95/mosquitto/man'
Makefile:50: recipe for target 'docs' failed
make: *** [docs] Error 2

I've read all the comment above, but I couldn't understand what I have to do to fix this build error because I'm a beginner on Ubuntu.
If possible, please guide me step by step solution. Thanks!

@leikong
Copy link
Author

leikong commented Nov 13, 2020

@darkasassin44
have you tried installing docbook-xsl as suggested by @ralight above?

@darkasassin44
Copy link

@leikong Yes, with sudo apt install docbook-xsl I installed package, and make again after make clean. Same error. make binary had no error, but running mosquitto executable didn't worked.

@jrgleason
Copy link

jrgleason commented Jun 8, 2021

I am using Raspberry Pi with Raspian and I can confirm I needed to add sudo apt install docbook-xsl xsltproc to build. Also manually built and installed cjson

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer.
Projects
None yet
Development

No branches or pull requests

5 participants