Цель: установить Spaceite в Centos 7 без root доступа
В качестве предварительного условия
- Я также установил g cc (G CC) 10.2 .0, и он работает с образцом helloworld. c
- sqlite3
Мне не хватает спецификации PATH или ожидаемого тестового файла conftest. c, я думаю, но могу 'Не понимаю после +20 попыток, так как я новичок в установке пакетов под UNIX.
Скрипт для установки Spaceite
#!/bin/bash
# define a root directory for downloading packages
root=$HOME/gdal_temp
# define a directory for download and unpacked packages
downloaddir=${root}/originals
packagedir=${root}/packages
installdir=$HOME/gdal
threads=2 # I've 12 threads available in 6 cores
#######################################################
# setup environment variables
export PATH=${installdir}/bin:$PATH
export CPATH=${installdir}/include:$CPATH
export LDFLAGS=${installdir}/lib:${installdir}/lib64:/usr/lib:$LDFLAGS
export LD_LIBRARY_PATH=${installdir}/lib:${installdir}/lib64:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=${installdir}/lib:${installdir}/lib64:$PKG_CONFIG_PATH
export DSQLITE3_INCLUDE_DIR=${installdir}/include:$DSQLITE3_INCLUDE_DIR
export DSQLITE3_LIBRARY=${installdir}/lib:$DSQLITE3_LIBRARY
export CFLAGS=${installdir}/include:$CFLAGS
#######################################################
# download and unpack
cd ${downloaddir}
wget http://www.gaia-gis.it/gaia-sins/libspatialite-4.3.0a.tar.gz
rm -r ${packagedir}/libspatialite*/
for package in ${downloaddir}/libspatialite*.tar.gz; do
tar xfvz ${package} -C ${packagedir}
done
#######################################################
# install spatialite
cd ${packagedir}/libspatialite*
# PROJ now uses a new API, using the old deprecated one (as done by spatialite) needs to be indicated explicitly
./configure --prefix=${installdir} LDFLAGS=-static CC=${installdir}/bin/gcc
# CFLAGS=-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
make check
#make -j${threads}
#make install
exit
Ошибка
checking for gcc... $installdir/bin/gcc
checking whether the C compiler works... no
configure: error: in `${packagedir}/libspatialite-4.3.0a':
configure: error: C compiler cannot create executables
See `config.log' for more details
Config.log (основная часть с ошибкой)
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2516: checking for a BSD-compatible install
configure:2584: result: /usr/bin/install -c
configure:2595: checking whether build environment is sane
configure:2650: result: yes
configure:2688: WARNING: 'missing' script is too old or missing
configure:2801: checking for a thread-safe mkdir -p
configure:2840: result: /usr/bin/mkdir -p
configure:2847: checking for gawk
configure:2863: found /usr/bin/gawk
configure:2874: result: gawk
configure:2885: checking whether make sets $(MAKE)
configure:2907: result: yes
configure:2936: checking whether make supports nested variables
configure:2953: result: yes
configure:3080: checking whether to enable maintainer-specific portions of Makefiles
configure:3089: result: no
configure:3151: checking for style of include used by make
configure:3179: result: GNU
configure:3250: checking for gcc
configure:3277: result: $HOME/gdal/bin/gcc
configure:3506: checking for C compiler version
configure:3515: $HOME/gdal/bin/gcc --version >&5
gcc (GCC) 10.2.0
Copyright (C) 2020 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.
configure:3526: $? = 0
configure:3515: $HOME/gdal/bin/gcc -v >&5
Using built-in specs.
COLLECT_GCC=$HOME/gdal/bin/gcc
COLLECT_LTO_WRAPPER=$HOME/gdal/libexec/gcc/x86_64-pc-linux-gnu/10.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ./configure --prefix=$HOME/gdal --disable-multilib --enable-languages=c,c++
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.2.0 (GCC)
configure:3526: $? = 0
configure:3546: checking whether the C compiler works
configure:3568: $HOME/gdal/bin/gcc $HOME/gdal/include: -static conftest.c >&5
gcc: error: $HOME/gdal/include:: No such file or directory
configure:3572: $? = 1
configure:3610: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libspatialite"
| #define PACKAGE_TARNAME "libspatialite"
| #define PACKAGE_VERSION "4.3.0a"
| #define PACKAGE_STRING "libspatialite 4.3.0a"
| #define PACKAGE_BUGREPORT "a.furieri@lqt.it"
| #define PACKAGE_URL ""
| #define PACKAGE "libspatialite"
| #define VERSION "4.3.0a"
| #define _LARGE_FILE 1
| #define _FILE_OFFSET_BITS 64
| #define _LARGEFILE_SOURCE 1
| #define NDEBUG 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3615: error: in `$HOME/gdal_temp/packages/libspatialite-4.3.0a':
configure:3617: error: C compiler cannot create executables
See `config.log' for more details
Вопрос
Похоже, он жалуется на то, что не получил путь (g cc) или файл (conftest. c). Как я понял здесь:
gcc version 10.2.0 (GCC)
configure:3526: $? = 0
configure:3546: checking whether the C compiler works
configure:3568: $HOME/gdal/bin/gcc $HOME/gdal/include: -static conftest.c >&5
gcc: error: $HOME/gdal/include:: No such file or directory
Если у кого-то уже есть опыт в этом или он может дать руководство, ваша помощь будет очень признательна. Спасибо