diff --git a/boost.sh b/boost.sh index 2250c8e30b..8c2ba3f820 100644 --- a/boost.sh +++ b/boost.sh @@ -81,6 +81,7 @@ b2 -q \ --disable-icu \ --without-context \ --without-coroutine \ + --without-fiber \ --without-graph \ --without-graph_parallel \ --without-locale \ diff --git a/fairroot.sh b/fairroot.sh index 45345f3818..a29627e357 100644 --- a/fairroot.sh +++ b/fairroot.sh @@ -21,6 +21,7 @@ incremental_recipe: | cmake $SOURCEDIR \ -DCMAKE_GENERATOR=Ninja \ -DCMAKE_INSTALL_PREFIX=$INSTALLROOT \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON cp ${BUILDDIR}/compile_commands.json ${INSTALLROOT} cmake --build . -- ${JOBS+-j $JOBS} install @@ -75,6 +76,7 @@ cmake $SOURCEDIR ${CXXSTD:+-DCMAKE_CXX_STANDARD=$CXXSTD} \ -DCMAKE_DISABLE_FIND_PACKAGE_yaml-cpp=ON \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_INSTALL_PREFIX=$INSTALLROOT diff --git a/rapidjson.sh b/rapidjson.sh index 3af1cb6414..f784d05248 100644 --- a/rapidjson.sh +++ b/rapidjson.sh @@ -14,6 +14,7 @@ cmake $SOURCEDIR \ -G Ninja \ -DCMAKE_INSTALL_PREFIX=$INSTALLROOT \ -DCMAKE_POLICY_DEFAULT_CMP0077=NEW \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DRAPIDJSON_BUILD_TESTS=OFF \ -DRAPIDJSON_BUILD_EXAMPLES=OFF diff --git a/root.sh b/root.sh index 2e422033c1..30dd65c97b 100644 --- a/root.sh +++ b/root.sh @@ -103,8 +103,11 @@ fi # ROOT 6+: enable Python ROOT_PYTHON_FLAGS="-Dpyroot=ON" ROOT_HAS_PYTHON=1 -python_exec=$(python -c 'import distutils.sysconfig; print(distutils.sysconfig.get_config_var("exec_prefix"))')/bin/python3 -if [ "$python_exec" = "$(which python)" ]; then +# Use python3 explicitly for compatibility with systems that don't have 'python' symlink +PYTHON_CMD=$(which python3 2>/dev/null || which python 2>/dev/null || echo "python3") +# Use sysconfig instead of distutils.sysconfig (distutils removed in Python 3.12+) +python_exec=$($PYTHON_CMD -c 'import sysconfig; print(sysconfig.get_config_var("exec_prefix"))')/bin/python3 +if [ "$python_exec" = "$(which $PYTHON_CMD)" ]; then # By default, if there's nothing funny going on, let ROOT pick the Python in # the PATH, which is the one built by us (unless disabled, in which case it # is the system one). This is substituted into ROOT's Python scripts' @@ -205,7 +208,7 @@ cmake --build . --target install ${JOBS+-j $JOBS} # Make sure ROOT actually found its build dependencies and didn't disable # features we requested. "-Dfail-on-missing=ON" would probably be better. -[ "$("$INSTALLROOT/bin/root-config" --has-fftw3)" = yes ] +[ "$("$INSTALLROOT/bin/root-config" --has-fftw3)" = yes ] || { echo "FFTW3 support required"; exit 1; } # Add support for ROOT_PLUGIN_PATH envvar for specifying additional plugin search paths grep -v '^Unix.*.Root.PluginPath' $INSTALLROOT/etc/system.rootrc > system.rootrc.0 @@ -231,8 +234,7 @@ rm -vf "$INSTALLROOT/etc/plugins/TGrid/P010_TAlien.C" \ "$INSTALLROOT/LICENSE" # Make sure all the tools use the correct python -for binfile in "$INSTALLROOT"/bin/*; do - [ -f "$binfile" ] || continue +for binfile in $(find "$INSTALLROOT"/bin -type f -exec grep -Iq . {} \; -print); do if grep -q "^'''exec' .*python.*" "$binfile"; then # This file uses a hack to get around shebang size limits. As we're # replacing the shebang with the system python, the limit doesn't apply and