source: issm/oecreview/Archive/27032-27229/ISSM-27193-27194.diff

Last change on this file was 27230, checked in by Mathieu Morlighem, 3 years ago

CHG: oecreview

File size: 6.3 KB
  • ../trunk-jpl/externalpackages/dakota/install-6.2-linux-static.sh

     
    88
    99PREFIX="${ISSM_DIR}/externalpackages/dakota/install" # Set to location where external package should be installed
    1010
     11# Find libgfortran and libgcc so we do not have to hardcode them
     12#
     13# TODO:
     14# - Move this to etc/environment.sh
     15#
     16LIBGFORTRAN=$(find /usr -name libgfortran* | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
     17LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
     18LIBGCC=$(find ${LIBGFORTRAN_ROOT} -name libgcc* | egrep -n libgcc.a | sed "s/[0-9]*://g" | head -1
     19
    1120## Environment
    1221#
    13 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
    14 export CXXFLAGS='-std=c++98' # Setting CXXFLAGS to deal with C++11 incompatibility with MATLAB's Boost (absolutely necessary for this version)
     22export 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
    1523export DAK_BUILD=${ISSM_DIR}/externalpackages/dakota/build # DO NOT CHANGE THIS
    1624export DAK_INSTALL=${PREFIX} # DO NOT CHANGE THIS
    1725export DAK_SRC=${ISSM_DIR}/externalpackages/dakota/src # DO NOT CHANGE THIS
    18 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
     26export 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
    1927
    2028# Cleanup
    2129rm -rf ${DAK_BUILD} ${DAK_INSTALL} ${DAK_SRC}
     
    5361        -DCMAKE_C_FLAGS="-fPIC -Wno-error=implicit-function-declaration" \
    5462        -DCMAKE_CXX_COMPILER=${MPI_HOME}/bin/mpicxx \
    5563        -DCMAKE_CXX_FLAGS="-fPIC" \
     64        -DCMAKE_CXX_STANDARD="11" \
    5665        -DCMAKE_Fortran_COMPILER=${MPI_HOME}/bin/mpif77 \
    5766        -DBoost_NO_BOOST_CMAKE=TRUE \
    5867        -DHAVE_ACRO=OFF \
  • ../trunk-jpl/externalpackages/dakota/install-6.2-mac-static.sh

     
    7979        -DCMAKE_C_FLAGS="-fPIC -Wno-error=implicit-function-declaration" \
    8080        -DCMAKE_CXX_COMPILER=${MPI_HOME}/bin/mpicxx \
    8181        -DCMAKE_CXX_FLAGS="-fPIC -fdelayed-template-parsing" \
     82        -DCMAKE_CXX_STANDARD="11" \
    8283        -DCMAKE_Fortran_COMPILER=${MPI_HOME}/bin/mpif77 \
    8384        -DCMAKE_Fortran_FLAGS="-fPIC -fallow-argument-mismatch" \
    8485        -DBoost_NO_BOOST_CMAKE=TRUE \
  • ../trunk-jpl/externalpackages/gmsh/install-4-linux-static.sh

     
    1616
    1717# Find libgfortran and libgcc so we do not have to hardcode them
    1818#
    19 # NOTE: For now, paths are hardcoded.
    20 #
    2119# TODO:
    2220# - Move this to etc/environment.sh
    23 # - Figure out how to find and grep for single result like we do with mdfind
    24 #       under macOS.
    2521#
    26 LIBGFORTRAN="/usr/lib/gcc/x86_64-linux-gnu/8/libgfortran.a"
     22LIBGFORTRAN=$(find /usr -name libgfortran* | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
    2723LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
    28 LIBGCC="/usr/lib/gcc/x86_64-linux-gnu/8/libgcc.a"
     24LIBGCC=$(find ${LIBGFORTRAN_ROOT} -name libgcc* | egrep -n libgcc.a | sed "s/[0-9]*://g" | head -1)
    2925
    3026PREFIX="${ISSM_DIR}/externalpackages/gmsh/install" # Set to location where external package should be installed
    3127
  • ../trunk-jpl/externalpackages/gmsh/install-4-linux.sh

     
    1616
    1717PREFIX="${ISSM_DIR}/externalpackages/gmsh/install" # Set to location where external package should be installed
    1818
     19# Find libgfortran so that we do not have to hardcode it.
     20#
     21# TODO:
     22# - Move this to etc/environment.sh
     23#
     24LIBGFORTRAN=$(find /usr -name libgfortran* | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
     25LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
     26
    1927# Cleanup
    2028rm -rf ${PREFIX} src
    2129mkdir -p ${PREFIX} src
     
    5260        -DENABLE_MPI=1 \
    5361        -DENABLE_OCC=0 \
    5462        -DENABLE_TOUCHBAR=0 \
    55         -DBLAS_LAPACK_LIBRARIES="-L${LAPACK_ROOT}/lib -lflapack -L${BLAS_ROOT}/lib -lfblas" \
     63        -DBLAS_LAPACK_LIBRARIES="-L${LAPACK_ROOT}/lib -lflapack -L${BLAS_ROOT}/lib -lfblas -L${LIBGFORTRAN_ROOT} -lgfortran" \
    5664        -DMETIS_ROOT="${METIS_ROOT}"
    5765
    5866# Compile and install
  • ../trunk-jpl/externalpackages/gmt/install-6-linux-static.sh

     
    88
    99# Find libgfortran and libgcc so we do not have to hardcode them
    1010#
    11 # NOTE: For now, paths are hardcoded.
    12 #
    1311# TODO:
    1412# - Move this to etc/environment.sh
    15 # - Figure out how to find and grep for single result like we do with mdfind
    16 #       under macOS.
    1713#
    18 LIBGFORTRAN="/usr/lib/gcc/x86_64-linux-gnu/8/libgfortran.a"
     14LIBGFORTRAN=$(find /usr -name libgfortran* | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
    1915LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
    20 LIBGCC="/usr/lib/gcc/x86_64-linux-gnu/8/libgcc.a"
     16LIBGCC=$(find ${LIBGFORTRAN_ROOT} -name libgcc* | egrep -n libgcc.a | sed "s/[0-9]*://g" | head -1)
    2117
    2218GDAL_EXTRA_LIBS="-lstdc++" # Determined by running `$GDAL_ROOT/bin/gdal-config --dep-libs` then removing duplicate libs
    2319NETCDF_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)
Note: See TracBrowser for help on using the repository browser.