Configure error proj 6 symbols not found

Bug while building gdal from sources: configure: error: PROJ 6 symbols not found Steps to reproduce the problem. cd /opt git clone https://github.com/OSGeo/proj.4.git cd proj.4 ./configure make $ s...

Bug while building gdal from sources:
configure: error: PROJ 6 symbols not found

Steps to reproduce the problem.

cd /opt
git clone https://github.com/OSGeo/proj.4.git
cd proj.4
./configure
make
$ sudo checkinstall

Then;

cd /opt
git clone https://github.com/OSGeo/gdal.git
cd gdal/gdal
./configure
make

Operating system

Ubuntu 18.04 64 bit (4.15.0-45-generic x86_64 GNU/Linux)

GDAL version and provenance

From source (master).

GDAL build logs:

Here is the ./configure log:

$ ./configure 
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking C_WFLAGS for maximum warnings... -Wall -Wdeclaration-after-statement
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking CXX_WFLAGS for maximum warnings... -Wall
checking whether C compiler accepts -Werror -we10006... no
checking whether C compiler accepts -diag-disable 188,1684,2259,2304,3280,11074,11076... no
checking whether C compiler accepts -Wextra... yes
checking whether C compiler accepts -Winit-self... yes
checking whether C compiler accepts -Wunused-parameter... yes
checking whether C compiler accepts -Wmissing-prototypes... yes
checking whether C compiler accepts -Wmissing-declarations... yes
checking whether C compiler accepts -Wformat... yes
checking whether C compiler accepts -Wformat -Werror=format-security -Wno-format-nonliteral... yes
checking whether C compiler accepts -Wshorten-64-to-32... no
checking whether C compiler accepts -Wlogical-op... yes
checking whether C compiler accepts -Wshadow... yes
checking whether C compiler accepts -Werror=vla... yes
checking whether C compiler accepts -Werror=declaration-after-statement... yes
checking whether C compiler accepts -Wdate-time... yes
checking whether C compiler accepts -Wnull-dereference... yes
checking whether C compiler accepts -Wduplicated-cond... yes
checking whether C++ compiler accepts -Wextra-semi... no
checking whether C compiler accepts -Wno-sign-compare... yes
checking whether C compiler accepts -Wcomma... no
checking whether C compiler accepts -Wfloat-conversion... yes
checking whether C compiler accepts -Wdocumentation -Wno-documentation-deprecated-sync... no
checking if -std=gnu89 can be enabled... yes
checking whether C++ compiler accepts -Wunused-private-field... no
checking whether C++ compiler accepts -Wmissing-prototypes... no
checking whether C++ compiler accepts -Wmissing-declarations... yes
checking whether C++ compiler accepts -Wnon-virtual-dtor... yes
checking whether C++ compiler accepts -Wold-style-cast... yes
checking whether C++ compiler accepts -Weffc++... yes
checking if -Weffc++ should be enabled... yes
checking whether C++ compiler accepts -Woverloaded-virtual... yes
checking whether C++ compiler accepts -fno-operator-names... yes
checking whether C++ compiler accepts -Wzero-as-null-pointer-constant... yes
checking if use C++14 compiler options... disabled by user
checking whether g++ supports C++11 features by default... yes
checking whether C++ compiler accepts -Wsuggest-override... yes
checking if -Wimplicit-fallthrough can be enabled... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %sn
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... gawk
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for std::isnan... yes
checking for dlopen in -ldl... yes
checking for nanosleep in -lrt... yes
checking for sin in -lm... yes
checking for ANSI C header files... (cached) yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking dbmalloc.h usability... no
checking dbmalloc.h presence... no
checking for dbmalloc.h... no
checking for dlfcn.h... (cached) yes
checking for stdint.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking values.h usability... yes
checking values.h presence... yes
checking for values.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking direct.h usability... no
checking direct.h presence... no
checking for direct.h... no
checking linux/userfaultfd.h usability... yes
checking linux/userfaultfd.h presence... yes
checking for linux/userfaultfd.h... yes
checking whether byte ordering is bigendian... no
checking for 64bit integer type... long long
checking for 64bit file io... yes
checking for stat64... yes
checking for fopen64... yes
checking for ftruncate64... yes
checking size of int... 4
checking size of unsigned long... 8
checking size of void*... 8
checking for int8... no
checking for int16... no
checking for int32... no
checking for uintptr_t... yes
checking native cpu bit order... lsb2msb
checking for vprintf... yes
checking for _doprnt... no
checking for snprintf... yes
checking for vsnprintf... yes
checking for atoll... yes
checking for strtoull... yes
checking for strtof... yes
checking for getcwd... yes
checking whether strtof is declared... yes
checking for readlink... yes
checking for lstat... yes
checking for posix_spawnp... yes
checking for posix_memalign... yes
checking for vfork... yes
checking for mmap... yes
checking for sigaction... yes
checking for statvfs... yes
checking for statvfs64... yes
checking for getrlimit... yes
checking for RLIMIT_AS... yes
checking for gmtime_r... yes
checking for localtime_r... yes
checking for uselocale... yes
checking to enable debug build... no, CFLAGS="-g -O2"
checking whether GCC 4.1 atomic builtins are available... yes
checking whether GCC bswap builtins are available... yes
checking for __uint128_t... yes
checking whether SSE is available at compile time... yes
checking whether SSSE3 is available at compile time... yes
checking whether AVX is available at compile time... yes
checking to enable LTO (link time optimization) build... no
checking whether we should hide internal symbols... no
checking for local include/lib path... none
checking for pthread_create in -lpthread... yes
checking for PTHREAD_MUTEX_RECURSIVE... yes
checking for PTHREAD_MUTEX_ADAPTIVE_NP... yes
checking for pthread_spinlock_t... yes
checking for 5 args mremap()... yes
checking for _SC_PHYS_PAGES... yes
checking for deflateInit_ in -lz... yes
checking for inflateCopy in -lz... yes
using pre-installed libz
checking for ld used by GCC... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking for shared library run path origin... /bin/bash: ./config.rpath: No such file or directory
done
checking for iconv... yes
checking for working iconv... yes
checking for iconv declaration... 
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
using ICONV_CPP_CONST=""
checking for PROJ >= 6 library... checking for proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -linternalproj... no
configure: error: PROJ 6 symbols not found

