[gdal] GDAL: fix build (#2124)

Since yesterday, GDAL requires building against
https://github.com/OSGeo/proj.4 master
This commit is contained in:
Even Rouault 2019-02-01 15:38:31 +01:00 committed by Max Moroz
parent 3a03a358de
commit f395935e32
2 changed files with 15 additions and 4 deletions

View File

@ -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/

View File

@ -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