Skip to content

Commit

Permalink
try conda compilers with libstdc++ from devtoolset
Browse files Browse the repository at this point in the history
  • Loading branch information
isuruf committed Mar 28, 2024
1 parent b9eef59 commit 9f83560
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions recipe/build_openmm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@ fi
if [[ "$use_conda_compilers" == "0" ]]; then
/usr/bin/sudo -n yum install -y centos-release-scl
/usr/bin/sudo -n yum install -y devtoolset-11-gcc "devtoolset-11-gcc-c++"
source /opt/rh/devtoolset-11/enable
LIBGCC_DIR=$(dirname $(gcc -print-libgcc-file-name))
#source /opt/rh/devtoolset-11/enable
LIBGCC_DIR_OLD=$(dirname $(/opt/rh/devtoolset-11/root/usr/bin/gcc -print-libgcc-file-name))
LIBGCC_DIR=$(dirname $($CC -print-libgcc-file-name))
cp ${LIBGCC_DIR_OLD}/libstdc++* ${LIBGCC_DIR}
export LDFLAGS="-L$LIBGCC_DIR $LDFLAGS"
export CC="$(which gcc) -L$LIBGCC_DIR"
export CXX="$(which g++) -L$LIBGCC_DIR"
export CXXFLAGS="$CXXFLAGS -D_GLIBCXX_USE_CXX11_ABI=0"

# Workaround distutils issues
export CC="$CC -L$LIBGCC_DIR"
export CXX="$CC -L$LIBGCC_DIR"
export CFLAGS="$CFLAGS -D_GLIBCXX_USE_CXX11_ABI=0"
fi


Expand Down

0 comments on commit 9f83560

Please sign in to comment.