From f395935e322626527009257ec968ed86a3b592a0 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 1 Feb 2019 15:38:31 +0100 Subject: [PATCH] [gdal] GDAL: fix build (#2124) Since yesterday, GDAL requires building against https://github.com/OSGeo/proj.4 master --- projects/gdal/Dockerfile | 6 ++++-- projects/gdal/build.sh | 13 +++++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/projects/gdal/Dockerfile b/projects/gdal/Dockerfile index c41b69e92..a9fc71646 100644 --- a/projects/gdal/Dockerfile +++ b/projects/gdal/Dockerfile @@ -16,11 +16,13 @@ FROM gcr.io/oss-fuzz-base/base-builder MAINTAINER even.rouault@spatialys.com -RUN apt-get update && apt-get install -y make autoconf automake libtool g++ zlib1g-dev libsqlite3-dev libexpat-dev liblzma-dev libxerces-c-dev libpng12-dev libgif-dev libwebp-dev libicu-dev libnetcdf-dev curl cmake libssl-dev -# libgeos-dev libjpeg-dev libcurl4-gnutls-dev libproj-dev libxml2-dev netcdf-bin libpoppler-dev libspatialite-dev libhdf4-alt-dev libhdf5-serial-dev poppler-utils libfreexl-dev unixodbc-dev libepsilon-dev libpcre3-dev +RUN apt-get update && apt-get install -y make autoconf automake libtool g++ zlib1g-dev libsqlite3-dev libexpat-dev liblzma-dev libxerces-c-dev libpng12-dev libgif-dev libwebp-dev libicu-dev libnetcdf-dev curl cmake libssl-dev sqlite3 +# libgeos-dev libjpeg-dev libcurl4-gnutls-dev libxml2-dev netcdf-bin libpoppler-dev libspatialite-dev libhdf4-alt-dev libhdf5-serial-dev poppler-utils libfreexl-dev unixodbc-dev libepsilon-dev libpcre3-dev # libpodofo-dev libcrypto++-dev RUN git clone --depth 1 https://github.com/OSGeo/gdal gdal +RUN git clone --depth 1 https://github.com/OSGeo/proj.4 gdal/proj + RUN git clone --depth 1 https://github.com/curl/curl.git gdal/curl COPY build.sh NC4_put_propattr_leak_fix.patch libnetcdf_fix_undefined_left_shift_in_ncx_get_size_t.patch $SRC/ diff --git a/projects/gdal/build.sh b/projects/gdal/build.sh index 69a30cd97..7718f25fe 100755 --- a/projects/gdal/build.sh +++ b/projects/gdal/build.sh @@ -15,6 +15,15 @@ # ################################################################################ +# build libproj.a (proj master required) +cd proj +./autogen.sh +./configure --disable-shared --prefix=$SRC/install +make clean -s +make -j$(nproc) -s +make install +cd .. + # build libcurl.a (builing against Ubuntu libcurl.a doesn't work easily) cd curl ./buildconf @@ -37,11 +46,11 @@ cd ../.. # build gdal cd gdal export LDFLAGS=${CXXFLAGS} -./configure --without-libtool --with-liblzma --with-expat --with-sqlite3 --with-xerces --with-webp --with-netcdf=$SRC/install --with-curl=$SRC/install --without-hdf5 --with-jpeg=internal +./configure --without-libtool --with-liblzma --with-expat --with-sqlite3 --with-xerces --with-webp --with-netcdf=$SRC/install --with-curl=$SRC/install --without-hdf5 --with-jpeg=internal --with-proj=$SRC/install make clean -s make -j$(nproc) -s static-lib -export EXTRA_LIBS="-Wl,-Bstatic -lwebp -llzma -lexpat -lsqlite3 -lgif -lpng12 -lz" +export EXTRA_LIBS="-Wl,-Bstatic -lproj -lwebp -llzma -lexpat -lsqlite3 -lgif -lpng12 -lz" # Xerces-C related export EXTRA_LIBS="$EXTRA_LIBS -lxerces-c -licuuc -licudata" # netCDF related