- Timestamp:
- 11/25/20 17:06:18 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/externalpackages/gmt/install-6-linux-static.sh
r25745 r25785 7 7 VER="6.0.0" 8 8 9 CURL_ROOT="${ISSM_DIR}/externalpackages/curl/install" 9 10 PETSC_ROOT="${ISSM_DIR}/externalpackages/petsc/install" 10 11 … … 14 15 # Find libgfortran and libgcc so we do not have to hardcode them 15 16 # 16 # Should retrieve a copy of gfortran that is compiled from source before returning one that is installed via package manager17 # NOTE: For now, paths are hardcoded. 17 18 # 18 19 # 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. 21 22 # 22 LIBGFORTRAN= $(mdfind -onlyin /usr -name libgfortran | grep -n libgfortran.a | grep -v i386 | sed "s/[0-9]*://g" | head -1)23 LIBGFORTRAN="/usr/lib/gcc/x86_64-linux-gnu/8/libgfortran.a" 23 24 LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*} 24 LIBGCC= $(mdfind -onlyin ${LIBGFORTRAN_ROOT} -name libgcc | grep -n libgcc.a | grep -v i386 | sed "s/[0-9]*://g" | head -1)25 LIBGCC="/usr/lib/gcc/x86_64-linux-gnu/8/libgcc.a" 25 26 27 CURL_INCLUDE_DIRS="${CURL_ROOT}/include" \ 28 CURL_LIBRARIES="${CURL_ROOT}/lib/libcurl.a;/usr/lib/x86_64-linux-gnu/libssl.a;/usr/lib/x86_64-linux-gnu/libcrypto.a" \ 26 29 GDAL_EXTRA_LIBS="-lstdc++" # Determined by running `$GDAL_ROOT/bin/gdal-config --dep-libs` then removing duplicate libs 27 NETCDF_EXTRA_LIBS="-l sqlite3 -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)30 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) 28 31 29 32 # Environment 30 33 # 31 34 export CC=mpicc 35 export CURL_INCLUDE_DIRS=${CURL_INCLUDE_DIRS} 36 export CURL_LIBRARIES=${CURL_LIBRARIES} 32 37 33 38 # Download source … … 47 52 # Copy custom configuration files 48 53 cp ./configs/6/static/cmake/ConfigUser.static.cmake ./src/cmake/ConfigUser.cmake 54 cp ./configs/6/static/cmake/modules/FindGDAL.cmake ./src/cmake/modules 49 55 cp ./configs/6/static/cmake/modules/FindGSHHG.cmake ./src/cmake/modules 56 cp ./configs/6/static/cmake/modules/FindNETCDF.cmake ./src/cmake/modules 57 cp ./configs/6/static/src/CMakeLists.txt ./src/src 50 58 51 59 # Configure
Note:
See TracChangeset
for help on using the changeset viewer.