1

I am trying to install extra-cmake-modules from source, and then I get an error after executing make command:

Extension error: Could not import extension ecm (exception: No module named 'sphinxcontrib') make[2]: *** [docs/CMakeFiles/documentation.dir/build.make:62: docs/doc_format_html] Error 2 make[2]: Leaving directory '/home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build' make[1]: *** [CMakeFiles/Makefile2:217: docs/CMakeFiles/documentation.dir/all] Error 2 make[1]: Leaving directory '/home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build' make: *** [Makefile:163: all] Error 2 

It seems that the problem is about module Sphinx, but I tried to uninstall and install it again via pip and the error still occurred. So what can I do to fix it? Here are logs when I executed cmake -DCMAKE_INSTALL_PREFIX=/usr .. and make command:

$ cmake -DCMAKE_INSTALL_PREFIX=/usr .. -- WARNING: skipping tests that require PyQt -- The following features have been enabled: * BUILD_HTML_DOCS, Generate HTML documentation for installed modules. * BUILD_MAN_DOCS, Generate man page documentation for installed modules. * BUILD_TESTING, Build automated tests. -- The following OPTIONAL packages have been found: * Sphinx (required version >= 1.2), Tool to generate documentation., <https://www.sphinx-doc.org/> Required to build documentation for Extra CMake Modules. * QCollectionGenerator, Qt help collection generator., <https://www.qt.io/> Required to build Extra CMake Modules documentation in Qt Help format. * Qt5LinguistTools, Qt5 linguist tools., <https://www.qt.io/> Required to run tests for the ECMPoQmTools module. * Qt5Core, Qt5 core library., <https://www.qt.io/> Required to run tests for the ECMQtDeclareLoggingCategory module, and for some tests of the KDEInstallDirs module. * Qt5Network (required version >= 5.14.2) * Qt5Qml (required version >= 5.14.2) * Qt5QmlModels (required version >= 5.14.2) * Qt5Gui (required version >= 5.14.2) * Qt5Quick, Qt5 Quick library., <https://www.qt.io/> Required to run tests for the ECMQMLModules module. -- The following features have been disabled: * BUILD_QTHELP_DOCS, Generate QtHelp documentation for installed modules. -- Configuring done -- Generating done -- Build files have been written to: /home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build $ make make[1]: Entering directory '/home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build' make[2]: Entering directory '/home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build' make[2]: Leaving directory '/home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build' make[2]: Entering directory '/home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build' [ 50%] sphinx-build html: see /home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build/docs/build-html.log /usr/lib/python3.8/importlib/__init__.py:127: RemovedInSphinx40Warning: The alias 'sphinx.util.pycompat.htmlescape' is deprecated, use 'html.escape' instead. Check CHANGES for Sphinx API modifications. return _bootstrap._gcd_import(name[level:], package, level) Extension error: Could not import extension ecm (exception: No module named 'sphinxcontrib') make[2]: *** [docs/CMakeFiles/documentation.dir/build.make:62: docs/doc_format_html] Error 2 make[2]: Leaving directory '/home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build' make[1]: *** [CMakeFiles/Makefile2:217: docs/CMakeFiles/documentation.dir/all] Error 2 make[1]: Leaving directory '/home/masterpi/Documents/Extra-CMake-Modules/extra-cmake-modules/build' make: *** [Makefile:163: all] Error 2 

1 Answer 1

3

Just in case someone else is stumbling upon this error, here's the the follow-up discussion on KDE infrastructure: http://kde.6490.n7.nabble.com/Error-when-trying-to-install-ECM-Extra-Cmake-Modules-td1752955.html

Solution: Install the python3-sphinxcontrib* packages (i.e. via pip3 install python3-sphinxcontrib or via your package manager).

For me it was sufficient to install python3-sphinxcontrib.qthelp specifically.

1
  • python3-sphinxcontrib.qthelp was the missing package; best way to install with sudo apt-get install python3-sphinxcontrib*to get all the bastards. Commented Apr 7, 2022 at 16:46

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.