Hello everyone,
I just tried installing the FairSoft external packages onto the HIMster in Mainz using this guide: https://panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRootInstallGit
On the HIMster, cmake --version outputs the following:
cmake version 3.5.0-rc2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
The last line is ignored by the install_cmake.sh script correctly, but it does not recognize the patch version as 0 but instead fails to parse 0-rc2 completely:
/home/klasen/fairsoft_may16p1/buildFairsoft
scripts/install_cmake.sh: line 28: [: 0-rc2: integer expression expected
Found cmake version 3.5.0-rc2 which is older than the
required version 3.3.0 in PATH
This version is to old
install cmake as external package
Consequently, it installs cmake 3.3.2, but that version is too old as well:
CMake Error at CMakeLists.txt:2 (cmake_minimum_required):
CMake 3.4.3 or higher is required. You are running version 3.3.2
On HIMster, this is fixable if we correct the patch version parser to install_cmake.sh:
--cmake_installed_patch_version=$(echo $cmake_version_string | cut -d. -f3)
++cmake_installed_patch_version=$(echo $cmake_version_string | cut -d. -f3 | grep -oP '[0-9]{1,3}' | head -1)
Can we add this parser fix to the install_cmake.sh script, even tough this might be a border case? Also, if the script does install cmake, it should install 3.4.3 or higher, since that is the version that is actually needed.
Thank you!