无法在Ubuntu 22.04上安装它,而GCC-11.2
全部:
我成功地配置和构建了 gdal-3.4.3 ,但未能在 ubuntu 22.04 上安装它,使用 gcc-11.2 ,
我的< strong> env :
➜ ~ 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.
我的安装结果:
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.
实际上,文件的第27行......../gdal/cmake/helpers/generate_gdal_version_h.cmake
is string(substring $ { gdal_git_hash} 0 10 rev)
,对我来说看起来还不错...
有人遇到了同一问题吗?
all:
I successfully configured and built gdal-3.4.3, but failed to install it on Ubuntu 22.04, with gcc-11.2,
My ENV:
➜ ~ 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.
my installation outcome:
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.
Actually, line 27 of file ....../GDAL/cmake/helpers/generate_gdal_version_h.cmake
is string(SUBSTRING ${GDAL_GIT_HASH} 0 10 REV)
, it looks okay to me...
Did anybody meet the same issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论