Changeset 27397


Ignore:
Timestamp:
11/19/22 15:08:12 (2 years ago)
Author:
jdquinn
Message:

CHG: Updates to way we discover libgfortran in ext pkg install scripts; file name; compact unbind warning suppression.

Location:
issm/trunk-jpl
Files:
13 edited
1 moved

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/externalpackages/dakota/install-6.2-linux-static.sh

    r27357 r27397  
    1313# TODO:
    1414# - Move this to etc/environment.sh
     15# - Test if -static-libgfortran flag will avoid all of this.
     16# - Otherwise, refactor this to work with other gfortran installations.
    1517#
    16 LIBGFORTRAN=$(find /usr -name libgfortran* | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
     18LIBGFORTRAN=$(find /usr -name libgfortran* 2>/dev/null | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
    1719LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
    18 LIBGCC=$(find ${LIBGFORTRAN_ROOT} -name libgcc* | egrep -n libgcc.a | sed "s/[0-9]*://g" | head -1)
     20LIBGCC=$(find ${LIBGFORTRAN_ROOT} -name libgcc* 2>/dev/null | egrep -n libgcc.a | sed "s/[0-9]*://g" | head -1)
    1921
    2022## Environment
  • issm/trunk-jpl/externalpackages/dakota/install-6.2-linux.sh

    r27202 r27397  
    99PREFIX="${ISSM_DIR}/externalpackages/dakota/install" # Set to location where external package should be installed
    1010
     11# Find libgfortran so that we do not have to hardcode it.
     12#
     13# TODO:
     14# - Move this to etc/environment.sh
     15#
     16LIBGFORTRAN=$(find /usr -name libgfortran* 2>/dev/null | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
     17LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
     18
    1119## Environment
    1220#
    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
     21export BLAS_LIBS="-L${BLAS_ROOT}/lib -lfblas -L${LIBGFORTRAN_ROOT} -lgfortran" # Need to export BLAS_LIBS *and* pass it as an option to CMake to ensure that external packages also find it
    1422export DAK_BUILD=${ISSM_DIR}/externalpackages/dakota/build # DO NOT CHANGE THIS
    1523export DAK_INSTALL=${PREFIX} # DO NOT CHANGE THIS
    1624export DAK_SRC=${ISSM_DIR}/externalpackages/dakota/src # DO NOT CHANGE THIS
    17 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
     25export LAPACK_LIBS="-L${LAPACK_ROOT}/lib -lflapack -L${LIBGFORTRAN_ROOT} -lgfortran" # Need to export LAPACK_LIBS *and* pass it as an option to CMake to ensure that external packages also find it
    1826
    1927# Cleanup
  • issm/trunk-jpl/externalpackages/dakota/install-6.2-mac-static.sh

    r27202 r27397  
    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 # Should retrieve a copy of gfortran that is compiled from source before
    14 # returning one that is installed via package manager.
     11# Find libgfortran and libgcc so we do not have to hardcode them
    1512#
    1613# TODO:
    1714# - Move this to etc/environment.sh
    18 # - Test if -static-libgfortran flag will avoid all of this
    19 # - Otherwise, refactor this to work with other gfortran installations
     15# - Test if -static-libgfortran flag will avoid all of this.
     16# - Otherwise, refactor this to work with other gfortran installations.
    2017#
    21 LIBGFORTRAN=$(mdfind -onlyin /usr -name libgfortran | egrep -n libgfortran.a | egrep -v i386 | sed "s/[0-9]*://g" | head -1)
     18LIBGFORTRAN=$(find /usr -name libgfortran* 2>/dev/null | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
    2219LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
    23 LIBGCC=$(mdfind -onlyin ${LIBGFORTRAN_ROOT} -name libgcc | egrep -n libgcc.a | egrep -v i386 | sed "s/[0-9]*://g" | head -1)
     20LIBGCC=$(find ${LIBGFORTRAN_ROOT} -name libgcc* 2>/dev/null | egrep -n libgcc.a | sed "s/[0-9]*://g" | head -1)
    2421
    2522## Environment
  • issm/trunk-jpl/externalpackages/dakota/install-6.2-mac.sh

    r27191 r27397  
    1111# Find libgfortran so that we do not have to hardcode it.
    1212#
    13 # Should retrieve a copy of gfortran that is compiled from source before
    14 # returning one that is installed via package manager.
    15 #
    1613# TODO:
    1714# - Move this to etc/environment.sh
    1815#
    19 LIBGFORTRAN=$(mdfind -onlyin /usr -name libgfortran | egrep -n libgfortran.a | egrep -v i386 | sed "s/[0-9]*://g" | head -1)
     16LIBGFORTRAN=$(find /usr -name libgfortran* 2>/dev/null | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
    2017LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
    2118
  • issm/trunk-jpl/externalpackages/gmsh/install-4-linux-static.sh

    r27202 r27397  
    2424# - Move this to etc/environment.sh
    2525#
    26 LIBGFORTRAN=$(find /usr -name libgfortran* | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
     26LIBGFORTRAN=$(find /usr -name libgfortran* 2>/dev/null | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
    2727LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
    28 LIBGCC=$(find ${LIBGFORTRAN_ROOT} -name libgcc* | egrep -n libgcc.a | sed "s/[0-9]*://g" | head -1)
     28LIBGCC=$(find ${LIBGFORTRAN_ROOT} -name libgcc* 2>/dev/null | egrep -n libgcc.a | sed "s/[0-9]*://g" | head -1)
    2929
    3030# Cleanup
  • issm/trunk-jpl/externalpackages/gmsh/install-4-linux.sh

    r27202 r27397  
    2424# - Move this to etc/environment.sh
    2525#
    26 LIBGFORTRAN=$(find /usr -name libgfortran* | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
     26LIBGFORTRAN=$(find /usr -name libgfortran* 2>/dev/null | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
    2727LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
    2828
  • issm/trunk-jpl/externalpackages/gmsh/install-4-mac-static.sh

    r27202 r27397  
    2222# Find libgfortran and libgcc so we do not have to hardcode them
    2323#
    24 # Should retrieve a copy of gfortran that is compiled from source before returning one that is installed via package manager
    25 #
    2624# TODO:
    2725# - Move this to etc/environment.sh
     
    2927# - Otherwise, refactor this to work with other gfortran installations.
    3028#
    31 LIBGFORTRAN=$(mdfind -onlyin /usr -name libgfortran | egrep -n libgfortran.a | egrep -v i386 | sed "s/[0-9]*://g" | head -1)
     29LIBGFORTRAN=$(find /usr -name libgfortran* 2>/dev/null | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
    3230LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
    33 LIBGCC=$(mdfind -onlyin ${LIBGFORTRAN_ROOT} -name libgcc | egrep -n libgcc.a | egrep -v i386 | sed "s/[0-9]*://g" | head -1)
     31LIBGCC=$(find ${LIBGFORTRAN_ROOT} -name libgcc* 2>/dev/null | egrep -n libgcc.a | sed "s/[0-9]*://g" | head -1)
    3432
    3533# Cleanup
  • issm/trunk-jpl/externalpackages/gmsh/install-4-mac.sh

    r27202 r27397  
    2121# Find libgfortran so that we do not have to hardcode it.
    2222#
    23 # Should retrieve a copy of gfortran that is compiled from source before
    24 # returning one that is installed via package manager.
    25 #
    2623# TODO:
    2724# - Move this to etc/environment.sh
    2825#
    29 LIBGFORTRAN=$(mdfind -onlyin /usr -name libgfortran | egrep -n libgfortran.a | egrep -v i386 | sed "s/[0-9]*://g" | head -1)
     26LIBGFORTRAN=$(find /usr -name libgfortran* 2>/dev/null | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
    3027LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
    3128
  • issm/trunk-jpl/externalpackages/gmt/install-6-linux-static.sh

    r27385 r27397  
    1111# TODO:
    1212# - Move this to etc/environment.sh
     13# - Test if -static-libgfortran flag will avoid all of this.
     14# - Otherwise, refactor this to work with other gfortran installations.
    1315#
    14 LIBGFORTRAN=$(find /usr -name libgfortran* | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
     16LIBGFORTRAN=$(find /usr -name libgfortran* 2>/dev/null | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
    1517LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
    16 LIBGCC=$(find ${LIBGFORTRAN_ROOT} -name libgcc* | egrep -n libgcc.a | sed "s/[0-9]*://g" | head -1)
     18LIBGCC=$(find ${LIBGFORTRAN_ROOT} -name libgcc* 2>/dev/null | egrep -n libgcc.a | sed "s/[0-9]*://g" | head -1)
    1719
    1820GDAL_EXTRA_LIBS="-lstdc++" # Determined by running `$GDAL_ROOT/bin/gdal-config --dep-libs` then removing duplicate libs
  • issm/trunk-jpl/externalpackages/gmt/install-6-linux.sh

    r27202 r27397  
    1212# - Move this to etc/environment.sh
    1313#
    14 LIBGFORTRAN=$(find /usr -name libgfortran* | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
     14LIBGFORTRAN=$(find /usr -name libgfortran* 2>/dev/null | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
    1515LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
    1616
  • issm/trunk-jpl/externalpackages/gmt/install-6-mac-static.sh

    r27385 r27397  
    99# Find libgfortran and libgcc so we do not have to hardcode them
    1010#
    11 # Should retrieve a copy of gfortran that is compiled from source before returning one that is installed via package manager
    12 #
    1311# TODO:
    1412# - Move this to etc/environment.sh
     
    1614# - Otherwise, refactor this to work with other gfortran installations.
    1715#
    18 LIBGFORTRAN=$(mdfind -onlyin /usr -name libgfortran | egrep -n libgfortran.a | egrep -v i386 | sed "s/[0-9]*://g" | head -1)
     16LIBGFORTRAN=$(find /usr -name libgfortran* 2>/dev/null | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
    1917LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
    20 LIBGCC=$(mdfind -onlyin ${LIBGFORTRAN_ROOT} -name libgcc | egrep -n libgcc.a | egrep -v i386 | sed "s/[0-9]*://g" | head -1)
     18LIBGCC=$(find ${LIBGFORTRAN_ROOT} -name libgcc* 2>/dev/null | egrep -n libgcc.a | sed "s/[0-9]*://g" | head -1)
    2119
    2220GDAL_EXTRA_LIBS="-lc++" # `$GDAL_ROOT/bin/gdal-config --dep-libs` does not report need to link to libc++ (see also customized configuration file ./configs/6/static/cmake/modules/FindGDAL.cmake)
  • issm/trunk-jpl/externalpackages/gmt/install-6-mac.sh

    r27202 r27397  
    99# Find libgfortran so that we do not have to hardcode it.
    1010#
    11 # Should retrieve a copy of gfortran that is compiled from source before
    12 # returning one that is installed via package manager.
    13 #
    1411# TODO:
    1512# - Move this to etc/environment.sh
    1613#
    17 LIBGFORTRAN=$(mdfind -onlyin /usr -name libgfortran | egrep -n libgfortran.a | egrep -v i386 | sed "s/[0-9]*://g" | head -1)
     14LIBGFORTRAN=$(find /usr -name libgfortran* 2>/dev/null | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
    1815LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
    1916
  • issm/trunk-jpl/m4/issm_options.m4

    r27202 r27397  
    337337                export CXXFLAGS="-std=C++11"
    338338        fi
     339        dnl Fix for compact unwind warning
     340        if test "${LDFLAGS}" == ""; then
     341                LDFLAGS="-Wl,-no_compact_unwind"
     342        else
     343                LDFLAGS="${LDFLAGS} -Wl,-no_compact_unwind"
     344        fi
    339345        AC_SUBST([OSLIBS])
    340346        AC_MSG_RESULT([done])
Note: See TracChangeset for help on using the changeset viewer.