Page MenuHomePhabricator

Configure Cmake Build - Error : Could NOT find Sphinx (missing: SPHINX_VERSION)
Closed, ResolvedPublic


Cmake : 3.10.2
Linux : Ubuntu 18.04



When following software requirements, and setting

It reports..

-- Could NOT find Sphinx (missing: SPHINX_VERSION) 
CMake Warning at cmake/Common/BuildSphinxDoc.cmake:59 (message):
  Some tools are missing for Sphinx document generation.  Document generation
  target is not created.
Call Stack (most recent call first):
  cmake/Common/BuildSphinxDoc.cmake:65 (SphinxFindTools)
  secure_fw/CMakeLists.txt:23 (include)

Although I see it being installed in: /usr/bin/sphinx-build and reports

~/trusted-firmware-m/cmake_build$ sphinx-build --version
Sphinx (sphinx-build) 1.6.7

Problem could be here, when it compares the string.

Event Timeline

Newer versions of sphinx seem to print the version as:

$ sphinx-build.exe --version
sphinx-build 2.1.2

I think the ) character is making the reqexp on this line fail to match.
Can you please check if changing line 85 like this helps?: if(_SPHINX_VERSION MATCHES ".*sphinx-build[^0-9.]*([0-9.]+).*")

CMake Error in cmake/FindSphinx.cmake:
  A logical block opening on line 84 is not closed.

Can you please double check you modification? Line 84-88 should be:

        if(_SPHINX_VERSION MATCHES ".*sphinx-build[^0-9.]*([0-9.]+).*")
		string(REGEX REPLACE ".*sphinx-build ([0-9.]+).*" "\\1" SPHINX_VERSION "${_SPHINX_VERSION}")


The line sort outs

if(_SPHINX_VERSION MATCHES ".*sphinx-build[^0-9.]*([0-9.]+).*")


Can you please create a pull request with the fix?

gyuri-szing closed this task as Resolved.Aug 28 2019, 11:42 AM
gyuri-szing claimed this task.

Fix was merged.