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

Even Rouault even.rouault at spatialys.com
Wed May 11 13:09:08 PDT 2022


This is the 3rd time in a few days you post the same message, with 
factually incorrect elements (GDAL 3.4.3 doesn't have CMake support) as 
I already pointed out. Please don't do it a 4th time.

Try with the 3.5.0 rc4 sources:

https://download.osgeo.org/gdal/3.5.0/gdal-3.5.0rc4.tar.gz

Even

Le 11/05/2022 à 21:26, Pei JIA a écrit :
> 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 -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description: Ubuntu 22.04 LTS
> Release: 22.04
> Codename: jammy
> ➜  ~ gcc --version
> gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
> Copyright (C) 2021 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; 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.marks
> make  -f CMakeFiles/Makefile2 all
> make[1]: Entering directory '....../GDAL/build'
> make  -f CMakeFiles/generate_gdal_version_h.dir/build.make 
> CMakeFiles/generate_gdal_version_h.dir/depend
> make[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/build
> make[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 1
> make[2]: Leaving directory '....../GDAL/build'
> make[1]: *** [CMakeFiles/Makefile2:4367: 
> CMakeFiles/generate_gdal_version_h.dir/all] Error 2
> make[1]: Leaving directory '....../GDAL/build'
> make: *** [Makefile:149: all] Error 2
>
> ****  Installation failed. Aborting package creation.
>
> Restoring overwritten files from backup...OK
>
> Cleaning up...OK
>
> Bye./
>
>
> Cheers
>
> On Wed, May 11, 2022 at 12:25 PM Pei JIA <jp4work at gmail.com> wrote:
>
>
>     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 -a
>     No LSB modules are available.
>     Distributor ID: Ubuntu
>     Description: Ubuntu 22.04 LTS
>     Release: 22.04
>     Codename: jammy
>     ➜  ~ gcc --version
>     gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
>     Copyright (C) 2021 Free Software Foundation, Inc.
>     This is free software; see the source for copying conditions. 
>     There is NO
>     warranty; 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.marks
>     make  -f CMakeFiles/Makefile2 all
>     make[1]: Entering directory '....../GDAL/build'
>     make  -f CMakeFiles/generate_gdal_version_h.dir/build.make
>     CMakeFiles/generate_gdal_version_h.dir/depend
>     make[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/build
>     make[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 1
>     make[2]: Leaving directory '....../GDAL/build'
>     make[1]: *** [CMakeFiles/Makefile2:4367:
>     CMakeFiles/generate_gdal_version_h.dir/all] Error 2
>     make[1]: Leaving directory '....../GDAL/build'
>     make: *** [Makefile:149: all] Error 2
>
>     ****  Installation failed. Aborting package creation.
>
>     Restoring overwritten files from backup...OK
>
>     Cleaning up...OK
>
>     Bye./
>
>
>     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
>
>
>
> -- 
>
> 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
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220511/75d7ab52/attachment-0001.htm>


More information about the gdal-dev mailing list