Hello,
First of all, thanks for you answer! I have checked what you say, I list more steps and additional information: 1) check “cpl_string.h" and only one file is found: >> gdal-2.2.1]# find / -name cpl_string.h /root/gdal-2.2.1/port/cpl_string.h 2) Compiler version: >> g++ --version g++ (GCC) 4.1.2 20070626 (Red Hat 4.1.2-14) SO: Red Hat 5.1 3) I have tried with gdal 2.2.1, 2.2.2, 2.2.3 and the result is the same. 4) I have tried with “make –j11” and 3 errors are returned: >> cd /root/gdal-2.2.1 >> ./configure --with-libtiff=/opt/cots/tiff-4.0.0 --with-geotiff=/opt/cots/geotiff-1.4.0 --prefix=/opt/cots/gdal >> make –j11 ERRORS: libtool: compile: gcc -I/opt/cots/gdal/port -I/opt/cots/gdal/gcore -I/opt/cots/gdal/alg -I/opt/cots/gdal/ogr -I/opt/cots/gdal/ogr/o grsf_frmts -I/opt/cots/gdal/gnm -I/opt/cots/gdal/apps -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2 -Wall -Wdeclara tion-after-statement -Wextra -Winit-self -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Wshadow -DGNM_ENAB LED -I/opt/cots/gdal/port -I/usr/include/netcdf-3 -I/opt/cots/geotiff-1.4.0/include -I/opt/cots/tiff-4.0.0/include -DGDAL_COMPILATIO N -c gxf_proj4.c -fPIC -DPIC -o ../o/.libs/gxf_proj4.o cpl_string.cpp: In function 'int CPLVASPrintf(char**, const char*, __va_list_tag*)': cpl_string.cpp:1042: error: declaration of 'int CPLVASPrintf(char**, const char*, __va_list_tag*)' throws different exceptions cpl_string.h:284: error: from previous declaration 'int CPLVASPrintf(char**, const char*, __va_list_tag*) throw ()' cpl_string.cpp: In function 'int CPLvsnprintf(char*, size_t, const char*, __va_list_tag*)': cpl_string.cpp:1134: error: declaration of 'int CPLvsnprintf(char*, size_t, const char*, __va_list_tag*)' throws different exception s cpl_string.h:244: error: from previous declaration 'int CPLvsnprintf(char*, size_t, const char*, __va_list_tag*) throw ()' cpl_string.cpp: In function 'int CPLsnprintf(char*, size_t, const char*, ...)': cpl_string.cpp:1330: error: declaration of 'int CPLsnprintf(char*, size_t, const char*, ...)' throws different exceptions cpl_string.h:253: error: from previous declaration 'int CPLsnprintf(char*, size_t, const char*, ...) throw ()' make[1]: *** [cpl_string.lo] Error 1 make[1]: Leaving directory `/opt/cots/gdal/port' make: *** [port-target] Error 2 make: *** Waiting for unfinished jobs.... /bin/sh /opt/cots/gdal/libtool --mode=compile --tag=CXX g++ -I/opt/cots/gdal/port /bin/sh /opt/cots/gdal/libtool --mode=compile --tag=CXX g++ -I/opt/cots/gdal/port -I/opt/cots/gdal/gcore -I/opt/cots/gdal/alg -I/opt/cots/gdal/ogr -I/opt/cots/gdal/ogr/ogrsf_frmts -I/opt/cots/gdal/gnm -I/opt/cots/gdal/apps -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2 -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Wshadow -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -I.. -I../.. -I/usr/include -I/usr/include -DGNM_ENABLED -I/opt/cots/gdal/port -I/usr/include/netcdf-3 -I/opt/cots/geotiff-1.4.0/include -I/opt/cots/tiff-4.0.0/include -DGDAL_COMPILATION -DHAVE_EXPAT -DHAVE_SQLITE -c -o ../o/gmlhandler.lo gmlhandler.cpp libtool: compile: g++ -I/opt/cots/gdal/port -I/opt/cots/gdal/gcore -I/opt/cots/gdal/alg -I/opt/cots/gdal/ogr -I/opt/cots/gdal/ogr/ogrsf_frmts -I/opt/cots/gdal/gnm -I/opt/cots/gdal/apps -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2 -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Wshadow -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -I.. -I../.. -I/usr/include -I/usr/include -DGNM_ENABLED -I/opt/cots/gdal/port -I/usr/include/netcdf-3 -I/opt/cots/geotiff-1.4.0/include -I/opt/cots/tiff-4.0.0/include -DGDAL_COMPILATION -DHAVE_EXPAT -DHAVE_SQLITE -c gmlhandler.cpp -fPIC -DPIC -o ../o/.libs/gmlhandler.o gmlhandler.cpp:1887: error: expected `}' at end of input make[3]: *** [../o/gmlhandler.lo] Error 1 make[3]: Leaving directory `/opt/cots/gdal/ogr/ogrsf_frmts/gml' make[2]: *** [gml-target] Error 2 make[2]: *** Waiting for unfinished jobs.... /bin/sh /opt/cots/gdal/libtool --mode=compile --tag=CXX g++ -I/opt/cots/gdal/port -I/opt/cots/gdal/gcore -I/opt/cots/gdal/alg -I/opt/cots/gdal/ogr -I/opt/cots/gdal/ogr/ogrsf_frmts -I/opt/cots/gdal/gnm -I/opt/cots/gdal/apps -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2 -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Wshadow -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -DGNM_ENABLED -I/opt/cots/gdal/port -I/usr/include/netcdf-3 -I/opt/cots/geotiff-1.4.0/include -I/opt/cots/tiff-4.0.0/include -DGDAL_COMPILATION -c -o ../o/ehdrdataset.lo ehdrdataset.cpp libtool: compile: g++ -I/opt/cots/gdal/port -I/opt/cots/gdal/gcore -I/opt/cots/gdal/alg -I/opt/cots/gdal/ogr -I/opt/cots/gdal/ogr/ogrsf_frmts -I/opt/cots/gdal/gnm -I/opt/cots/gdal/apps -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2 -Wall -Wextra -Winit-self -Wunused-parameter -Wformat -Wshadow -Wnon-virtual-dtor -Woverloaded-virtual -fno-operator-names -DSQLITE_ENABLED -I/usr/include/libxml2 -DHAVE_LIBXML2 -I../frmts/gtiff -I../frmts/mem -I../frmts/vrt -I../ogr -I../ogr/ogrsf_frmts/generic -I../gnm/ -I../gnm/gnm_frmts/ -I/opt/cots/gdal/ogr/ogrsf_frmts/geojson/libjson -I../ogr/ogrsf_frmts/geojson -DGNM_ENABLED -I/opt/cots/gdal/port -I/usr/include/netcdf-3 -I/opt/cots/geotiff-1.4.0/include -I/opt/cots/tiff-4.0.0/include -DGDAL_COMPILATION -DPAM_ENABLED -c gdalpamproxydb.cpp -fPIC -DPIC -o .libs/gdalpamproxydb.o make[3]: Leaving directory `/opt/cots/gdal/ogr/ogrsf_frmts/gmt' make[2]: Leaving directory `/opt/cots/gdal/ogr/ogrsf_frmts' make[1]: *** [sublibs] Error 2 make[1]: Leaving directory `/opt/cots/gdal/ogr' make: *** [ogr-target] Error 2 Do you have any other idea to fix this issue? I do not know why this error is appearing, becasuse in the past I compile and install gdal 1.8.X in the same machine without any issue. Can you help me? Thanks in advance! El mié., 5 jun. 2019 a las 13:50, Andrew Bell (<andrew.bell...@gmail.com>) escribió: > > Perhaps I'm missing something, but I'm seeing no throw specifications on > my 2.1 source. I'm guessing you're finding header files from a version > that is different from the version you're trying to compile. I'd search > your system for "cpl_string.h" and compare with the include directories > used during compilation. > > On Wed, Jun 5, 2019 at 6:30 AM Jorge Martin <jorma...@gmail.com> wrote: > >> Hello, >> >> Trying to compile gdal 2.1.1 we are getting the following error: >> >> >> >> ./configure --with-libtiff=/opt/cots/tiff-4.0.0 >> --with-geotiff=/opt/cots/geotiff-1.4.0 --prefix=/opt/cots/gdal_v2 >> >> make >> >> >> >> (cd port; make) >> >> make[1]: Entering directory `/data2/mvit/gdal-2.1.1/port' >> >> ……. >> >> cpl_string.cpp: In function 'int CPLVASPrintf(char**, const char*, >> __va_list_tag*)': >> >> cpl_string.cpp:1034: error: declaration of 'int CPLVASPrintf(char**, >> const char*, __va_list_tag*)' throws different exceptions >> >> cpl_string.h:215: error: from previous declaration 'int >> CPLVASPrintf(char**, const char*, __va_list_tag*) throw ()' >> >> cpl_string.cpp: In function 'int CPLvsnprintf(char*, size_t, const char*, >> __va_list_tag*)': >> >> cpl_string.cpp:1124: error: declaration of 'int CPLvsnprintf(char*, >> size_t, const char*, __va_list_tag*)' throws different exceptions >> >> cpl_string.h:195: error: from previous declaration 'int >> CPLvsnprintf(char*, size_t, const char*, __va_list_tag*) throw ()' >> >> cpl_string.cpp: In function 'int CPLsnprintf(char*, size_t, const char*, >> ...)': >> >> cpl_string.cpp:1305: error: declaration of 'int CPLsnprintf(char*, >> size_t, const char*, ...)' throws different exceptions >> >> cpl_string.h:197: error: from previous declaration 'int >> CPLsnprintf(char*, size_t, const char*, ...) throw ()' >> >> >> >> our system is Red Hat Enterprise Linux Server release 5.1 (Tikanga) and >> we have installed previous version of gdal in the machine. >> >> >> >> We also have tried to install other versions such as 2.2.1, 2.2.2 and >> 2.2.3 and we got the same error. The vesion that we have installed is >> 1.8.1. >> >> Regards, >> Jorge >> _______________________________________________ >> gdal-dev mailing list >> gdal-dev@lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/gdal-dev > > > > -- > Andrew Bell > andrew.bell...@gmail.com >
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev