Changeset 24653


Ignore:
Timestamp:
03/11/20 16:38:20 (5 years ago)
Author:
jdquinn
Message:

CHG: Support for shared libraries in Boost and Dakota.

Location:
issm/trunk-jpl
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk-jpl/etc/environment.sh

    r24637 r24653  
    223223
    224224DAKOTA_DIR="${ISSM_DIR}/externalpackages/dakota/install"
    225 path_append "$DAKOTA_DIR/bin"
    226 ld_library_path_append "$DAKOTA_DIR/lib"
    227 dyld_library_path_prepend "$DAKOTA_DIR/lib"
     225if [ -d "${DAKOTA_DIR}" ]; then
     226        path_prepend "${DAKOTA_DIR}/bin"
     227        ld_library_path_prepend "${DAKOTA_DIR}/lib"
     228        dyld_library_path_prepend "${DAKOTA_DIR}/lib"
     229fi
    228230
    229231DOXYGEN_DIR="${ISSM_DIR}/externalpackages/doxygen/install"
     
    256258BOOST_DIR="${ISSM_DIR}/externalpackages/boost/install"
    257259BOOSTROOT="${ISSM_DIR}/externalpackages/boost/install"
    258 if [ -d "$BOOST_DIR" ]; then
     260if [ -d "${BOOST_DIR}" ]; then
    259261        export BOOSTROOT
    260262        export BOOST_DIR
    261         ld_library_path_prepend   "$BOOST_DIR/lib"
    262         dyld_library_path_prepend "$BOOST_DIR/lib"
    263         path_prepend      "$BOOST_DIR/bin"
     263        library_path_prepend "${BOOST_DIR}/lib"
     264        ld_library_path_prepend "${BOOST_DIR}/lib"
     265        dyld_library_path_prepend "${BOOST_DIR}/lib"
     266        path_prepend "${BOOST_DIR}/bin"
    264267fi
    265268
  • TabularUnified issm/trunk-jpl/externalpackages/boost/install-1.55-linux-static.sh

    r24649 r24653  
    22#set -eu # Do not `run set -eu` because it causes some targets to fail
    33
    4 
    5 # NOTE:
    6 # - Stop after bootstrap step and run `bjam --debug-configuration` to figure
    7 #       out which paths Boost is using to include Python. Make sure that each of
    8 #       the listed paths is covered by Python. If not, you must create a symbolic
    9 #       link from $ISSM_DIR/externalpackages/python to the location of the file
    10 #       that Boost is expecting. There is no way to get the Boost to compile with
    11 #       Python otherwise.
    12 #
    134
    145## Constants
     
    189## Environment
    1910#
     11export BOOST_ROOT="${ISSM_DIR}/externalpackages/boost"
    2012export CXXFLAGS='-std=c++98' # Setting CXXFLAGS to deal with C++11 incompatibility with Matlab's Boost
    2113
     
    4032cd src
    4133./bootstrap.sh \
    42         --prefix="${ISSM_DIR}/externalpackages/boost/install" \
     34        --prefix=${BOOST_ROOT}/install \
    4335        --with-python=python2.7
    4436
     
    5042
    5143# Copy binary to install directory
    52 mkdir ../install/bin
    53 cp bjam ../install/bin
     44mkdir ${BOOST_ROOT}/install/bin
     45cp bjam ${BOOST_ROOT}/install/bin
  • TabularUnified issm/trunk-jpl/externalpackages/boost/install-1.55-linux.sh

    r24649 r24653  
    22#set -eu # Do not `run set -eu` because it causes some targets to fail
    33
    4 
    5 # NOTE:
    6 # - Stop after bootstrap step and run `bjam --debug-configuration` to figure
    7 #       out which paths Boost is using to include Python. Make sure that each of
    8 #       the listed paths is covered by Python. If not, you must create a symbolic
    9 #       link from $ISSM_DIR/externalpackages/python to the location of the file
    10 #       that Boost is expecting. There is no way to get the Boost to compile with
    11 #       Python otherwise.
    12 #
    134
    145## Constants
     
    167VER="1_55_0"
    178
    18 ## Evnrionment
     9## Environment
    1910#
     11export BOOST_ROOT="${ISSM_DIR}/externalpackages/boost"
    2012export CXXFLAGS='-std=c++98' # Setting CXXFLAGS to deal with C++11 incompatibility with Matlab's Boost
    2113
     
    4032cd src
    4133./bootstrap.sh \
    42         --prefix="${ISSM_DIR}/externalpackages/boost/install" \
     34        --prefix=${BOOST_ROOT}/install \
    4335        --with-python=python2.7
    4436
     
    5042
    5143# Copy binary to install directory
    52 mkdir ../install/bin
    53 cp bjam ../install/bin
     44mkdir ${BOOST_ROOT}/install/bin
     45cp bjam ${BOOST_ROOT}/install/bin
  • TabularUnified issm/trunk-jpl/externalpackages/boost/install-1.55-mac-static.sh

    r24649 r24653  
    22#set -eu # Do not `run set -eu` because it causes some targets to fail
    33
    4 
    5 # NOTE:
    6 # - Stop after bootstrap step and run `bjam --debug-configuration` to figure
    7 #       out which paths Boost is using to include Python. Make sure that each of
    8 #       the listed paths is covered by Python. If not, you must create a symbolic
    9 #       link from $ISSM_DIR/externalpackages/python to the location of the file
    10 #       that Boost is expecting. There is no way to get the Boost to compile with
    11 #       Python otherwise.
    12 #
    134
    145## Constants
     
    167VER="1_55_0"
    178
    18 ## Evnrionment
     9## Environment
    1910#
     11export BOOST_ROOT="${ISSM_DIR}/externalpackages/boost"
    2012export CXXFLAGS='-std=c++98' # Setting CXXFLAGS to deal with C++11 incompatibility with Matlab's Boost
    2113
     
    4032cd src
    4133./bootstrap.sh \
    42         --prefix="${ISSM_DIR}/externalpackages/boost/install" \
     34        --prefix=${BOOST_ROOT}/install \
    4335        --with-python=python2.7
    4436
     
    4739
    4840# Compile and install
    49 ./bjam link=static install
     41./bjam toolset=darwin link=static install
    5042
    5143# Copy binary to install directory
    52 mkdir ../install/bin
    53 cp bjam ../install/bin
     44mkdir ${BOOST_ROOT}/install/bin
     45cp bjam ${BOOST_ROOT}/install/bin
  • TabularUnified issm/trunk-jpl/externalpackages/boost/install-1.55-mac.sh

    r24649 r24653  
    22#set -eu # Do not `run set -eu` because it causes some targets to fail
    33
    4 
    5 # NOTE:
    6 # - Stop after bootstrap step and run `bjam --debug-configuration` to figure
    7 #       out which paths Boost is using to include Python. Make sure that each of
    8 #       the listed paths is covered by Python. If not, you must create a symbolic
    9 #       link from $ISSM_DIR/externalpackages/python to the location of the file
    10 #       that Boost is expecting. There is no way to get the Boost to compile with
    11 #       Python otherwise.
    12 #
    134
    145## Constants
     
    167VER="1_55_0"
    178
    18 ## Evnrionment
     9## Environment
    1910#
     11export BOOST_ROOT="${ISSM_DIR}/externalpackages/boost"
    2012export CXXFLAGS='-std=c++98' # Setting CXXFLAGS to deal with C++11 incompatibility with Matlab's Boost
    2113
     
    4032cd src
    4133./bootstrap.sh \
    42         --prefix="${ISSM_DIR}/externalpackages/boost/install" \
     34        --prefix=${BOOST_ROOT}/install \
    4335        --with-python=python2.7
    4436
     
    4739
    4840# Compile and install
    49 ./bjam install
     41./bjam toolset=darwin install
    5042
    5143# Copy binary to install directory
    52 mkdir ../install/bin
    53 cp bjam ../install/bin
     44mkdir ${BOOST_ROOT}/install/bin
     45cp bjam ${BOOST_ROOT}/install/bin
     46
     47# Set install_name for all shared libraries
     48cd ${BOOST_ROOT}/install/lib
     49for name in *.dylib; do
     50        install_name_tool -id ${BOOST_ROOT}/install/lib/${name} ${name}
     51done
     52
     53## Patch install names for certain libraries
     54#
     55# TODO: Figure out how to reconfigure source to apply these install names at compile time
     56#
     57install_name_tool -change libboost_system.dylib ${BOOST_ROOT}/install/lib/libboost_system.dylib libboost_filesystem.dylib
  • TabularUnified issm/trunk-jpl/externalpackages/dakota/install-6.2-mac.sh

    r24649 r24653  
    4242cp configs/${VER}/mac/cmake/BuildDakotaCustom.cmake ${DAK_SRC}/cmake
    4343cp configs/${VER}/mac/cmake/DakotaDev.cmake ${DAK_SRC}/cmake
     44cp configs/${VER}/mac/cmake/InstallDarwinDylibs.cmake ${DAK_SRC}/cmake
    4445cp configs/${VER}/mac/packages/VPISparseGrid/src/sandia_rules.cpp ${DAK_SRC}/packages/VPISparseGrid/src
    4546
     
    7374# avoid conflict with our definition
    7475sed -i -e "s/#define HAVE_MPI/\/* #define HAVE_MPI *\//g" include/Teuchos_config.h
     76
     77## Patch install names for certain libraries
     78#
     79# TODO: Figure out how to reconfigure source to apply these install names at compile time
     80#
     81install_name_tool -change libdakota_src_fortran.dylib ${DAK_INSTALL}/lib/libdakota_src_fortran.dylib lib/libdakota_src.dylib
     82install_name_tool -change liblhs_mod.dylib ${DAK_INSTALL}/lib/liblhs_mod.dylib lib/liblhs.dylib
     83install_name_tool -change liblhs_mods.dylib ${DAK_INSTALL}/lib/liblhs_mods.dylib lib/liblhs.dylib
     84install_name_tool -change liblhs_mod.dylib ${DAK_INSTALL}/lib/liblhs_mod.dylib lib/liblhs_mods.dylib
     85install_name_tool -change libteuchos.dylib ${DAK_INSTALL}/lib/libteuchos.dylib lib/liboptpp.dylib
     86install_name_tool -change libdfftpack.dylib ${DAK_INSTALL}/lib/libdfftpack.dylib lib/libpecos.dylib
     87install_name_tool -change liblhs_mod.dylib ${DAK_INSTALL}/lib/liblhs_mod.dylib lib/libpecos.dylib
     88install_name_tool -change liblhs_mods.dylib ${DAK_INSTALL}/lib/liblhs_mods.dylib lib/libpecos.dylib
     89install_name_tool -change libpecos_src.dylib ${DAK_INSTALL}/lib/libpecos_src.dylib lib/libpecos.dylib
     90install_name_tool -change libteuchos.dylib ${DAK_INSTALL}/lib/libteuchos.dylib lib/libpecos.dylib
     91install_name_tool -change libdfftpack.dylib ${DAK_INSTALL}/lib/libdfftpack.dylib lib/libpecos_src.dylib
     92install_name_tool -change liblhs.dylib ${DAK_INSTALL}/lib/liblhs.dylib lib/libpecos_src.dylib
     93install_name_tool -change liblhs_mod.dylib ${DAK_INSTALL}/lib/liblhs_mod.dylib lib/libpecos_src.dylib
     94install_name_tool -change liblhs_mods.dylib ${DAK_INSTALL}/lib/liblhs_mods.dylib lib/libpecos_src.dylib
     95install_name_tool -change libteuchos.dylib ${DAK_INSTALL}/lib/libteuchos.dylib lib/libpecos_src.dylib
     96install_name_tool -change li
  • TabularUnified issm/trunk-jpl/src/c/Makefile.am

    r24593 r24653  
    707707endif
    708708
    709 if VERSION
     709
    710710AM_LDFLAGS =
    711 else
    712 AM_LDFLAGS = -avoid-version
    713 endif
    714 
     711
     712if !VERSION
     713AM_LDFLAGS += -avoid-version
     714endif
     715
     716# NOTE:
     717# - On Linux, We probably do not need the -static flag as long as we only
     718#       generate static libraries for external packages. Dynamic system libraries
     719#       will be linked to, whether we like it or not, if no static version is
     720#       available.
     721# - On macOC, static linking of binaries is not supported.
     722#
    715723if STANDALONE_EXECUTABLES
    716 AM_LDFLAGS += -static -Wl,--disable-new-dtags -Wl,-rpath,'$$ORIGIN/../lib'
     724if MAC
     725AM_LDFLAGS += -Wl,-rpath,'$$ORIGIN'
     726else
     727AM_LDFLAGS += -static -Wl,--disable-new-dtags -Wl,-rpath,'$$ORIGIN'
     728endif
    717729endif
    718730
Note: See TracChangeset for help on using the changeset viewer.