[gdal-dev] Cannot Build GDAL 3.1.0 on Ubuntu 18.04
Ben Van Riper
bengvr at gmail.com
Tue May 26 12:25:01 PDT 2020
Hello all,
I am trying to build GDAL 3.1.0 on my machine with Ubuntu 18.04. Why go
through all the trouble? Because ubuntu-gis doesn't seem to want to bundle
the ESRI GDB driver with the gdal binaries, so I have to do it myself. Very
annoying.
Anyway, here is the problematic output from running make:
make[3]: Entering directory
> '/home/ben/software/gdal/gdal-3.1.0/ogr/ogrsf_frmts/sqlite'
> /bin/bash /home/ben/software/gdal/gdal-3.1.0/libtool --mode=compile
> --silent --tag=CXX g++ -I/home/ben/software/gdal/gdal-3.1.0/port
> -I/home/ben/software/gdal/gdal-3.1.0/gcore
> -I/home/ben/software/gdal/gdal-3.1.0/alg
> -I/home/ben/software/gdal/gdal-3.1.0/ogr
> -I/home/ben/software/gdal/gdal-3.1.0/ogr/ogrsf_frmts
> -I/home/ben/software/gdal/gdal-3.1.0/gnm
> -I/home/ben/software/gdal/gdal-3.1.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 -Wsuggest-override
> -Wimplicit-fallthrough -I.. -I/usr/local/include -DGNM_ENABLED
> -D_REENTRANT -I/home/ben/software/gdal/gdal-3.1.0/port
> -I/usr/include/openjpeg-2.3 -I/usr/include -I/usr/local/share/libgta
> -I/usr/local/share/libgta/include -I/usr -I/usr/include -DGDAL_COMPILATION
> -DHAVE_XERCES -I/usr/include -I/usr/include/xercesc -D_REENTRANT
> -I/home/ben/software/gdal/gdal-3.1.0/port -I/usr/include/openjpeg-2.3
> -I/usr/include -I/usr/local/share/libgta -I/usr/local/share/libgta/include
> -I/usr -I/usr/include -DGDAL_COMPILATION -DHAVE_SPATIALITE
> -DSPATIALITE_412_OR_LATER -DHAVE_PCRE -DSQLITE_HAS_COLUMN_METADATA
> -DHAVE_RASTERLITE2 -c -o ../o/rasterlite2.lo rasterlite2.cpp
> rasterlite2.cpp: In function ‘GDALDataset* OGRSQLiteDriverCreateCopy(const
> char*, GDALDataset*, int, char**, GDALProgressFunc, void*)’:
> rasterlite2.cpp:2283:57: error: invalid conversion from ‘void*’ to
> ‘rl2CoveragePtr {aka rl2_coverage*}’ [-fpermissive]
> poDS->GetRL2Context(),
> ~~~~~~~~~~~~~~~~~~~^~
> rasterlite2.cpp:2292:49: error: cannot convert ‘rl2CoveragePtr {aka
> rl2_coverage*}’ to ‘const char*’ for argument ‘3’ to ‘int
> rl2_load_raw_tiles_into_dbms(sqlite3*, rl2CoveragePtr, const char*,
> unsigned int, unsigned int, int, double, double, double, double, int
> (*)(void*, double, double, double, double, unsigned char*, rl2Palette**),
> void*, int)’
> bPyramidize) != RL2_OK )
> ^
> rasterlite2.cpp: In member function ‘virtual CPLErr
> OGRSQLiteDataSource::IBuildOverviews(const char*, int, int*, int, int*,
> GDALProgressFunc, void*)’:
> rasterlite2.cpp:2382:68: error: invalid conversion from ‘void*’ to ‘int’
> [-fpermissive]
> ret = rl2_build_section_pyramid( hDB, GetRL2Context(),
> ~~~~~~~~~~~~~^~
> In file included from rasterlite2_header.h:46:0,
> from ogr_sqlite.h:44,
> from rasterlite2.cpp:37:
> /usr/local/include/rasterlite2/rasterlite2.h:4735:2: note: initializing
> argument 2 of ‘int rl2_build_section_pyramid(sqlite3*, int, const char*,
> sqlite3_int64, int, int)’
> rl2_build_section_pyramid (sqlite3 * handle, int max_threads,
> ^~~~~~~~~~~~~~~~~~~~~~~~~
> rasterlite2.cpp:2388:71: error: invalid conversion from ‘void*’ to ‘const
> char*’ [-fpermissive]
> ret = rl2_build_monolithic_pyramid (hDB, GetRL2Context(),
> ~~~~~~~~~~~~~^~
> rasterlite2.cpp:2389:53: error: invalid user-defined conversion from
> ‘CPLString’ to ‘int’ [-fpermissive]
> m_osCoverageName,
> ^~~~~~~~~~~~~~~~
> In file included from
> /home/ben/software/gdal/gdal-3.1.0/gcore/gdal_priv.h:64:0,
> from
> /home/ben/software/gdal/gdal-3.1.0/gcore/gdal_pam.h:35,
> from ogr_sqlite.h:41,
> from rasterlite2.cpp:37:
> /home/ben/software/gdal/gdal-3.1.0/port/cpl_string.h:348:5: note:
> candidate is: CPLString::operator const char*() const <near match>
> operator const char* (void) const { return c_str(); }
> ^~~~~~~~
> /home/ben/software/gdal/gdal-3.1.0/port/cpl_string.h:348:5: note: no
> known conversion from ‘const char*’ to ‘int’
> rasterlite2.cpp:2391:61: error: too many arguments to function ‘int
> rl2_build_monolithic_pyramid(sqlite3*, const char*, int, int)’
> bVerbose);
> ^
> In file included from rasterlite2_header.h:46:0,
> from ogr_sqlite.h:44,
> from rasterlite2.cpp:37:
> /usr/local/include/rasterlite2/rasterlite2.h:4741:2: note: declared here
> rl2_build_monolithic_pyramid (sqlite3 * handle, const char *coverage,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> rasterlite2.cpp:2398:62: error: invalid conversion from ‘void*’ to ‘const
> char*’ [-fpermissive]
> GetRL2Context(),
> ~~~~~~~~~~~~~^~
> rasterlite2.cpp:2399:49: error: invalid user-defined conversion from
> ‘CPLString’ to ‘int’ [-fpermissive]
> m_osCoverageName,
> ^~~~~~~~~~~~~~~~
> In file included from
> /home/ben/software/gdal/gdal-3.1.0/gcore/gdal_priv.h:64:0,
> from
> /home/ben/software/gdal/gdal-3.1.0/gcore/gdal_pam.h:35,
> from ogr_sqlite.h:41,
> from rasterlite2.cpp:37:
> /home/ben/software/gdal/gdal-3.1.0/port/cpl_string.h:348:5: note:
> candidate is: CPLString::operator const char*() const <near match>
> operator const char* (void) const { return c_str(); }
> ^~~~~~~~
> /home/ben/software/gdal/gdal-3.1.0/port/cpl_string.h:348:5: note: no
> known conversion from ‘const char*’ to ‘int’
> rasterlite2.cpp:2401:57: error: too many arguments to function ‘int
> rl2_build_monolithic_pyramid(sqlite3*, const char*, int, int)’
> bVerbose);
> ^
> In file included from rasterlite2_header.h:46:0,
> from ogr_sqlite.h:44,
> from rasterlite2.cpp:37:
> /usr/local/include/rasterlite2/rasterlite2.h:4741:2: note: declared here
> rl2_build_monolithic_pyramid (sqlite3 * handle, const char *coverage,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../../../GDALmake.opt:649: recipe for target '../o/rasterlite2.lo' failed
> make[3]: *** [../o/rasterlite2.lo] Error 1
> make[3]: Leaving directory
> '/home/ben/software/gdal/gdal-3.1.0/ogr/ogrsf_frmts/sqlite'
> ../../GDALmake.opt:662: recipe for target 'sqlite-target' failed
> make[2]: *** [sqlite-target] Error 2
> make[2]: Leaving directory
> '/home/ben/software/gdal/gdal-3.1.0/ogr/ogrsf_frmts'
> GNUmakefile:58: recipe for target 'sublibs' failed
> make[1]: *** [sublibs] Error 2
> make[1]: Leaving directory '/home/ben/software/gdal/gdal-3.1.0/ogr'
> GNUmakefile:91: recipe for target 'ogr-target' failed
> make: *** [ogr-target] Error 2
I have librasterlite3 version 1.1.0-beta0-1 installed on my system, so
that's the version that it's linking against or whatever. Honestly doing
this is such a nightmare, makes me wish we had OSGEO4W on Linux.
For reference, here is my configure command:
> ./configure \
> --with-libz=internal \
> --with-liblzma=yes \
> --with-zstd=yes \
> --with-pg=yes \
> --with-cfitsio=/usr \
> --with-gta=/usr/local/share/libgta \
> --with-libtiff=yes \
> --with-charls \
> --with-sosi=yes \
> --with-kea=yes \
> --with-netcdf=/usr/bin \
> --with-fgdb=/opt/FileGDB_API-64 \
> --with-epsilon \
> --with-mysql=/usr/bin/mysql_config \
> --with-dods-root=/usr \
> --with-spatialite=yes \
> --with-rasterlite2=yes \
> --with-sfcgal=yes \
> --with-poppler=yes \
> --with-opencl \
> --with-armadillo=yes \
> --with-mdb \
> --with-java \
> --with-proj=/usr/local \
> --with-mrsid=/opt/mrsid/Raster_DSDK/ \
> --prefix=/usr \
> --with-python=python2.7 --with-python=python3.6 \
> --with-grass=/usr/lib/grass74 \
> --with-libgrass=/usr/lib/grass74/lib \
> --with-ogdi=no
Basically I've been trying to build GDAL with as many drivers as possible.
Some of them I just couldn't get to work, which I guess is whatever, but I
definitely need rasterlite2, so this not working is a problem.
Any chance someone can point me in the right direction here? I know I was
able to compile version 2.4.0 back in December after hours of headaches,
hoping to avoid such a process this time around.
Thanks,
Ben Van Riper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200526/f6ded0d6/attachment.html>
More information about the gdal-dev
mailing list