and the make log (the error message is at the end):

$ make -j4
./config.status --recheck
running CONFIG_SHELL=/bin/bash /bin/bash ./configure --no-create --no-recursion
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking C_WFLAGS for maximum warnings... -Wall -Wdeclaration-after-statement
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking CXX_WFLAGS for maximum warnings... -Wall
checking whether C compiler accepts -Werror -we10006... no
checking whether C compiler accepts -diag-disable 188,1684,2259,2304,3280,11074,11076... no
checking whether C compiler accepts -Wextra... yes
checking whether C compiler accepts -Winit-self... yes
checking whether C compiler accepts -Wunused-parameter... yes
checking whether C compiler accepts -Wmissing-prototypes... yes
checking whether C compiler accepts -Wmissing-declarations... yes
checking whether C compiler accepts -Wformat... yes
checking whether C compiler accepts -Wformat -Werror=format-security -Wno-format-nonliteral... yes
checking whether C compiler accepts -Wshorten-64-to-32... no
checking whether C compiler accepts -Wlogical-op... yes
checking whether C compiler accepts -Wshadow... yes
checking whether C compiler accepts -Werror=vla... yes
checking whether C compiler accepts -Werror=declaration-after-statement... yes
checking whether C compiler accepts -Wdate-time... yes
checking whether C compiler accepts -Wnull-dereference... yes
checking whether C compiler accepts -Wduplicated-cond... yes
checking whether C++ compiler accepts -Wextra-semi... no
checking whether C compiler accepts -Wno-sign-compare... yes
checking whether C compiler accepts -Wcomma... no
checking whether C compiler accepts -Wfloat-conversion... yes
checking whether C compiler accepts -Wdocumentation -Wno-documentation-deprecated-sync... no
checking if -std=gnu89 can be enabled... yes
checking whether C++ compiler accepts -Wunused-private-field... no
checking whether C++ compiler accepts -Wmissing-prototypes... no
checking whether C++ compiler accepts -Wmissing-declarations... yes
checking whether C++ compiler accepts -Wnon-virtual-dtor... yes
checking whether C++ compiler accepts -Wold-style-cast... yes
checking whether C++ compiler accepts -Weffc++... yes
checking if -Weffc++ should be enabled... yes
checking whether C++ compiler accepts -Woverloaded-virtual... yes
checking whether C++ compiler accepts -fno-operator-names... yes
checking whether C++ compiler accepts -Wzero-as-null-pointer-constant... yes
checking if use C++14 compiler options... disabled by user
checking whether g++ supports C++11 features by default... yes
checking whether C++ compiler accepts -Wsuggest-override... yes
checking if -Wimplicit-fallthrough can be enabled... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %sn
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... gawk
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for std::isnan... yes
checking for dlopen in -ldl... yes
checking for nanosleep in -lrt... yes
checking for sin in -lm... yes
checking for ANSI C header files... (cached) yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking dbmalloc.h usability... no
checking dbmalloc.h presence... no
checking for dbmalloc.h... no
checking for dlfcn.h... (cached) yes
checking for stdint.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking values.h usability... yes
checking values.h presence... yes
checking for values.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking direct.h usability... no
checking direct.h presence... no
checking for direct.h... no
checking linux/userfaultfd.h usability... yes
checking linux/userfaultfd.h presence... yes
checking for linux/userfaultfd.h... yes
checking whether byte ordering is bigendian... no
checking for 64bit integer type... long long
checking for 64bit file io... yes
checking for stat64... yes
checking for fopen64... yes
checking for ftruncate64... yes
checking size of int... 4
checking size of unsigned long... 8
checking size of void*... 8
checking for int8... no
checking for int16... no
checking for int32... no
checking for uintptr_t... yes
checking native cpu bit order... lsb2msb
checking for vprintf... yes
checking for _doprnt... no
checking for snprintf... yes
checking for vsnprintf... yes
checking for atoll... yes
checking for strtoull... yes
checking for strtof... yes
checking for getcwd... yes
checking whether strtof is declared... yes
checking for readlink... yes
checking for lstat... yes
checking for posix_spawnp... yes
checking for posix_memalign... yes
checking for vfork... yes
checking for mmap... yes
checking for sigaction... yes
checking for statvfs... yes
checking for statvfs64... yes
checking for getrlimit... yes
checking for RLIMIT_AS... yes
checking for gmtime_r... yes
checking for localtime_r... yes
checking for uselocale... yes
checking to enable debug build... no, CFLAGS="-g -O2"
checking whether GCC 4.1 atomic builtins are available... yes
checking whether GCC bswap builtins are available... yes
checking for __uint128_t... yes
checking whether SSE is available at compile time... yes
checking whether SSSE3 is available at compile time... yes
checking whether AVX is available at compile time... yes
checking to enable LTO (link time optimization) build... no
checking whether we should hide internal symbols... no
checking for local include/lib path... none
checking for pthread_create in -lpthread... yes
checking for PTHREAD_MUTEX_RECURSIVE... yes
checking for PTHREAD_MUTEX_ADAPTIVE_NP... yes
checking for pthread_spinlock_t... yes
checking for 5 args mremap()... yes
checking for _SC_PHYS_PAGES... yes
checking for deflateInit_ in -lz... yes
checking for inflateCopy in -lz... yes
using pre-installed libz
checking for ld used by GCC... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking for shared library run path origin... /bin/bash: ./config.rpath: No such file or directory
done
checking for iconv... yes
checking for working iconv... yes
checking for iconv declaration... 
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
using ICONV_CPP_CONST=""
checking for PROJ >= 6 library... checking for proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -linternalproj... no
configure: error: PROJ 6 symbols not found
GNUmakefile:159: recipe for target 'config.status' failed
make: *** [config.status] Error 1

