[Scons-dev] New SCons doc toolchain...

Gary Oberbrunner garyo at oberbrunner.com
Sun Apr 21 20:21:20 EDT 2013


On Sun, Apr 21, 2013 at 5:57 PM, Dirk Bächle <tshortik at gmx.de> wrote:


> Hi Gary,

>

> On 21.04.2013 23:38, Gary Oberbrunner wrote:

>

>>

>> [...]

>>

>>

>> Hi, Dirk!

>>

>> I just cloned this on my Linux box (Ubuntu 11.10 - also tried 12.04), but

>> running scons bootstrap.py gives errors:

>>

>> scons: *** [design.xml] XMLSyntaxError : Specification mandate value for

>> attribute object, line 1, column 31

>> scons: building terminated because of errors.

>>

>> (repeats a few times). This prevents it from building doc/man/scons.1.

>>

>> I'm on the new_doc_toolchain branch, 6822ec. Do I perhaps have an

>> out-of-date dependency or something?

>>

>>

> this is strange, mainly because design.xml doesn't have anything to do

> with building the MAN pages. It works fine on my side (Ubuntu Linux 12.04.2

> LTS)...did you run the SConstruct for the "doc/man" subfolder with a

> revision from new_doc_toolchain before? Then, maybe some leftover files

> could be responsible for this error.

>


It's a brand new clone of your repo, nothing else in there. It's probably
some tool it's using that I'm missing, or getting the wrong version of, or
something?



> I have never seen this message and at the moment don't know what it

> actually means and where the problem is. What happens if you cd into the

> "doc/man" folder (or any of the other documents) and call:

>

> python ../../scr/script/scons.py

>

> such that only the doc outputs get built? Does that work?



No, it fails right away:

user at lubuntu:~/src/scons_doc_toolchain$ cd doc/man
user at lubuntu:~/src/scons_doc_toolchain/doc/man$ python
../../src/script/scons.py
SCons import failed. Trying to run from source directory
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: *** [scons-time_db.xml] XMLSyntaxError : Specification mandate value
for attribute object, line 1, column 31
scons: building terminated because of errors.

Oddly, it doesn't print out the command it's executing to build
scons-time_db.xml, but clearly it's related to this:
env.DocbookXslt('%s_db.xml' % target, '%s_xi.xml' % target,
xsl='../xslt/to_docbook.xslt')

I put a few print stmts in that function, and on my machine it's using lxml.

I tried prefer_cmdline and I get a slew of other errors:

scons-time_xi.xml:1: parser error : Specification mandate value for
attribute object
<lxml.etree._ElementTree object at 0x886456c>
^
scons-time_xi.xml:1: parser error : attributes construct error
<lxml.etree._ElementTree object at 0x886456c>
^
scons-time_xi.xml:1: parser error : Couldn't find end of Start Tag
lxml.etree._ElementTree line 1
<lxml.etree._ElementTree object at 0x886456c>
^
scons-time_xi.xml:1: parser error : Extra content at the end of the document
<lxml.etree._ElementTree object at 0x886456c>
^
unable to parse scons-time_xi.xml
scons: done building targets.

... so I think scons-time_xi.xml was created badly because that line is the
only line in that file. If I remove it and try again (still using
prefer_cmdline), it gets farther:

scons: Building targets ...
/usr/bin/xmllint --xinclude scons-time.xml > scons-time_xi.xml
/usr/bin/xsltproc -o scons-time_db.xml ../xslt/to_docbook.xslt
scons-time_xi.xml
/usr/bin/xsltproc -o scons-scons-time.fo pdf.xsl scons-time_db.xml
Making portrait pages on letter paper (8.5inx11in)
/usr/bin/xsltproc -o scons-scons-time.html html.xsl scons-time_db.xml
/usr/bin/jw -fo scons-scons-time.fo -pdf scons-scons-time.pdf
Usage: jw [<options>] <sgml_file>
where <options> are:
-f|--frontend <frontend>: Specify the frontend (source format)
(default is docbook)
-b|--backend <backend>: Specify the backend (destination format)
(default is html)
-c|--cat <file>: Specify an extra SGML open catalog
-n|--nostd: Do not use the standard SGML open catalogs
-d|--dsl <file>|default|none: Specify an alternate style sheet
(default is to use the default stylesheet)
-l|--dcl <file>: Specify an alternate SGML declaration
(usual ones like xml.dcl get detected automatically)
-s|--sgmlbase <path>: Change base directory for SGML distribution
(usually /usr/share/sgml)
-p|--parser <program>: Specify the parser if several are installed
(jade or openjade)
-o|--output <directory>: Set output directory
-u|--nochunks: Output only one big file
(overrides the stylesheet settings)
-i|--include <section>: Specify a SGML marked section to include
(should be marked as "ignore" in the SGML text)
-w|--warning <warning_type>|list: Control warnings or display the allowed
warning types
-e|--errors <error_type>|list: Control errors or display the allowed
error types
-h|--help: Print this help message and exit
-V <variable[=value]>: Set a variable
-v|--version: Print the version and exit
scons: *** [scons-scons-time.pdf] Error 1








> Also, can you properly validate all documents by calling

>

> python bin/docs-validate.py

>

> in the top-level dir?



That seems to go fine (it takes a little while), except for this:

62.09% (131/211) doc/man/scons.xml
Element '{http://www.scons.org/dbxsd/v1.0}refentry': This element is not
expected. Expected is ( {http://www.scons.org/dbxsd/v1.0}title )., line 66

--
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/scons-dev/attachments/20130421/0f54c017/attachment.html>


More information about the Scons-dev mailing list