Bug report #16030

Updated by matteo ghetta over 5 years ago

When I compile qgis from source, with @-DWITH_TXT2TAGS_PDF=ON@, the compilation of the (generated?) @/tmp/qgis/src/qgis-2.18.2/build/doc/INSTALL.tex@ fails.



The command executed:

<pre>

/sbin/pdflatex -output-directory=/tmp/qgis/src/qgis-2.18.2/build/doc /tmp/qgis/src/qgis-2.18.2/build/doc/INSTALL.tex

</pre>



The error output:

<pre>

! Undefined control sequence.

\\thesection ...een}\\color {qgis-green}\\thechapter

\\arabic {section}

l.33 ...ge\\section{\\color{qgis-green}Introduction}



? x

</pre>



I narrowed it down: The LaTeX-file contains the entry @\

enewcommand\\thesection{\\color{qgis-green}\\color{qgis-green}\\thechapter\\arabic{section}}@ (the whole line is

<pre>

\\hypersetup{linkcolor=qgis-green,urlcolor=qgis-green}\

enewcommand\\thesection{\\color{qgis-green}\\color{qgis-green}\\thechapter\\arabic{section}}

</pre>; the first part is fine). Removing that @\

enewcommand[...]@-statement makes the compilation successfull.



Though I do not provide a patch here since this LaTeX file seems to get auto-generated and I did not dig up where the problem originates.



My whole build command (executed within /tmp/qgis/src/qgis-2.18.2/build):



<pre>

cmake -G "Unix Makefiles" ../ \\

-DCMAKE_INSTALL_PREFIX=/usr \\

-DQGIS_MANUAL_SUBDIR=share/man \\

-DENABLE_TESTS=FALSE \\

-DCMAKE_SKIP_RPATH=TRUE \\

-DPYTHON_EXECUTABLE=/usr/bin/python2 \\

-DWITH_INTERNAL_{DATEUTIL,FUTURE,HTTPLIB2,JINJA2,NOSE2,OWSLIB,PYGMENTS,PYTZ,QWTPOLAR,SIX,WEBKIT_BINDINGS,YAML}=OFF \\

-DWITH_INTERNAL_{QEXTSERIALPORT}=ON \\

-DPYQT4_SIP_DIR="${_pyqt4_sip_dir}" \\

-DWITH_SERVER=ON \\

-DWITH_GLOBE=ON \\

-DWITH_SERVER=ON \\

-DWITH_GLOBE=ON \\

-DWITH_GRASS=OFF \\

-DWITH_GRASS7=ON \\

-DGRASS_PREFIX7=/opt/grass \\

-DWITH_APIDOC=OFF \\

-DWITH_ASTYLE=OFF \\

-DWITH_BINDINGS=ON \\

-DWITH_CUSTOM_WIDGETS=ON \\

-DWITH_DESKTOP=ON \\

-DWITH_ORACLE=OFF \\

-DWITH_POSTGRESQL=ON \\

-DWITH_PYSPATIALITE=ON \\

-DWITH_QSPATIALITE=ON \\

-DWITH_QTMOBILITY=ON \\

-DWITH_QTWEBKIT=ON \\

-DWITH_QWTPOLAR=ON \\

-DWITH_STAGED_PLUGINS=ON \\

-DWITH_TOUCH=ON \\

-DWITH_TXT2TAGS_PDF=ON \\



msg "Applying a dirty fix for a configuration system error ..."

sed -i "s| /usr/share/sip | ${_pyqt4_sip_dir} |" python/CMakeFiles/{python_module_qgis__analysis,python_module_qgis__gui,python_module_qgis__server,generate_sip_qgis._analysis_cpp_files,python_module_qgis__core,generate_sip_qgis._core_cpp_files,generate_sip_qgis._gui_cpp_files,generate_sip_qgis._networkanalysis_cpp_files,python_module_qgis__networkanalysis}.dir/build.make



make

</pre>

Back