Just a comment on this. I am testing on CentOs 8 and I have Installed this proj packges using yum

proj72-debuginfo-7.2.0-1.rhel8.x86_64
proj72-7.2.0-1.rhel8.x86_64
proj72-devel-7.2.0-1.rhel8.x86_64
proj72-debugsource-7.2.0-1.rhel8.x86_64
proj72-static-7.2.0-1.rhel8.x86_64

On release HEAD detached at v3.2.0 I try to compile , so I run

./configure —with-pgconfig=/usr/pgsql-12/bin/pg_config —with-geosconfig=/usr/geos38/bin/geos-config —with-projdir=/usr/proj72 —with-raster —with-python

In the console I see this

checking for PROJ >= 6 library... checking for proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -linternalproj... no
configure: error: PROJ 6 symbols not found


The log is attached
config.log

To resolve this I had to to checkout PROJ and build and install that On branch 7.2 and then run

./configure —with-pgconfig=/usr/pgsql-12/bin/pg_config —with-geosconfig=/usr/geos38/bin/geos-config —with-projdir=/usr/proj72 —with-raster —with-python

And then error message was gone.

err tip is :

checking for PROJ >= 6 library... checking for proj_create_from_wkt in -lproj... no
checking for proj_create_from_wkt in -lproj... no
checking for proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -linternalproj... no
checking for internal_proj_create_from_wkt in -linternalproj... (cached) no
configure: error: PROJ 6 symbols not found

