aboutsummaryrefslogtreecommitdiff
path: root/projects/gdal
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@mines-paris.org>2019-02-01 15:38:31 +0100
committerMax Moroz <dor3s1@gmail.com>2019-02-01 06:38:31 -0800
commitf395935e322626527009257ec968ed86a3b592a0 (patch)
tree76fcd2ab797d812aed93670ca6b41ebcd8a53102 /projects/gdal
parent3a03a358de9e6260f18fb0d1dc07d72e182376bf (diff)
downloadoss-fuzz-f395935e322626527009257ec968ed86a3b592a0.tar.gz
[gdal] GDAL: fix build (#2124)
Since yesterday, GDAL requires building against https://github.com/OSGeo/proj.4 master
Diffstat (limited to 'projects/gdal')
-rw-r--r--projects/gdal/Dockerfile6
-rwxr-xr-xprojects/gdal/build.sh13
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