在AWS ec2

时间:2018-06-15 13:50:43

标签: amazon-web-services amazon-ec2 gdal

尝试在AWS ec2 AMI上构建gdal 2.3.0时出现以下错误 - 更具体地说,在尝试创建目录时:

[ec2-user@ip-172-31-7-225 gdal-2.3.0]$ make -j4
(cd port; make)
(cd gcore; make generate_gdal_version_h)
rm -f gdal.pc
echo 'CONFIG_VERSION='`cat ./VERSION`'' >> gdal.pc
echo 'CONFIG_INST_PREFIX=/usr/local' >> gdal.pc
make[1]: Entering directory `/tmp/gdal-2.3.0/port'
/bin/sh /tmp/gdal-2.3.0/libtool --mode=compile --silent --tag=CXX g++ -std=c++11 -I/tmp/gdal-2.3.0/port -I/tmp/gdal-2.3.0/gcore -I/tmp/gdal-2.3.0/alg -I/tmp/gdal-2.3.0/ogr -I/tmp/gdal-2.3.0/ogr/ogrsf_frmts -I/tmp/gdal-2.3.0/gnm -I/tmp/gdal-2.3.0/apps -Wold-style-cast -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2  -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdate-time -Wnull-dereference -Wduplicated-cond -Wfloat-conversion -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -Wzero-as-null-pointer-constant  -DGNM_ENABLED -I/tmp/gdal-2.3.0/port -I/usr/include  -DGDAL_COMPILATION    -I/tmp/gdal-2.3.0/ogr/ogrsf_frmts/geojson/libjson  -DINST_DATA=\"/usr/local/share/gdal\" -DHAVE_CURL -DHAVE_LIBZ -I/usr/include/libxml2 -DHAVE_LIBXML2 -DUSE_ONLY_CRYPTODLL_ALG -DHAVE_OPENSSL_CRYPTO -c -o cpl_conv.lo cpl_conv.cpp
/bin/sh /tmp/gdal-2.3.0/libtool --mode=compile --silent --tag=CXX g++ -std=c++11 -I/tmp/gdal-2.3.0/port -I/tmp/gdal-2.3.0/gcore -I/tmp/gdal-2.3.0/alg -I/tmp/gdal-2.3.0/ogr -I/tmp/gdal-2.3.0/ogr/ogrsf_frmts -I/tmp/gdal-2.3.0/gnm -I/tmp/gdal-2.3.0/apps -Wold-style-cast -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2  -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdate-time -Wnull-dereference -Wduplicated-cond -Wfloat-conversion -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -Wzero-as-null-pointer-constant  -DGNM_ENABLED -I/tmp/gdal-2.3.0/port -I/usr/include  -DGDAL_COMPILATION    -I/tmp/gdal-2.3.0/ogr/ogrsf_frmts/geojson/libjson  -DINST_DATA=\"/usr/local/share/gdal\" -DHAVE_CURL -DHAVE_LIBZ -I/usr/include/libxml2 -DHAVE_LIBXML2 -DUSE_ONLY_CRYPTODLL_ALG -DHAVE_OPENSSL_CRYPTO -c -o cpl_error.lo cpl_error.cpp
echo 'CONFIG_INST_LIBS=-L/usr/local/lib -lgdal' >> gdal.pc
echo 'CONFIG_INST_CFLAGS=-I/usr/local/include' >> gdal.pc
echo 'CONFIG_INST_DATA=/usr/local/share/gdal/data' >> gdal.pc
cat gdal.pc.in >> gdal.pc
/bin/sh /tmp/gdal-2.3.0/libtool --mode=compile --silent --tag=CXX g++ -std=c++11 -I/tmp/gdal-2.3.0/port -I/tmp/gdal-2.3.0/gcore -I/tmp/gdal-2.3.0/alg -I/tmp/gdal-2.3.0/ogr -I/tmp/gdal-2.3.0/ogr/ogrsf_frmts -I/tmp/gdal-2.3.0/gnm -I/tmp/gdal-2.3.0/apps -Wold-style-cast -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2  -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdate-time -Wnull-dereference -Wduplicated-cond -Wfloat-conversion -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -Wzero-as-null-pointer-constant  -DGNM_ENABLED -I/tmp/gdal-2.3.0/port -I/usr/include  -DGDAL_COMPILATION    -I/tmp/gdal-2.3.0/ogr/ogrsf_frmts/geojson/libjson  -DINST_DATA=\"/usr/local/share/gdal\" -DHAVE_CURL -DHAVE_LIBZ -I/usr/include/libxml2 -DHAVE_LIBXML2 -DUSE_ONLY_CRYPTODLL_ALG -DHAVE_OPENSSL_CRYPTO -c -o cpl_string.lo cpl_string.cpp
make[1]: Entering directory `/tmp/gdal-2.3.0/gcore'
make[1]: Nothing to be done for `generate_gdal_version_h'.
make[1]: Leaving directory `/tmp/gdal-2.3.0/gcore'
/bin/sh /tmp/gdal-2.3.0/libtool --mode=compile --silent --tag=CXX g++ -std=c++11 -I/tmp/gdal-2.3.0/port -I/tmp/gdal-2.3.0/gcore -I/tmp/gdal-2.3.0/alg -I/tmp/gdal-2.3.0/ogr -I/tmp/gdal-2.3.0/ogr/ogrsf_frmts -I/tmp/gdal-2.3.0/gnm -I/tmp/gdal-2.3.0/apps -Wold-style-cast -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2  -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdate-time -Wnull-dereference -Wduplicated-cond -Wfloat-conversion -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -Wzero-as-null-pointer-constant  -DGNM_ENABLED -I/tmp/gdal-2.3.0/port -I/usr/include  -DGDAL_COMPILATION    -I/tmp/gdal-2.3.0/ogr/ogrsf_frmts/geojson/libjson  -DINST_DATA=\"/usr/local/share/gdal\" -DHAVE_CURL -DHAVE_LIBZ -I/usr/include/libxml2 -DHAVE_LIBXML2 -DUSE_ONLY_CRYPTODLL_ALG -DHAVE_OPENSSL_CRYPTO -c -o cplgetsymbol.lo cplgetsymbol.cpp
g++: error: unrecognized command line option ‘-Wdate-time’
g++: error: unrecognized command line option ‘-Wnull-dereference’
g++: error: unrecognized command line option ‘-Wduplicated-cond’
g++: error: unrecognized command line option ‘-Wfloat-conversion’
make[1]: *** [cpl_conv.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
(cd gcore; make)
g++: error: unrecognized command line option ‘-Wdate-time’
g++: error: unrecognized command line option ‘-Wnull-dereference’
g++: error: unrecognized command line option ‘-Wduplicated-cond’
g++: error: unrecognized command line option ‘-Wfloat-conversion’
make[1]: *** [cpl_error.lo] Error 1
(cd frmts; make)
make[1]: Entering directory `/tmp/gdal-2.3.0/frmts'
/bin/sh /tmp/gdal-2.3.0/libtool --mode=compile --silent --tag=CXX g++ -std=c++11 -c -I/tmp/gdal-2.3.0/port -I/tmp/gdal-2.3.0/gcore -I/tmp/gdal-2.3.0/alg -I/tmp/gdal-2.3.0/ogr -I/tmp/gdal-2.3.0/ogr/ogrsf_frmts -I/tmp/gdal-2.3.0/gnm -I/tmp/gdal-2.3.0/apps -I/tmp/gdal-2.3.0/gnm -I/tmp/gdal-2.3.0/gnm/gnm_frmts -DGNM_ENABLED -I/tmp/gdal-2.3.0/port -I/usr/include  -DGDAL_COMPILATION -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2  -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdate-time -Wnull-dereference -Wduplicated-cond -Wfloat-conversion -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -Wzero-as-null-pointer-constant  -DGNM_ENABLED  -DFRMT_gxf  -DFRMT_gtiff  -DFRMT_hfa  -DFRMT_aigrid  -DFRMT_aaigrid  -DFRMT_ceos  -DFRMT_ceos2  -DFRMT_iso8211  -DFRMT_xpm  -DFRMT_sdts  -DFRMT_raw  -DFRMT_dted  -DFRMT_mem  -DFRMT_jdem  -DFRMT_envisat  -DFRMT_elas  -DFRMT_fit  -DFRMT_vrt  -DFRMT_usgsdem  -DFRMT_l1b  -DFRMT_nitf  -DFRMT_bmp  -DFRMT_airsar  -DFRMT_rs2  -DFRMT_ilwis  -DFRMT_rmf  -DFRMT_leveller  -DFRMT_sgi  -DFRMT_srtmhgt  -DFRMT_idrisi  -DFRMT_gsg  -DFRMT_ingr  -DFRMT_ers  -DFRMT_jaxapalsar  -DFRMT_dimap  -DFRMT_gff  -DFRMT_cosar  -DFRMT_pds  -DFRMT_adrg  -DFRMT_coasp  -DFRMT_tsx  -DFRMT_terragen  -DFRMT_blx  -DFRMT_msgn  -DFRMT_til  -DFRMT_r  -DFRMT_northwood  -DFRMT_saga  -DFRMT_xyz  -DFRMT_hf2  -DFRMT_kmlsuperoverlay  -DFRMT_ctg  -DFRMT_e00grid  -DFRMT_zmap  -DFRMT_ngsgeoid  -DFRMT_iris  -DFRMT_map  -DFRMT_cals  -DFRMT_safe  -DFRMT_sentinel2  -DFRMT_derived  -DFRMT_prf  -DFRMT_mrf  -DFRMT_wcs  -DFRMT_wms  -DFRMT_plmosaic  -DFRMT_wmts  -DFRMT_rda  -DFRMT_grib  -DFRMT_bsb  -DFRMT_netcdf  -DFRMT_hdf5  -DFRMT_gif  -DFRMT_jpeg  -DFRMT_png  -DFRMT_pcraster  -DFRMT_pcidsk  -DFRMT_rik  -DFRMT_ozi  -DFRMT_pdf  -DFRMT_postgisraster  -DFRMT_arg \
    -DGDAL_FORMATS=" gxf gtiff hfa aigrid aaigrid ceos ceos2 iso8211 xpm sdts raw dted mem jdem envisat elas fit vrt usgsdem l1b nitf bmp airsar rs2 ilwis rmf leveller sgi srtmhgt idrisi gsg ingr ers jaxapalsar dimap gff cosar pds adrg coasp tsx terragen blx msgn til r northwood saga xyz hf2 kmlsuperoverlay ctg e00grid zmap ngsgeoid iris map cals safe sentinel2 derived prf mrf wcs wms plmosaic wmts rda grib bsb netcdf hdf5 gif jpeg png pcraster  pcidsk rik ozi pdf postgisraster arg" \
    gdalallregister.cpp -o o/gdalallregister.lo
g++: error: unrecognized command line option ‘-Wdate-time’
g++: error: unrecognized command line option ‘-Wnull-dereference’
g++: error: unrecognized command line option ‘-Wduplicated-cond’
g++: error: unrecognized command line option ‘-Wfloat-conversion’
g++: error: unrecognized command line option ‘-Wdate-time’
g++: error: unrecognized command line option ‘-Wnull-dereference’
g++: error: unrecognized command line option ‘-Wduplicated-cond’
g++: error: unrecognized command line option ‘-Wfloat-conversion’
make[1]: *** [cpl_string.lo] Error 1
make -C gxf install-obj
make[1]: *** [cplgetsymbol.lo] Error 1
make[1]: Leaving directory `/tmp/gdal-2.3.0/port'
make: *** [port-target] Error 2
make: *** Waiting for unfinished jobs....
make -C gtiff install-obj
make[1]: Entering directory `/tmp/gdal-2.3.0/gcore'
make -C mdreader
make[2]: Entering directory `/tmp/gdal-2.3.0/frmts/gxf'
/bin/sh /tmp/gdal-2.3.0/libtool --mode=compile --silent --tag=CXX g++ -std=c++11 -I/tmp/gdal-2.3.0/port -I/tmp/gdal-2.3.0/gcore -I/tmp/gdal-2.3.0/alg -I/tmp/gdal-2.3.0/ogr -I/tmp/gdal-2.3.0/ogr/ogrsf_frmts -I/tmp/gdal-2.3.0/gnm -I/tmp/gdal-2.3.0/apps -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2  -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdate-time -Wnull-dereference -Wduplicated-cond -Wfloat-conversion -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -Wzero-as-null-pointer-constant  -DGNM_ENABLED -I/tmp/gdal-2.3.0/port -I/usr/include  -DGDAL_COMPILATION -c -o ../o/gxfdataset.lo gxfdataset.cpp
make[2]: Entering directory `/tmp/gdal-2.3.0/frmts/gtiff'
(cd libgeotiff; make install-obj)
make[2]: Entering directory `/tmp/gdal-2.3.0/gcore/mdreader'
/bin/sh /tmp/gdal-2.3.0/libtool --mode=compile --silent --tag=CXX g++ -std=c++11 -I/tmp/gdal-2.3.0/port -I/tmp/gdal-2.3.0/gcore -I/tmp/gdal-2.3.0/alg -I/tmp/gdal-2.3.0/ogr -I/tmp/gdal-2.3.0/ogr/ogrsf_frmts -I/tmp/gdal-2.3.0/gnm -I/tmp/gdal-2.3.0/apps -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2  -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdate-time -Wnull-dereference -Wduplicated-cond -Wfloat-conversion -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -Wzero-as-null-pointer-constant  -DGNM_ENABLED -I/tmp/gdal-2.3.0/port -I/usr/include  -DGDAL_COMPILATION -c -o ../reader_digital_globe.lo reader_digital_globe.cpp
make[3]: Entering directory `/tmp/gdal-2.3.0/frmts/gtiff/libgeotiff'
/bin/sh /tmp/gdal-2.3.0/libtool --mode=compile --silent --tag=CC gcc -c -I../../port -I../libtiff -DGNM_ENABLED -I/tmp/gdal-2.3.0/port -I/usr/include  -DGDAL_COMPILATION -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2  -Wall -Wdeclaration-after-statement -Wextra -Winit-self -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdeclaration-after-statement -Wdate-time -Wnull-dereference -Wduplicated-cond -Wfloat-conversion -std=gnu89  -DDONT_DEPRECATE_SPRINTF xtiff.c -o ../../o/xtiff.lo
g++: error: unrecognized command line option ‘-Wdate-time’
g++: error: unrecognized command line option ‘-Wnull-dereference’
g++: error: unrecognized command line option ‘-Wduplicated-cond’
g++: error: unrecognized command line option ‘-Wfloat-conversion’
make[2]: *** [../o/gxfdataset.lo] Error 1
make[2]: Leaving directory `/tmp/gdal-2.3.0/frmts/gxf'
make[1]: *** [gxf-install-obj] Error 2
make[1]: *** Waiting for unfinished jobs....
/bin/sh /tmp/gdal-2.3.0/libtool --mode=compile --silent --tag=CXX g++ -std=c++11 -I/tmp/gdal-2.3.0/port -I/tmp/gdal-2.3.0/gcore -I/tmp/gdal-2.3.0/alg -I/tmp/gdal-2.3.0/ogr -I/tmp/gdal-2.3.0/ogr/ogrsf_frmts -I/tmp/gdal-2.3.0/gnm -I/tmp/gdal-2.3.0/apps -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2  -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdate-time -Wnull-dereference -Wduplicated-cond -Wfloat-conversion -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -Wzero-as-null-pointer-constant  -DGNM_ENABLED -I/tmp/gdal-2.3.0/port -I/usr/include  -DGDAL_COMPILATION -c -o ../reader_geo_eye.lo reader_geo_eye.cpp
g++: error: unrecognized command line option ‘-Wdate-time’
g++: error: unrecognized command line option ‘-Wnull-dereference’
g++: error: unrecognized command line option ‘-Wduplicated-cond’
g++: error: unrecognized command line option ‘-Wfloat-conversion’
make[2]: *** [../reader_digital_globe.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
/bin/sh /tmp/gdal-2.3.0/libtool --mode=compile --silent --tag=CC gcc -c -I../../port -I../libtiff -DGNM_ENABLED -I/tmp/gdal-2.3.0/port -I/usr/include  -DGDAL_COMPILATION -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2  -Wall -Wdeclaration-after-statement -Wextra -Winit-self -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdeclaration-after-statement -Wdate-time -Wnull-dereference -Wduplicated-cond -Wfloat-conversion -std=gnu89  -DDONT_DEPRECATE_SPRINTF geo_free.c -o ../../o/geo_free.lo
g++: error: unrecognized command line option ‘-Wdate-time’
g++: error: unrecognized command line option ‘-Wnull-dereference’
g++: error: unrecognized command line option ‘-Wduplicated-cond’
g++: error: unrecognized command line option ‘-Wfloat-conversion’
make[2]: *** [../reader_geo_eye.lo] Error 1
make[2]: Leaving directory `/tmp/gdal-2.3.0/gcore/mdreader'
make[1]: *** [mdreader-target] Error 2
make[1]: Leaving directory `/tmp/gdal-2.3.0/gcore'
make: *** [core-target] Error 2
(cd libtiff; make install-obj)
make[3]: Entering directory `/tmp/gdal-2.3.0/frmts/gtiff/libtiff'
/bin/sh /tmp/gdal-2.3.0/libtool --mode=compile --silent --tag=CC gcc -c -I../../port -g -O2  -Wall -Wdeclaration-after-statement -Wextra -Winit-self -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdeclaration-after-statement -Wdate-time -Wnull-dereference -Wduplicated-cond -Wfloat-conversion -std=gnu89  -DGNM_ENABLED -I/tmp/gdal-2.3.0/port -I/usr/include  -DGDAL_COMPILATION -DDONT_DEPRECATE_SPRINTF -DPIXARLOG_SUPPORT -DZIP_SUPPORT  -DJPEG_SUPPORT -DOJPEG_SUPPORT tif_aux.c -o ../../o/tif_aux.lo
g++: error: unrecognized command line option ‘-Wdate-time’
g++: error: unrecognized command line option ‘-Wnull-dereference’
g++: error: unrecognized command line option ‘-Wduplicated-cond’
g++: error: unrecognized command line option ‘-Wfloat-conversion’
make[1]: *** [o/gdalallregister.lo] Error 1
/bin/sh /tmp/gdal-2.3.0/libtool --mode=compile --silent --tag=CC gcc -c -I../../port -g -O2  -Wall -Wdeclaration-after-statement -Wextra -Winit-self -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdeclaration-after-statement -Wdate-time -Wnull-dereference -Wduplicated-cond -Wfloat-conversion -std=gnu89  -DGNM_ENABLED -I/tmp/gdal-2.3.0/port -I/usr/include  -DGDAL_COMPILATION -DDONT_DEPRECATE_SPRINTF -DPIXARLOG_SUPPORT -DZIP_SUPPORT  -DJPEG_SUPPORT -DOJPEG_SUPPORT tif_close.c -o ../../o/tif_close.lo
/bin/sh /tmp/gdal-2.3.0/libtool --mode=compile --silent --tag=CC gcc -c -I../../port -I../libtiff -DGNM_ENABLED -I/tmp/gdal-2.3.0/port -I/usr/include  -DGDAL_COMPILATION -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2  -Wall -Wdeclaration-after-statement -Wextra -Winit-self -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdeclaration-after-statement -Wdate-time -Wnull-dereference -Wduplicated-cond -Wfloat-conversion -std=gnu89  -DDONT_DEPRECATE_SPRINTF geo_get.c -o ../../o/geo_get.lo
/bin/sh /tmp/gdal-2.3.0/libtool --mode=compile --silent --tag=CXX g++ -std=c++11 -I/tmp/gdal-2.3.0/port -I/tmp/gdal-2.3.0/gcore -I/tmp/gdal-2.3.0/alg -I/tmp/gdal-2.3.0/ogr -I/tmp/gdal-2.3.0/ogr/ogrsf_frmts -I/tmp/gdal-2.3.0/gnm -I/tmp/gdal-2.3.0/apps -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2  -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdate-time -Wnull-dereference -Wduplicated-cond -Wfloat-conversion -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -Wzero-as-null-pointer-constant  -I..  -I../jpeg -DHAVE_LIBJPEG   -DINTERNAL_LIBGEOTIFF -Ilibgeotiff -DINTERNAL_LIBTIFF -Ilibtiff -DBIGTIFF_SUPPORT -DGNM_ENABLED -I/tmp/gdal-2.3.0/port -I/usr/include  -DGDAL_COMPILATION -c -o ../o/geotiff.lo geotiff.cpp
g++: error: unrecognized command line option ‘-Wdate-time’
g++: error: unrecognized command line option ‘-Wnull-dereference’
g++: error: unrecognized command line option ‘-Wduplicated-cond’
g++: error: unrecognized command line option ‘-Wfloat-conversion’
make[2]: *** [../o/geotiff.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
/bin/sh /tmp/gdal-2.3.0/libtool --mode=compile --silent --tag=CC gcc -c -I../../port -g -O2  -Wall -Wdeclaration-after-statement -Wextra -Winit-self -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdeclaration-after-statement -Wdate-time -Wnull-dereference -Wduplicated-cond -Wfloat-conversion -std=gnu89  -DGNM_ENABLED -I/tmp/gdal-2.3.0/port -I/usr/include  -DGDAL_COMPILATION -DDONT_DEPRECATE_SPRINTF -DPIXARLOG_SUPPORT -DZIP_SUPPORT  -DJPEG_SUPPORT -DOJPEG_SUPPORT tif_codec.c -o ../../o/tif_codec.lo

[...类似的行没有错误...]

/bin/sh /tmp/gdal-2.3.0/libtool --mode=compile --silent --tag=CC gcc -c -I../../port -g -O2  -Wall -Wdeclaration-after-statement -Wextra -Winit-self -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdeclaration-after-statement -Wdate-time -Wnull-dereference -Wduplicated-cond -Wfloat-conversion -std=gnu89  -DGNM_ENABLED -I/tmp/gdal-2.3.0/port -I/usr/include  -DGDAL_COMPILATION -DDONT_DEPRECATE_SPRINTF -DPIXARLOG_SUPPORT -DZIP_SUPPORT  -DJPEG_SUPPORT -DOJPEG_SUPPORT tif_zstd.c -o ../../o/tif_zstd.lo
make[3]: Leaving directory `/tmp/gdal-2.3.0/frmts/gtiff/libtiff'
make[2]: Leaving directory `/tmp/gdal-2.3.0/frmts/gtiff'
make[1]: *** [gtiff-install-obj] Error 2
make[1]: Leaving directory `/tmp/gdal-2.3.0/frmts'
make: *** [frmts-target] Error 2

我是linux中的一个完整的新手,所以不确定如何前进或解释错误。我可以通过this guide成功构建2.0,但尝试构建更新的版本会失败,输出类似于下面的版本(我是否只是调整上面的指南,按照this other one,或者只是尝试配置没有指定任何选项。)

根据评论中的要求,我尝试了以下配置选项(按照上面链接的说明) - 当我创建目录时,所有似乎都给出了相同的错误输出:

./configure --with-static-proj4=/usr/local/lib --with-threads --with-pg=/usr/bin/pg_config
./configure --prefix=/usr/local --without-python
./configure --prefix=/usr/local
./configure

1 个答案:

答案 0 :(得分:1)

  

g ++:错误:无法识别...选项-Wdate-time,-Wnull-dereference,   -Wduplicated-cond,-Wfloat-conversion

似乎配置不当/内置gcc / g ++ -4.8.5。使用“任何”g ++版本构建了gdal-2.x.x ...

gdal-2.2.4-fedora/ ← gdal-2.2.4-fedora.tar.xz : gcc-7.3
gdal-2.3.0/     ← gdal_2.3.0+dfsg.orig.tar.xz : gcc-7.3
gdal-2.3.0/     ← gdal_2.3.0+dfsg.orig.tar.xz : gcc-4.8  (result packed with rpmbuild)
gdal-2.1.4-fedora/ ← gdal-2.1.4-fedora.tar.xz + patches: gcc-4.8 (+ most config options)
gdal-2.1.2/     ← gdal_2.1.2+dfsg.orig.tar.gz : gcc-6.3
gdal-2.1.2/     ← gdal_2.1.2+dfsg.orig.tar.gz : gcc-4.9
gdal-2.1.2/     ← gdal_2.1.2+dfsg.orig.tar.gz : gcc-4.8

BuildRequires,大多数选项:# yum install armadillo-devel cfitsio-devel freexl-devel g2clib-static geos-devel hdf-devel hdf-static jasper-devel libgeotiff-devel libgta-devel libtiff-devel libwebp-devel giflib-devel netcdf-devel libdap-devel librx-devel ogdi-devel openjpeg2-devel poppler-devel proj-devel unixODBC-devel bash-completion json-c-devel perl-generators

包示例,“一体化”gdal2-2.3.0-1.el7.x86_64.rpm https://drive.google.com/file/d/1xCYT3m4Br4VmakaZsYK_mXhXhYNS8c7a/view?usp=sharing,配置为$ ./configure --prefix=/usr --libdir=/usr/lib64

下载并安装:# yum install Downloads/gdal2-2.3.0-1.el7.x86_64.rpm

P.S。 :CentOS 7.5(也许是“亚马逊AWS ec2?”)的可能配置选项是:

./configure \
    --prefix=/usr       \
    --libdir=/usr/lib64 \
    --with-armadillo    \
    --with-curl         \
    --with-cfitsio      \
    --with-expat        \
    --with-freexl       \
    --with-geos         \
    --with-geotiff=external \
    --with-gif          \
    --with-gta          \
    --with-hdf4         \
    --with-hdf5         \
    --with-jasper       \
    --with-java         \
    --with-jpeg         \
    --with-libjson-c    \
    --without-jpeg12    \
    --with-liblzma      \
    --with-libtiff=external \
    --with-libz         \
    --without-mdb       \
    --with-mysql        \
    --with-netcdf       \
    --with-odbc         \
    --with-ogdi         \
    --without-msg       \
    --with-openjpeg     \
    --with-pcraster     \
    --with-pg           \
    --with-png          \
    --with-poppler      \
    --with-sqlite3      \
    --with-threads      \
    --with-webp         \
    --with-xerces       \
    --enable-shared     \
    --with-perl         \
    --with-python