The config detail info is:

configure:19168: result: no, consider installing GNU libiconv
configure:19414: Bash completions not requested
configure:19564: checking for PROJ >= 6 library
configure:19794: checking for proj_create_from_wkt in -lproj
configure:19819: arm-linux-androideabi-g++ -std=c++11 -o conftest -mthumb -fPIC -fvisibility=hidden  -march=armv7-a -Wl,--fix-cortex-a8 conftest.cpp -lproj  -L/usr/local//lib -lproj -lsqlite3   -lm -ldl -lsupc++ -lstdc++ >&5
/home/tang/android-toolchain/arm/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /usr/local//lib/libproj.so while searching for proj
/home/tang/android-toolchain/arm/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lproj
/home/tang/android-toolchain/arm/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /usr/local//lib/libproj.so while searching for proj
/home/tang/android-toolchain/arm/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lproj
/home/tang/android-toolchain/arm/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /usr/local//lib/libsqlite3.so while searching for sqlite3
/home/tang/android-toolchain/arm/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lsqlite3
/tmp/ccC8sqRS.o:conftest.cpp:function main: error: undefined reference to 'proj_create_from_wkt'
collect2: error: ld returned 1 exit status

I am very confused that i hava install proj and sqlite3 already!
The proj info is below:

[email protected]:~$ proj
Rel. 6.3.2, May 1st, 2020
usage: proj [-bdeEfiIlmorsStTvVwW [args]] [+opt[=arg] ...] [file ...]

besides,i am very sure that i have tried many times to test configure file,bellow:

