From a1fcf88dbb08011bf00c6b090ab930110ceb6872 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 10 Jul 2023 23:36:35 -0400 Subject: [PATCH] Fix local builds where CONDA_BUILD_SYSROOT is not defined --- cantera-matlab/build.sh | 7 +++++-- cantera/build.sh | 10 ++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/cantera-matlab/build.sh b/cantera-matlab/build.sh index 0e73aff..7ad6378 100644 --- a/cantera-matlab/build.sh +++ b/cantera-matlab/build.sh @@ -20,10 +20,13 @@ if [[ "${OSX_ARCH}" == "" ]]; then echo "debug = False" >> cantera.conf echo "logging = 'debug'" >> cantera.conf else - echo "cc_flags = '-isysroot ${CONDA_BUILD_SYSROOT}'" >> cantera.conf + if [[ "${CONDA_BUILD_SYSROOT}" != "" ]]; then + echo "cc_flags = '-isysroot ${CONDA_BUILD_SYSROOT}'" >> cantera.conf + echo "no_debug_linker_flags = '-isysroot ${CONDA_BUILD_SYSROOT}'" >> cantera.conf + fi echo "optimize_flags = ''" >> cantera.conf echo "debug = False" >> cantera.conf - echo "no_debug_linker_flags = '-isysroot ${CONDA_BUILD_SYSROOT}'" >> cantera.conf + echo "use_rpath_linkage = False" >> cantera.conf echo "logging = 'debug'" >> cantera.conf fi diff --git a/cantera/build.sh b/cantera/build.sh index 92d4b8e..59bc457 100644 --- a/cantera/build.sh +++ b/cantera/build.sh @@ -23,10 +23,16 @@ else echo "CC = '${CLANG}'" >> cantera.conf echo "CXX = '${CLANGXX}'" >> cantera.conf echo "blas_lapack_libs = 'openblas'" >> cantera.conf - echo "cc_flags = '-isysroot ${CONDA_BUILD_SYSROOT} ${CFLAGS}'" >> cantera.conf + if [[ "${CONDA_BUILD_SYSROOT}" != "" ]]; then + echo "cc_flags = '-isysroot ${CONDA_BUILD_SYSROOT} ${CFLAGS}'" >> cantera.conf + echo "no_debug_linker_flags = '${LDFLAGS} -isysroot ${CONDA_BUILD_SYSROOT}'" >> cantera.conf + else + echo "cc_flags = '${CFLAGS}'" >> cantera.conf + echo "no_debug_linker_flags = '${LDFLAGS}'" >> cantera.conf + fi echo "optimize_flags = ''" >> cantera.conf echo "debug = False" >> cantera.conf - echo "no_debug_linker_flags = '${LDFLAGS} -isysroot ${CONDA_BUILD_SYSROOT}'" >> cantera.conf + echo "logging = 'debug'" >> cantera.conf echo "renamed_shared_libraries = False" >> cantera.conf echo "use_rpath_linkage = False" >> cantera.conf