[gdal-dev] Successfully built gdal 3.4.3 but failed to install with `sudo make install`

Pei JIA jp4work at gmail.com
Fri May 6 19:51:04 PDT 2022


Hi, all:

Finally, I successfully built gdal under Ubuntu 22.04, with gcc 11.2.
However, when I tried to install with `sudo make install`, I got
the following ERROR message:























*➜  build git:(master) ✗ sudo make install/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:4317:
CMakeFiles/generate_gdal_version_h.dir/all] Error 2make[1]: Leaving
directory '....../gdal/build'make: *** [Makefile:149: all] Error 2*



Line 27 of file *....../gdal/cmake/helpers/generate_gdal_version_h i*s :

*string(SUBSTRING ${GDAL_GIT_HASH} 0 10 REV)*

There are *ALREADY 4 arguments*.

Did anybody have the same issue ??


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/20220506/e939d01d/attachment.htm>


More information about the gdal-dev mailing list