[gdal-dev] ${GDAL_GIT_HASH} is not properly initialized

Jorge Gustavo Rocha jgr at osgeopt.pt
Thu May 5 12:35:20 PDT 2022


Hi,

I'm compiling GDAl on local master, on Ubuntu, using default git.

cmake is working, but I'm not able to install gdal afterwards.

For some reason, when I run:
sudo make install
or
sudo cmake --build . --target install

I get the following error:

-- Found Git: /usr/bin/git (found version "2.32.0")
CMake Error at 
/home/jgr/dev/cpp/gdal/cmake/helpers/generate_gdal_version_h.cmake:27 
(string):
   string sub-command SUBSTRING requires four arguments.


gmake[2]: *** [CMakeFiles/generate_gdal_version_h.dir/build.make:76: 
CMakeFiles/generate_gdal_version_h] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:4283: 
CMakeFiles/generate_gdal_version_h.dir/all] Error 2
gmake: *** [Makefile:160: all] Error 2

Looking into cmake/helpers/generate_gdal_version_h.cmake it seems to me 
that ${GDAL_GIT_HASH} is not properly initialized.

I was compiling on local master. It seems that get_git_head_revision is 
not working properly, based on the parameters received.

Does anybody noticed this issue when installing?

Regards,

Jorge


More information about the gdal-dev mailing list