Ignore:
Timestamp:
11/25/20 17:06:18 (4 years ago)
Author:
jdquinn
Message:

CHG: Support for Linux binaries

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/externalpackages/gmt/install-6-linux-static.sh

    r25745 r25785  
    77VER="6.0.0"
    88
     9CURL_ROOT="${ISSM_DIR}/externalpackages/curl/install"
    910PETSC_ROOT="${ISSM_DIR}/externalpackages/petsc/install"
    1011
     
    1415# Find libgfortran and libgcc so we do not have to hardcode them
    1516#
    16 # Should retrieve a copy of gfortran that is compiled from source before returning one that is installed via package manager
     17# NOTE: For now, paths are hardcoded.
    1718#
    1819# TODO:
    19 # - Test if -static-libgfortran flag will avoid all of this.
    20 # - Otherwise, refactor this to work with other gfortran installations.
     20# - Figure out how to find and grep for single result like we do with mdfind
     21#       under macOS.
    2122#
    22 LIBGFORTRAN=$(mdfind -onlyin /usr -name libgfortran | grep -n libgfortran.a | grep -v i386 | sed "s/[0-9]*://g" | head -1)
     23LIBGFORTRAN="/usr/lib/gcc/x86_64-linux-gnu/8/libgfortran.a"
    2324LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
    24 LIBGCC=$(mdfind -onlyin ${LIBGFORTRAN_ROOT} -name libgcc | grep -n libgcc.a | grep -v i386 | sed "s/[0-9]*://g" | head -1)
     25LIBGCC="/usr/lib/gcc/x86_64-linux-gnu/8/libgcc.a"
    2526
     27CURL_INCLUDE_DIRS="${CURL_ROOT}/include" \
     28CURL_LIBRARIES="${CURL_ROOT}/lib/libcurl.a;/usr/lib/x86_64-linux-gnu/libssl.a;/usr/lib/x86_64-linux-gnu/libcrypto.a" \
    2629GDAL_EXTRA_LIBS="-lstdc++" # Determined by running `$GDAL_ROOT/bin/gdal-config --dep-libs` then removing duplicate libs
    27 NETCDF_EXTRA_LIBS="-lsqlite3 -lpthread -ldl -liconv" # `$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)
     30NETCDF_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)
    2831
    2932# Environment
    3033#
    3134export CC=mpicc
     35export CURL_INCLUDE_DIRS=${CURL_INCLUDE_DIRS}
     36export CURL_LIBRARIES=${CURL_LIBRARIES}
    3237
    3338# Download source
     
    4752# Copy custom configuration files
    4853cp ./configs/6/static/cmake/ConfigUser.static.cmake ./src/cmake/ConfigUser.cmake
     54cp ./configs/6/static/cmake/modules/FindGDAL.cmake ./src/cmake/modules
    4955cp ./configs/6/static/cmake/modules/FindGSHHG.cmake ./src/cmake/modules
     56cp ./configs/6/static/cmake/modules/FindNETCDF.cmake ./src/cmake/modules
     57cp ./configs/6/static/src/CMakeLists.txt ./src/src
    5058
    5159# Configure
Note: See TracChangeset for help on using the changeset viewer.