Error while building documentation
Reported by Guillaume Horel
Originally assigned to Sylvestre LEDRU
Bug description:
The docs fail to build with: Error while building documentation: Could not find CSS stylesheet: /var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/helptools/css/javahelp.css.
This is if I have scilab-5.3 installed already. If I delete scilab-5.3 first, the docs for scilab-5.4 build fine.
Error log:
-- Building documentation (en_US) --
LANG=C SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 ./bin/scilab-adv-cli -noatomsautoload -nb -nouserstartup -e "try xmltojar([],[],'en_US');catch disp(lasterror()); exit(-1);end;exit(0);"
Building the Scilab manual master document for en_US.
Building the scilab manual file [javaHelp]
Converting LaTeX formula to /var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/helptools/javaHelp/scilab_en_US_help/graphics-1_latex.png'...
Extracted embedded graphics from '/var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/helptools/javaHelp/scilab_en_US_help/graphics-2.mml' to '/var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/helptools/javaHelp/scilab_en_US_help/graphics-2.mml'.
Converting MathML '/var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/helptools/javaHelp/scilab_en_US_help/graphics-2.mml' to '/var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/helptools/javaHelp/scilab_en_US_help/graphics-2_mml.png'...
Extracted embedded graphics from '/var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/helptools/javaHelp/scilab_en_US_help/graphics-3.mml' to '/var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/helptools/javaHelp/scilab_en_US_help/graphics-3.mml'.
Converting MathML '/var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/helptools/javaHelp/scilab_en_US_help/graphics-3.mml' to '/var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/helptools/javaHelp/scilab_en_US_help/graphics-3_mml.png'...
Extracted embedded graphics from '/var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/helptools/javaHelp/scilab_en_US_help/graphics-4.mml' to '/var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/helptools/javaHelp/scilab_en_US_help/graphics-4.mml'.
Converting MathML '/var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/helptools/javaHelp/scilab_en_US_help/graphics-4.mml' to '/var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/helptools/javaHelp/scilab_en_US_help/graphics-4_mml.png'...
followed by many similar lines, and ends up failing with:
Copying '/var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/ui_data/help/images/filebrowser_filter_regexp.png' to '/var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/helptools/javaHelp/scilab_en_US_help/filebrowser_filter_regexp.png'...
Copying '/var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/preferences/help/images/scinotes/editor.png' to '/var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/helptools/javaHelp/scilab_en_US_help/editor.png'...
Copying '/var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/preferences/help/images/scinotes/scinotes_general_settings.png' to '/var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/helptools/javaHelp/scilab_en_US_help/scinotes_general_settings.png'...
buildDoc: Error while building documentation: Could not find CSS stylesheet: /var/tmp/portage/sci-mathematics/scilab-5.4.0/work/scilab-5.4.0/modules/helptools/css/javahelp.css.
make: *** [doc] Error 1
Additional Comments:
I see that modules/helptools/css/javahelp.css has been deleted, cause supposedly not needed. However it's still referenced in the codebase (in two places, se below), so it might have been premature to do so...
./modules/helptools/src/java/org/scilab/modules/helptools/BuildDocObject.java
380: SCI + "/modules/helptools/css/javahelp.css");
./modules/helptools/sci_gateway/cpp/sci_buildDocv2.cpp
34:#define PATHTOCSS "/modules/helptools/css/javahelp.css"
If I copy the old javahelp.css into modules/helptools/css/javahelp.css, docs generation fails later with the following error:
Bad param=value pair on command line
SAXON 6.5.5 from Michael Kay
Usage: java com.icl.saxon.StyleSheet [options] source-doc style-doc {param=value}...
Options:
-a Use xml-stylesheet PI, not style-doc argument
-ds Use standard tree data structure
-dt Use tinytree data structure (default)
-o filename Send output to named file or directory
-m classname Use specified Emitter class for xsl:message output
-r classname Use specified URIResolver class
-t Display version and timing information
-T Set standard TraceListener
-TL classname Set a specific TraceListener
-u Names are URLs not filenames
-w0 Recover silently from recoverable errors
-w1 Report recoverable errors and continue (default)
-w2 Treat recoverable errors as fatal
-x classname Use specified SAX parser for source file
-y classname Use specified SAX parser for stylesheet
-? Display this message
Finally, if I remove scilab-5.3, and try to compile directly scilab-5.4, the logs are quite different:
LANG=C SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 ./bin/scilab-adv-cli -noatomsautoload -nb -nouserstartup -e "try xmltojar([],[],'en_US');catch disp(lasterror()); exit(-1);end;exit(0);"
Building the Scilab manual master document for en_US.
Building the scilab manual file [javaHelp]
Warning: the macro winclose is used in an example and is undocumented (progressionbar.xml).
Warning: the macro winclose is used in an example and is undocumented (waitbar.xml).
Total files without example: 929
Total generated html files: 2604
It looks like the latex and mathml conversion to png doesn't happen, so a different codepath is taken.