cmake ships with various FindXXX files to allow it to find dependencies. Apparently there's a syntax error in FindProtobuf.cmake: --- CMake Error at /usr/share/cmake/Modules/FindProtobuf.cmake:357 (file): file STRINGS file "/usr/include/google/protobuf/stubs/common.h" cannot be read. Call Stack (most recent call first): CMakeLists.txt:17 (find_package) CMake Error at /usr/share/cmake/Modules/FindProtobuf.cmake:363 (math): math cannot parse the expression: " / 1000000": syntax error, unexpected exp_DIVIDE, expecting exp_OPENPARENT or exp_NUMBER (2) Call Stack (most recent call first): CMakeLists.txt:17 (find_package) CMake Error at /usr/share/cmake/Modules/FindProtobuf.cmake:364 (math): math cannot parse the expression: " / 1000 % 1000": syntax error, unexpected exp_DIVIDE, expecting exp_OPENPARENT or exp_NUMBER (2) Call Stack (most recent call first): CMakeLists.txt:17 (find_package) CMake Error at /usr/share/cmake/Modules/FindProtobuf.cmake:365 (math): math cannot parse the expression: " % 1000": syntax error, unexpected exp_MOD, expecting exp_OPENPARENT or exp_NUMBER (2) --- CMakeLists.txt at line 17 contains: find_package(Protobuf REQUIRED) which seems fine.
Assignee: bugsquad => mageia
This happens when protobuf-devel is not installed, I think, because ${Protobuf_LIB_VERSION} is empty. It should fail gently instead.
Should be reported upstream, they should handle a missing stubs/common.h in https://github.com/Kitware/CMake/blob/1ee2019239751f91958a390aa3dfa24ea603f2f5/Modules/FindProtobuf.cmake#L397-L408 and return that the protobuf library was not found (ideally with an explicit comment about what was missing).
Keywords: (none) => UPSTREAM
Summary: cmake: Syntax error in FindProtobuf.cmake => cmake: FindProtobuf.cmake returns an error instead of noting the library as missing if protobuf-devel is not installed
Seems fixed in current cmake from mga9!
Resolution: (none) => OLDStatus: NEW => RESOLVEDCC: (none) => geiger.david68210