CFLAGS="-mthumb" CXXFLAGS="-mthumb" LIBS="-lsupc++ -lstdc++" ./configure --prefix=/home/tang/gdal/Android --host=arm-linux-androideabi --with-proj=/usr/local/include --with-unix-stdio-64=no --with-ogr --with-geos --with-hide-internal-symbols --with-libz=internal --with-threads --without-bsb --without-cfitsio --without-cryptopp --without-curl --without-dwgdirect --without-ecw --without-expat --without-fme --without-freexl --without-gif --without-gif --without-gnm --without-grass --without-grib --without-hdf4 --without-hdf5 --without-idb --without-ingres --without-jasper --without-jp2mrsid --without-jpeg --without-kakadu --without-libgrass --without-libkml --without-libtool --without-mrf --without-mrsid --without-mysql --without-netcdf --without-odbc --without-ogdi --without-openjpeg --without-pcidsk --without-pcraster --without-pcre --without-perl --without-pg --without-php --without-png --without-python --without-qhull --without-sde --without-sqlite3 --without-webp --without-xerces --without-xml2
$ docker run -it --rm  --name python3.10.7  python:3.10.7-bullseye bash
# pip install -U pip setuptools wheel numpy
# pip install -U gdal-utils
Collecting gdal-utils
  Downloading gdal_utils-3.5.2.0-py3-none-any.whl (317 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 317.9/317.9 kB 9.6 MB/s eta 0:00:00
Collecting gdal
  Downloading GDAL-3.5.2.tar.gz (756 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 756.8/756.8 kB 47.2 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [125 lines of output]
      running egg_info
      creating /tmp/pip-pip-egg-info-1lxdd00u/GDAL.egg-info
      writing /tmp/pip-pip-egg-info-1lxdd00u/GDAL.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-pip-egg-info-1lxdd00u/GDAL.egg-info/dependency_links.txt
      writing requirements to /tmp/pip-pip-egg-info-1lxdd00u/GDAL.egg-info/requires.txt
      writing top-level names to /tmp/pip-pip-egg-info-1lxdd00u/GDAL.egg-info/top_level.txt
      writing manifest file '/tmp/pip-pip-egg-info-1lxdd00u/GDAL.egg-info/SOURCES.txt'
      Traceback (most recent call last):
        File "/tmp/pip-install-28tlclgk/gdal_a74744f5132a4632bf083aa6eda30dcd/setup.py", line 105, in fetch_config
          p = subprocess.Popen([command, args], stdout=subprocess.PIPE)
        File "/usr/local/lib/python3.10/subprocess.py", line 969, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "/usr/local/lib/python3.10/subprocess.py", line 1845, in _execute_child
          raise child_exception_type(errno_num, err_msg, err_filename)
      FileNotFoundError: [Errno 2] No such file or directory: '../../apps/gdal-config'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/tmp/pip-install-28tlclgk/gdal_a74744f5132a4632bf083aa6eda30dcd/setup.py", line 187, in get_gdal_config
          return fetch_config(option, gdal_config=self.gdal_config)
        File "/tmp/pip-install-28tlclgk/gdal_a74744f5132a4632bf083aa6eda30dcd/setup.py", line 108, in fetch_config
          raise gdal_config_error(e)
      __main__.gdal_config_error: [Errno 2] No such file or directory: '../../apps/gdal-config'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/tmp/pip-install-28tlclgk/gdal_a74744f5132a4632bf083aa6eda30dcd/setup.py", line 105, in fetch_config
          p = subprocess.Popen([command, args], stdout=subprocess.PIPE)
        File "/usr/local/lib/python3.10/subprocess.py", line 969, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "/usr/local/lib/python3.10/subprocess.py", line 1845, in _execute_child
          raise child_exception_type(errno_num, err_msg, err_filename)
      FileNotFoundError: [Errno 2] No such file or directory: 'gdal-config'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/tmp/pip-install-28tlclgk/gdal_a74744f5132a4632bf083aa6eda30dcd/setup.py", line 194, in get_gdal_config
          return fetch_config(option)
        File "/tmp/pip-install-28tlclgk/gdal_a74744f5132a4632bf083aa6eda30dcd/setup.py", line 108, in fetch_config
          raise gdal_config_error(e)
      __main__.gdal_config_error: [Errno 2] No such file or directory: 'gdal-config'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-28tlclgk/gdal_a74744f5132a4632bf083aa6eda30dcd/setup.py", line 388, in <module>
          setup(**setup_kwargs)
        File "/usr/local/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_commands
          self.run_command(cmd)
        File "/usr/local/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
          cmd_obj.run()
        File "/usr/local/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 308, in run
          self.find_sources()
        File "/usr/local/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 316, in find_sources
          mm.run()
        File "/usr/local/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 560, in run
          self.add_defaults()
        File "/usr/local/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 597, in add_defaults
          sdist.add_defaults(self)
        File "/usr/local/lib/python3.10/site-packages/setuptools/command/sdist.py", line 106, in add_defaults
          super().add_defaults()
        File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 252, in add_defaults
          self._add_defaults_ext()
        File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext
          build_ext = self.get_finalized_command('build_ext')
        File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 306, in get_finalized_command
          cmd_obj.ensure_finalized()
        File "/usr/local/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 109, in ensure_finalized
          self.finalize_options()
        File "/tmp/pip-install-28tlclgk/gdal_a74744f5132a4632bf083aa6eda30dcd/setup.py", line 257, in finalize_options
          self.gdaldir = self.get_gdal_config('prefix')
        File "/tmp/pip-install-28tlclgk/gdal_a74744f5132a4632bf083aa6eda30dcd/setup.py", line 200, in get_gdal_config
          raise gdal_config_error(traceback_string + 'n' + msg)
      __main__.gdal_config_error: Traceback (most recent call last):
        File "/tmp/pip-install-28tlclgk/gdal_a74744f5132a4632bf083aa6eda30dcd/setup.py", line 105, in fetch_config
          p = subprocess.Popen([command, args], stdout=subprocess.PIPE)
        File "/usr/local/lib/python3.10/subprocess.py", line 969, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "/usr/local/lib/python3.10/subprocess.py", line 1845, in _execute_child
          raise child_exception_type(errno_num, err_msg, err_filename)
      FileNotFoundError: [Errno 2] No such file or directory: '../../apps/gdal-config'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/tmp/pip-install-28tlclgk/gdal_a74744f5132a4632bf083aa6eda30dcd/setup.py", line 187, in get_gdal_config
          return fetch_config(option, gdal_config=self.gdal_config)
        File "/tmp/pip-install-28tlclgk/gdal_a74744f5132a4632bf083aa6eda30dcd/setup.py", line 108, in fetch_config
          raise gdal_config_error(e)
      gdal_config_error: [Errno 2] No such file or directory: '../../apps/gdal-config'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/tmp/pip-install-28tlclgk/gdal_a74744f5132a4632bf083aa6eda30dcd/setup.py", line 105, in fetch_config
          p = subprocess.Popen([command, args], stdout=subprocess.PIPE)
        File "/usr/local/lib/python3.10/subprocess.py", line 969, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "/usr/local/lib/python3.10/subprocess.py", line 1845, in _execute_child
          raise child_exception_type(errno_num, err_msg, err_filename)
      FileNotFoundError: [Errno 2] No such file or directory: 'gdal-config'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/tmp/pip-install-28tlclgk/gdal_a74744f5132a4632bf083aa6eda30dcd/setup.py", line 194, in get_gdal_config
          return fetch_config(option)
        File "/tmp/pip-install-28tlclgk/gdal_a74744f5132a4632bf083aa6eda30dcd/setup.py", line 108, in fetch_config
          raise gdal_config_error(e)
      gdal_config_error: [Errno 2] No such file or directory: 'gdal-config'
      
      Could not find gdal-config. Make sure you have installed the GDAL native library and development headers.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
# apt-get -y update 
  && DEBIAN_FRONTEND=noninteractive apt-get install -y --fix-missing --no-install-recommends 
  gcc-10-base libgcc-10-dev software-properties-common build-essential ca-certificates 
  automake python3-distutils proj-bin gdal-bin libproj-dev proj-data libgeos-dev libgdal-dev
# pip install -U gdal
Collecting gdal
  Using cached GDAL-3.5.2.tar.gz (756 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: gdal
  Building wheel for gdal (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [848 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-310
      creating build/lib.linux-x86_64-cpython-310/osgeo
      copying osgeo/gdalconst.py -> build/lib.linux-x86_64-cpython-310/osgeo
      copying osgeo/gdal_array.py -> build/lib.linux-x86_64-cpython-310/osgeo
      copying osgeo/gnm.py -> build/lib.linux-x86_64-cpython-310/osgeo
      copying osgeo/gdal.py -> build/lib.linux-x86_64-cpython-310/osgeo
      copying osgeo/gdalnumeric.py -> build/lib.linux-x86_64-cpython-310/osgeo
      copying osgeo/ogr.py -> build/lib.linux-x86_64-cpython-310/osgeo
      copying osgeo/osr.py -> build/lib.linux-x86_64-cpython-310/osgeo
      copying osgeo/__init__.py -> build/lib.linux-x86_64-cpython-310/osgeo
      copying osgeo/utils.py -> build/lib.linux-x86_64-cpython-310/osgeo
      creating build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdalcompare.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal_proximity.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/rgb2pct.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal_calc.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal_edit.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/pct2rgb.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal_pansharpen.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/ogrmerge.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdalmove.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal2xyz.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal_polygonize.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdalattachpct.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal_merge.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal2tiles.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal_fillnodata.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal_sieve.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal_retile.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/__init__.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      creating build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_auth.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/crs2crs2grid.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/tigerpoly.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_rmdir.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdalcopyproj.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/vec_tr_spat.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/validate_jp2.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_lut.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/dump_jp2.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/ogrinfo.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_ls.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gcps2ogr.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/ogr_layer_algebra.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/val_repl.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/ogr2vrt.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_cp.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/build_jp2_from_xml.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/validate_gpkg.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/wcs_virtds_params.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/hsv_merge.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_vrtmerge.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/load2odbc.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/magphase.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gcps2vec.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/make_fuzzer_friendly_archive.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/jpeg_in_tiff_extract.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/tile_extent_from_raster.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_remove_towgs84.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/rel.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/histrep.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal2grd.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/ogr_build_junction_table.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/fft.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdalinfo.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/ogr2ogr.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/fix_gpkg.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdallocationinfo.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/ogrupdate.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/assemblepoly.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/tolatlong.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_mkdir.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/get_soundg.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/epsg_tr.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/ogr_dispatch.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/densify.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdalchksum.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/validate_cloud_optimized_geotiff.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdalident.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/classify.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/vec_tr.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/__init__.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/esri2wkt.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_rm.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_create_pdf.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_zip.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gcps2wld.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdalfilter.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/loslas2ntv2.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdalimport.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/mkgraticule.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      creating build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/base.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/extent_util.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/gdal_argparse.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/rectangle.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/progress.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/batch_creator.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/util.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/array_util.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/osr_util.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/color_palette.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/numpy_util.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/raster_creation.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/color_table.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/__init__.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      running build_ext
      gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/local/include/python3.10 -I/usr/local/lib/python3.10/site-packages/numpy/core/include -I/usr/include -c gdal_python_cxx11_test.cpp -o gdal_python_cxx11_test.o
      building 'osgeo._gdal' extension
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/extensions
      
      <plenty of C errors>
      
      g++ -pthread -shared build/temp.linux-x86_64-cpython-310/extensions/gnm_wrap.o -L../../.libs -L../../ -L/usr/local/lib -L/usr/lib -lgdal -o build/lib.linux-x86_64-cpython-310/osgeo/_gnm.cpython-310-x86_64-linux-gnu.so
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for gdal
  Running setup.py clean for gdal
Failed to build gdal
Installing collected packages: gdal
  Running setup.py install for gdal ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for gdal did not run successfully.
  │ exit code: 1
  ╰─> [850 lines of output]
      running install
      /usr/local/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-310
      creating build/lib.linux-x86_64-cpython-310/osgeo
      copying osgeo/gdalconst.py -> build/lib.linux-x86_64-cpython-310/osgeo
      copying osgeo/gdal_array.py -> build/lib.linux-x86_64-cpython-310/osgeo
      copying osgeo/gnm.py -> build/lib.linux-x86_64-cpython-310/osgeo
      copying osgeo/gdal.py -> build/lib.linux-x86_64-cpython-310/osgeo
      copying osgeo/gdalnumeric.py -> build/lib.linux-x86_64-cpython-310/osgeo
      copying osgeo/ogr.py -> build/lib.linux-x86_64-cpython-310/osgeo
      copying osgeo/osr.py -> build/lib.linux-x86_64-cpython-310/osgeo
      copying osgeo/__init__.py -> build/lib.linux-x86_64-cpython-310/osgeo
      copying osgeo/utils.py -> build/lib.linux-x86_64-cpython-310/osgeo
      creating build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdalcompare.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal_proximity.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/rgb2pct.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal_calc.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal_edit.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/pct2rgb.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal_pansharpen.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/ogrmerge.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdalmove.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal2xyz.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal_polygonize.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdalattachpct.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal_merge.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal2tiles.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal_fillnodata.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal_sieve.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/gdal_retile.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      copying gdal-utils/osgeo_utils/__init__.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils
      creating build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_auth.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/crs2crs2grid.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/tigerpoly.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_rmdir.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdalcopyproj.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/vec_tr_spat.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/validate_jp2.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_lut.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/dump_jp2.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/ogrinfo.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_ls.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gcps2ogr.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/ogr_layer_algebra.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/val_repl.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/ogr2vrt.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_cp.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/build_jp2_from_xml.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/validate_gpkg.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/wcs_virtds_params.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/hsv_merge.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_vrtmerge.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/load2odbc.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/magphase.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gcps2vec.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/make_fuzzer_friendly_archive.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/jpeg_in_tiff_extract.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/tile_extent_from_raster.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_remove_towgs84.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/rel.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/histrep.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal2grd.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/ogr_build_junction_table.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/fft.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdalinfo.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/ogr2ogr.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/fix_gpkg.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdallocationinfo.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/ogrupdate.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/assemblepoly.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/tolatlong.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_mkdir.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/get_soundg.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/epsg_tr.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/ogr_dispatch.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/densify.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdalchksum.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/validate_cloud_optimized_geotiff.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdalident.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/classify.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/vec_tr.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/__init__.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/esri2wkt.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_rm.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_create_pdf.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdal_zip.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gcps2wld.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdalfilter.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/loslas2ntv2.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/gdalimport.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      copying gdal-utils/osgeo_utils/samples/mkgraticule.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/samples
      creating build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/base.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/extent_util.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/gdal_argparse.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/rectangle.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/progress.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/batch_creator.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/util.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/array_util.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/osr_util.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/color_palette.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/numpy_util.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/raster_creation.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/color_table.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      copying gdal-utils/osgeo_utils/auxiliary/__init__.py -> build/lib.linux-x86_64-cpython-310/osgeo_utils/auxiliary
      running build_ext
      gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/local/include/python3.10 -I/usr/local/lib/python3.10/site-packages/numpy/core/include -I/usr/include -c gdal_python_cxx11_test.cpp -o gdal_python_cxx11_test.o
      building 'osgeo._gdal' extension
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/extensions
      gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/local/include/python3.10 -I/usr/local/lib/python3.10/site-packages/numpy/core/include -I/usr/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-cpython-310/extensions/gdal_wrap.o -I/usr/include/gdal
      building 'osgeo._gdalconst' extension
      
      <plenty of C errors>
      
      g++ -pthread -shared build/temp.linux-x86_64-cpython-310/extensions/gnm_wrap.o -L../../.libs -L../../ -L/usr/local/lib -L/usr/lib -lgdal -o build/lib.linux-x86_64-cpython-310/osgeo/_gnm.cpython-310-x86_64-linux-gnu.so
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> gdal

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Is it possible that I missed some basic steps (or package to install) in the installation of GDAL for Python 3.10.7 (Debian 11 based)?

Понравилась статья? Поделить с друзьями:
  • Configure error please reinstall readline i cannot find readline h
  • Configure error please install the libedit development package
  • Configure error please install gnu make it is required to build asterisk
  • Configure error perl module extutils embed is required
  • Configure error patch is required to configure bundled pjproject