Index: ../trunk-jpl/externalpackages/dakota/install-6.2-linux-static.sh =================================================================== --- ../trunk-jpl/externalpackages/dakota/install-6.2-linux-static.sh (revision 27193) +++ ../trunk-jpl/externalpackages/dakota/install-6.2-linux-static.sh (revision 27194) @@ -8,14 +8,22 @@ PREFIX="${ISSM_DIR}/externalpackages/dakota/install" # Set to location where external package should be installed +# Find libgfortran and libgcc so we do not have to hardcode them +# +# TODO: +# - Move this to etc/environment.sh +# +LIBGFORTRAN=$(find /usr -name libgfortran* | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1) +LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*} +LIBGCC=$(find ${LIBGFORTRAN_ROOT} -name libgcc* | egrep -n libgcc.a | sed "s/[0-9]*://g" | head -1 + ## Environment # -export BLAS_LIBS="-L${BLAS_ROOT}/lib -lfblas -L/usr/lib/x86_64-linux-gnu -lgfortran" # Need to export BLAS_LIBS *and* pass it as an option to CMake to ensure that external packages also find it -export CXXFLAGS='-std=c++98' # Setting CXXFLAGS to deal with C++11 incompatibility with MATLAB's Boost (absolutely necessary for this version) +export BLAS_LIBS="-L${BLAS_ROOT}/lib -lfblas ${LIBGFORTRAN_ROOT}/libgfortran.a ${LIBGFORTRAN_ROOT}/libquadmath.a ${LIBGCC}" # Need to export BLAS_LIBS *and* pass it as an option to CMake to ensure that external packages also find it export DAK_BUILD=${ISSM_DIR}/externalpackages/dakota/build # DO NOT CHANGE THIS export DAK_INSTALL=${PREFIX} # DO NOT CHANGE THIS export DAK_SRC=${ISSM_DIR}/externalpackages/dakota/src # DO NOT CHANGE THIS -export LAPACK_LIBS="-L${LAPACK_ROOT}/lib -lflapack -L/usr/lib/x86_64-linux-gnu -lgfortran" # Need to export LAPACK_LIBS *and* pass it as an option to CMake to ensure that external packages also find it +export LAPACK_LIBS="-L${LAPACK_ROOT}/lib -lflapack -L/usr/lib/x86_64-linux-gnu ${LIBGFORTRAN_ROOT}/libgfortran.a ${LIBGFORTRAN_ROOT}/libquadmath.a ${LIBGCC}" # Need to export LAPACK_LIBS *and* pass it as an option to CMake to ensure that external packages also find it # Cleanup rm -rf ${DAK_BUILD} ${DAK_INSTALL} ${DAK_SRC} @@ -53,6 +61,7 @@ -DCMAKE_C_FLAGS="-fPIC -Wno-error=implicit-function-declaration" \ -DCMAKE_CXX_COMPILER=${MPI_HOME}/bin/mpicxx \ -DCMAKE_CXX_FLAGS="-fPIC" \ + -DCMAKE_CXX_STANDARD="11" \ -DCMAKE_Fortran_COMPILER=${MPI_HOME}/bin/mpif77 \ -DBoost_NO_BOOST_CMAKE=TRUE \ -DHAVE_ACRO=OFF \ Index: ../trunk-jpl/externalpackages/dakota/install-6.2-mac-static.sh =================================================================== --- ../trunk-jpl/externalpackages/dakota/install-6.2-mac-static.sh (revision 27193) +++ ../trunk-jpl/externalpackages/dakota/install-6.2-mac-static.sh (revision 27194) @@ -79,6 +79,7 @@ -DCMAKE_C_FLAGS="-fPIC -Wno-error=implicit-function-declaration" \ -DCMAKE_CXX_COMPILER=${MPI_HOME}/bin/mpicxx \ -DCMAKE_CXX_FLAGS="-fPIC -fdelayed-template-parsing" \ + -DCMAKE_CXX_STANDARD="11" \ -DCMAKE_Fortran_COMPILER=${MPI_HOME}/bin/mpif77 \ -DCMAKE_Fortran_FLAGS="-fPIC -fallow-argument-mismatch" \ -DBoost_NO_BOOST_CMAKE=TRUE \ Index: ../trunk-jpl/externalpackages/gmsh/install-4-linux-static.sh =================================================================== --- ../trunk-jpl/externalpackages/gmsh/install-4-linux-static.sh (revision 27193) +++ ../trunk-jpl/externalpackages/gmsh/install-4-linux-static.sh (revision 27194) @@ -16,16 +16,12 @@ # Find libgfortran and libgcc so we do not have to hardcode them # -# NOTE: For now, paths are hardcoded. -# # TODO: # - Move this to etc/environment.sh -# - Figure out how to find and grep for single result like we do with mdfind -# under macOS. # -LIBGFORTRAN="/usr/lib/gcc/x86_64-linux-gnu/8/libgfortran.a" +LIBGFORTRAN=$(find /usr -name libgfortran* | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1) LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*} -LIBGCC="/usr/lib/gcc/x86_64-linux-gnu/8/libgcc.a" +LIBGCC=$(find ${LIBGFORTRAN_ROOT} -name libgcc* | egrep -n libgcc.a | sed "s/[0-9]*://g" | head -1) PREFIX="${ISSM_DIR}/externalpackages/gmsh/install" # Set to location where external package should be installed Index: ../trunk-jpl/externalpackages/gmsh/install-4-linux.sh =================================================================== --- ../trunk-jpl/externalpackages/gmsh/install-4-linux.sh (revision 27193) +++ ../trunk-jpl/externalpackages/gmsh/install-4-linux.sh (revision 27194) @@ -16,6 +16,14 @@ PREFIX="${ISSM_DIR}/externalpackages/gmsh/install" # Set to location where external package should be installed +# Find libgfortran so that we do not have to hardcode it. +# +# TODO: +# - Move this to etc/environment.sh +# +LIBGFORTRAN=$(find /usr -name libgfortran* | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1) +LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*} + # Cleanup rm -rf ${PREFIX} src mkdir -p ${PREFIX} src @@ -52,7 +60,7 @@ -DENABLE_MPI=1 \ -DENABLE_OCC=0 \ -DENABLE_TOUCHBAR=0 \ - -DBLAS_LAPACK_LIBRARIES="-L${LAPACK_ROOT}/lib -lflapack -L${BLAS_ROOT}/lib -lfblas" \ + -DBLAS_LAPACK_LIBRARIES="-L${LAPACK_ROOT}/lib -lflapack -L${BLAS_ROOT}/lib -lfblas -L${LIBGFORTRAN_ROOT} -lgfortran" \ -DMETIS_ROOT="${METIS_ROOT}" # Compile and install Index: ../trunk-jpl/externalpackages/gmt/install-6-linux-static.sh =================================================================== --- ../trunk-jpl/externalpackages/gmt/install-6-linux-static.sh (revision 27193) +++ ../trunk-jpl/externalpackages/gmt/install-6-linux-static.sh (revision 27194) @@ -8,16 +8,12 @@ # Find libgfortran and libgcc so we do not have to hardcode them # -# NOTE: For now, paths are hardcoded. -# # TODO: # - Move this to etc/environment.sh -# - Figure out how to find and grep for single result like we do with mdfind -# under macOS. # -LIBGFORTRAN="/usr/lib/gcc/x86_64-linux-gnu/8/libgfortran.a" +LIBGFORTRAN=$(find /usr -name libgfortran* | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1) LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*} -LIBGCC="/usr/lib/gcc/x86_64-linux-gnu/8/libgcc.a" +LIBGCC=$(find ${LIBGFORTRAN_ROOT} -name libgcc* | egrep -n libgcc.a | sed "s/[0-9]*://g" | head -1) GDAL_EXTRA_LIBS="-lstdc++" # Determined by running `$GDAL_ROOT/bin/gdal-config --dep-libs` then removing duplicate libs NETCDF_EXTRA_LIBS="-lm -ldl -lz" # `$NETCDF_ROOT/bin/nc-config --libs` does not report certain dependencies of certain static libraries (see also customized configuration file ./configs/6.0/static/cmake/modules/FindNETCDF.cmake)