I get the following error when attempting to build gdal 2.3.0 on an AWS ec2 AMI - more specifically when attempting to make the directory:
[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
[... similar lines without errors ...]
/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
I am a complete rookie in linux, so not sure how to move forward or interpret the error. I can successfully build 2.0 by following this guide, but attempts to build any more recent versions fail with output similar to the one below (whether I just adapt the guide above, follow this other one, or just try to config without specifying any options).
As requested in the comments, I have tried the following config options (following instructions linked above) - all seem to give the same error output when I make the directory:
./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