Skip to content
Snippets Groups Projects
Commit bbb97d48 authored by Nick Bearson's avatar Nick Bearson
Browse files

fixes the netcdf builds and now removes /build/ at the end

parent 47fb64f7
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -14,7 +14,8 @@ ENV JPEG_VERSION 6b ...@@ -14,7 +14,8 @@ ENV JPEG_VERSION 6b
ENV SZIP_VERSION 2.1 ENV SZIP_VERSION 2.1
ENV HDF4_VERSION 4.2.12 ENV HDF4_VERSION 4.2.12
ENV HDF5_VERSION 1.8.17 ENV HDF5_VERSION 1.8.17
ENV NETCDF4_VERSION 4.4.1 ENV NC4F_VERSION 4.4.4
ENV NC4C_VERSION 4.4.1
# grab some packages we need # grab some packages we need
RUN apt-get update && apt-get install -y byacc bison diffutils flex make RUN apt-get update && apt-get install -y byacc bison diffutils flex make
...@@ -32,8 +33,8 @@ RUN cd /build && curl -O https://www.hdfgroup.org/ftp/lib-external/jpeg/src/jpeg ...@@ -32,8 +33,8 @@ RUN cd /build && curl -O https://www.hdfgroup.org/ftp/lib-external/jpeg/src/jpeg
RUN cd /build && curl -O https://www.hdfgroup.org/ftp/lib-external/szip/${SZIP_VERSION}/src/szip-${SZIP_VERSION}.tar.gz RUN cd /build && curl -O https://www.hdfgroup.org/ftp/lib-external/szip/${SZIP_VERSION}/src/szip-${SZIP_VERSION}.tar.gz
RUN cd /build && curl -O http://www.hdfgroup.org/ftp/HDF/releases/HDF${HDF4_VERSION}/src/hdf-${HDF4_VERSION}.tar.gz RUN cd /build && curl -O http://www.hdfgroup.org/ftp/HDF/releases/HDF${HDF4_VERSION}/src/hdf-${HDF4_VERSION}.tar.gz
RUN cd /build && curl -O http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-${HDF5_VERSION}.tar.gz RUN cd /build && curl -O http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-${HDF5_VERSION}.tar.gz
RUN cd /build && curl -O ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-${NETCDF4_VERSION}.tar.gz RUN cd /build && curl -O ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-${NC4C_VERSION}.tar.gz
RUN cd /build && curl -O ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-fortran-${NC4F_VERSION}.tar.gz
# add zlib # add zlib
RUN cd /build && tar xzf zlib-${ZLIB_VERSION}.tar.gz && \ RUN cd /build && tar xzf zlib-${ZLIB_VERSION}.tar.gz && \
...@@ -66,16 +67,24 @@ RUN cd /build && tar xzf hdf5-${HDF5_VERSION}.tar.gz && \ ...@@ -66,16 +67,24 @@ RUN cd /build && tar xzf hdf5-${HDF5_VERSION}.tar.gz && \
cd hdf5-${HDF5_VERSION} && \ cd hdf5-${HDF5_VERSION} && \
./configure --prefix="/usr" --disable-shared --with-pic --with-zlib="/usr" --enable-cxx --enable-fortran --enable-fortran2003 --with-pthread && make -j4 && make install ./configure --prefix="/usr" --disable-shared --with-pic --with-zlib="/usr" --enable-cxx --enable-fortran --enable-fortran2003 --with-pthread && make -j4 && make install
# add netcdf # add netcdf-c
# FIXME: failing with... RUN cd /build && tar xzf netcdf-${NC4C_VERSION}.tar.gz && \
# configure: error: Can't find or link to the hdf5 library. Use --disable-netcdf-4, or see config.log for errors. cd netcdf-${NC4C_VERSION} && \
# but we don't need it for clavrx so skip for now CPPFLAGS="-I/usr/include -I/usr/lib/x86_64-linux-gnu" \
# LDFLAGS="-L/usr/lib -L/usr/lib/x86_64-linux-gnu" \
#RUN cd /build && tar xzf netcdf-${NETCDF4_VERSION}.tar.gz && \ LD_LIBRARY_PATH=/usr/lib:/usr/lib/x86_64-linux-gnu \
# cd netcdf-${NETCDF4_VERSION} && \ LIBS="-ldf -lhdf5_hl -lhdf5 -ljpeg -ldl -lm -lz -lcurl" \
# ./configure --prefix="/usr" --enable-hdf4 --enable-hdf4-file-tests --enable-fortran --disable-shared --disable-doxygen --disable-dap --with-pic && make -j4 && make install ./configure --prefix="/usr" --enable-hdf4 --enable-fortran --disable-shared --with-pic && make -j4 && make install
# add netcdf-fortran
RUN cd /build && tar xzf netcdf-fortran-${NC4F_VERSION}.tar.gz && \
cd netcdf-fortran-${NC4F_VERSION} && \
CPPFLAGS="-I/usr/include -I/usr/lib/x86_64-linux-gnu" \
LDFLAGS="-L/usr/lib -L/usr/lib/x86_64-linux-gnu" \
LD_LIBRARY_PATH=/usr/lib:/usr/lib/x86_64-linux-gnu \
LIBS="-lnetcdf -ldf -lhdf5_hl -lhdf5 -ljpeg -ldl -lm -lz -lcurl" \
./configure --disable-shared --prefix="/usr" --with-pic && make -j4 && make install
# remove all the build cruft # remove all the build cruft
#RUN rm -rf /build RUN rm -rf /build
#RUN rm -rf /usr/man RUN rm -rf /usr/man
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment