[gdal-dev] CMake Error at ....../GDAL/cmake/helpers/generate_gdal_version_h.cmake:27 (string): string sub-command SUBSTRING requires four arguments.

Pei JIA jp4work at gmail.com
Wed May 11 12:25:21 PDT 2022


Hi, all:

I successfully configured and built gdal-3.4.3, but failed to install it on
Ubuntu 22.04, with gcc-11.2,












*➜  ~ uname -r   5.15.0-27-generic➜  ~ lsb_release -aNo LSB modules are
available.Distributor ID: UbuntuDescription: Ubuntu 22.04 LTSRelease:
22.04Codename: jammy➜  ~ gcc --versiongcc (Ubuntu 11.2.0-19ubuntu1)
11.2.0Copyright (C) 2021 Free Software Foundation, Inc.This is free
software; see the source for copying conditions.  There is NOwarranty; not
even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.*

by using *cmake*, I successfully configured and built gdal-3.4.3, but
failed to install with the following error message. Any suggestions?
































*Installing with make install...========================= Installation
results ===========================/usr/local/bin/cmake -S....../GDAL
-B....../GDAL/build --check-build-system CMakeFiles/Makefile.cmake
0/usr/local/bin/cmake -E cmake_progress_start ....../GDAL/build/CMakeFiles
....../GDAL/build//CMakeFiles/progress.marksmake  -f CMakeFiles/Makefile2
allmake[1]: Entering directory '....../GDAL/build'make  -f
CMakeFiles/generate_gdal_version_h.dir/build.make
CMakeFiles/generate_gdal_version_h.dir/dependmake[2]: Entering directory
'....../GDAL/build'cd ....../GDAL/build && /usr/local/bin/cmake -E
cmake_depends "Unix Makefiles" ....../GDAL ....../GDAL ....../GDAL/build
....../GDAL/build
....../GDAL/build/CMakeFiles/generate_gdal_version_h.dir/DependInfo.cmake
--color=make[2]: Leaving directory '....../GDAL/build'make  -f
CMakeFiles/generate_gdal_version_h.dir/build.make
CMakeFiles/generate_gdal_version_h.dir/buildmake[2]: Entering directory
'....../GDAL/build'/usr/local/bin/cmake -DSOURCE_DIR=....../GDAL
-DBINARY_DIR=....../GDAL/build -DGDAL_SHA1SUM= -DGDAL_RELEASE_DATE= -P
....../GDAL/cmake/helpers/generate_gdal_version_h.cmake-- Found Git:
/usr/bin/git (found version "2.34.1") CMake Error at
....../GDAL/cmake/helpers/generate_gdal_version_h.cmake:27 (string):
string sub-command SUBSTRING requires four arguments.make[2]: ***
[CMakeFiles/generate_gdal_version_h.dir/build.make:73:
CMakeFiles/generate_gdal_version_h] Error 1make[2]: Leaving directory
'....../GDAL/build'make[1]: *** [CMakeFiles/Makefile2:4367:
CMakeFiles/generate_gdal_version_h.dir/all] Error 2make[1]: Leaving
directory '....../GDAL/build'make: *** [Makefile:149: all] Error 2****
 Installation failed. Aborting package creation.Restoring overwritten files
from backup...OKCleaning up...OKBye.*


Cheers


-- 

Pei JIA, Ph.D.

Email: jp4work at gmail.com
cell in Canada:    +1 778-863-5816
cell in China: +86 186-8244-3503

Welcome to Vision Open
http://www.visionopen.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220511/55fbe9cd/attachment.htm>


More information about the gdal-dev mailing list