Skip to content

Commit 5ef587b

Browse files
authored
Get ROOT to compile with new macOS / XCode (#5832)
* Proper rsync in case the sources are not writeable * Bump zlib version * Use proper tag for UUID * Do not build HDF5 tests * Add missing protobuf tag * Cleanup XRootD * Improve reproducibility * Compile GEANT4 * Make ROOT libpng compile * Get ONNXRuntime to compile with the new macOS * Use proper fastjet as baseline
1 parent 488765a commit 5ef587b

22 files changed

+65
-37
lines changed

apmon-cpp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ build_requires:
88
- "GCC-Toolchain:(?!osx)"
99
---
1010
#!/bin/bash -e
11-
rsync -a --exclude='**/.git' --delete --delete-excluded \
11+
rsync -a --chmod=ug=rwX --exclude='**/.git' --delete --delete-excluded \
1212
$SOURCEDIR/ ./
1313
autoreconf -ivf
1414

arrow.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ esac
5858
# boost
5959

6060
mkdir -p ./src_tmp
61-
rsync -a --exclude='**/.git' --delete --delete-excluded "$SOURCEDIR/" ./src_tmp/
61+
rsync -a --chmod=ug=rwX --exclude='**/.git' --delete --delete-excluded "$SOURCEDIR/" ./src_tmp/
6262
case $ARCHITECTURE in
6363
osx*)
6464
# use compatible llvm@18 from brew, if available. This
@@ -106,7 +106,8 @@ cmake ./src_tmp/cpp
106106
${UTF8PROC_ROOT:+-Dutf8proc_ROOT="$UTF8PROC_ROOT"} \
107107
${OPENSSL_ROOT:+-DOpenSSL_ROOT="$OPENSSL_ROOT"} \
108108
${CLANG_ROOT:+-DLLVM_DIR="$CLANG_ROOT"} \
109-
${PYTHON_ROOT:+-DPython3_EXECUTABLE="$(which python3)"} \
109+
${PYTHON_ROOT:+-DPython3_EXECUTABLE="$(which python3)"} \
110+
${XSIMD_REVISION:+-Dxsimd_DIR=${XSIMD_ROOT}} \
110111
-DARROW_WITH_SNAPPY=OFF \
111112
-DARROW_WITH_ZSTD=OFF \
112113
-DARROW_WITH_BROTLI=OFF \
@@ -120,8 +121,8 @@ cmake ./src_tmp/cpp
120121
-DARROW_FILESYSTEM=ON \
121122
-DARROW_BUILD_STATIC=OFF \
122123
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON \
123-
-DCLANG_EXECUTABLE="$CLANG_EXECUTABLE" \
124-
${GCC_TOOLCHAIN_REVISION:+-DGCC_TOOLCHAIN_ROOT=`find "$GCC_TOOLCHAIN_ROOT/lib" -name crtbegin.o -exec dirname {} \;`}
124+
${GCC_TOOLCHAIN_REVISION:+-DGCC_TOOLCHAIN_ROOT="$(find "$GCC_TOOLCHAIN_ROOT/lib"-name crtbegin.o -exec dirname {} \;)"} \
125+
-DCLANG_EXECUTABLE="$CLANG_EXECUTABLE"
125126

126127
cmake --build . -- ${JOBS:+-j $JOBS} install
127128
find "$INSTALLROOT/share" -name '*-gdb.py' -exec mv {} "$INSTALLROOT/lib" \;

boost.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ case $ARCHITECTURE in
5858
*) TOOLSET=gcc ;;
5959
esac
6060

61-
rsync -a "$SOURCEDIR"/ "$BUILDDIR"/
61+
rsync -a --no-specials --no-devices --chmod=ug=rwX --exclude '**/.git' --delete --delete-excluded "$SOURCEDIR"/ "$BUILDDIR"/
6262
cd "$BUILDDIR"/tools/build
6363
# This is to work around an issue in boost < 1.70 where the include path misses
6464
# the ABI suffix. E.g. ../include/python3 rather than ../include/python3m.
@@ -120,4 +120,4 @@ alibuild-generate-module --lib --cmake > etc/modulefiles/"$PKGNAME"
120120
cat << EOF >> etc/modulefiles/"$PKGNAME"
121121
prepend-path ROOT_INCLUDE_PATH \$PKG_ROOT/include
122122
EOF
123-
mkdir -p "$INSTALLROOT"/etc/modulefiles && rsync -a --delete etc/modulefiles/ "$INSTALLROOT"/etc/modulefiles
123+
mkdir -p "$INSTALLROOT"/etc/modulefiles && rsync -a --no-specials --no-devices --delete etc/modulefiles/ "$INSTALLROOT"/etc/modulefiles

clang.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ cmake "$SOURCEDIR/llvm" \
4444
-DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi' \
4545
-DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS_TO_BUILD:?}" \
4646
-DCMAKE_BUILD_TYPE=Release \
47+
${COMPILER_RT_OSX_ARCHS:+-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON} \
48+
${COMPILER_RT_OSX_ARCHS:+-DCOMPILER_RT_OSX_ARCHS=${COMPILER_RT_OSX_ARCHS}} \
4749
-DCMAKE_INSTALL_PREFIX:PATH="$INSTALLROOT" \
4850
-DLLVM_INSTALL_UTILS=ON \
4951
-DPYTHON_EXECUTABLE="$(which python3)" \

cmake.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ source: https://github.com/Kitware/CMake
55
requires:
66
- "OpenSSL:(?!osx)"
77
- "GCC-Toolchain:(?!osx)"
8+
- zlib
9+
- curl
810
build_requires:
911
- make
1012
- alibuild-recipe-tools
@@ -21,6 +23,10 @@ prefer_system_replacement_specs:
2123
CMAKE_VERSION: ""
2224
---
2325
#!/bin/bash -e
26+
SONAME=so
27+
case $ARCHITECTURE in
28+
osx*) SONAME=dylib ;;
29+
esac
2430

2531
cat > build-flags.cmake <<- EOF
2632
# Disable Java capabilities; we don't need it and on OS X might miss the
@@ -29,13 +35,24 @@ SET(JNI_H FALSE CACHE BOOL "" FORCE)
2935
SET(Java_JAVA_EXECUTABLE FALSE CACHE BOOL "" FORCE)
3036
SET(Java_JAVAC_EXECUTABLE FALSE CACHE BOOL "" FORCE)
3137
38+
SET(ZLIB_LIBRARY $ZLIB_ROOT/lib/libz.$SONAME)
39+
SET(ZLIB_INCLUDE_DIR $ZLIB_ROOT/include)
40+
41+
SET(CURL_LIBRARY $CURL_ROOT/lib/libcurl.$SONAME)
42+
SET(CURL_INCLUDE_DIR $CURL_ROOT/include)
43+
SET(BUILD_TESTING OFF)
44+
3245
# SL6 with GCC 4.6.1 and LTO requires -ltinfo with -lcurses for link to succeed,
3346
# but cmake is not smart enough to find it. We do not really need ccmake anyway,
3447
# so just disable it.
3548
SET(BUILD_CursesDialog FALSE CACHE BOOL "" FORCE)
3649
EOF
3750

38-
$SOURCEDIR/bootstrap --prefix=$INSTALLROOT \
51+
rsync -a --chmod=ugo=rwX --delete --exclude '**/.git' --delete-excluded $SOURCEDIR/ ./
52+
53+
./bootstrap --prefix=$INSTALLROOT \
54+
${ZLIB_ROOT:+--no-system-zlib} \
55+
${CURL_ROOT:+--no-system-curl} \
3956
--init=build-flags.cmake \
4057
${JOBS:+--parallel=$JOBS}
4158
make ${JOBS+-j $JOBS}

curl.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ tag: curl-7_70_0
44
source: https://github.com/curl/curl.git
55
build_requires:
66
- "OpenSSL:(?!osx)"
7-
- CMake
87
- alibuild-recipe-tools
98
---
109
#!/bin/bash -e
@@ -14,7 +13,7 @@ if [[ $ARCHITECTURE = osx* ]]; then
1413
else
1514
${OPENSSL_ROOT:+env LDFLAGS=-Wl,-R$OPENSSL_ROOT/lib}
1615
fi
17-
rsync -av --delete --exclude="**/.git" $SOURCEDIR/ .
16+
rsync -a --chmod=ug=rwX --delete --exclude="**/.git" --delete-excluded $SOURCEDIR/ .
1817

1918
sed -i.deleteme 's/CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"/CPPFLAGS="$SSL_CPPFLAGS $CPPFLAGS"/' configure.ac
2019
sed -i.deleteme 's/LDFLAGS="$LDFLAGS $SSL_LDFLAGS"/LDFLAGS="$SSL_LDFLAGS $LDFLAGS"/' configure.ac

defaults-o2.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ overrides:
2727
- JAliEn-ROOT
2828
cgal:
2929
version: 4.12.2
30-
fastjet:
31-
tag: v3.4.1_1.052-alice2
3230
---
3331
# This file is included in any build recipe and it's only used to set
3432
# environment variables. Which file to actually include can be defined by the

fastjet.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package: fastjet
22
version: "%(tag_basename)s"
3-
tag: "v3.2.1_1.024-alice3"
3+
tag: "v3.4.1_1.052-alice3"
44
source: https://github.com/alisw/fastjet
55
requires:
66
- cgal

freetype.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ prefer_system_check: |
1313
if [ $? -ne 0 ]; then printf "FreeType is missing on your system.\n * On RHEL-compatible systems you probably need: freetype freetype-devel\n * On Ubuntu-compatible systems you probably need: libfreetype6 libfreetype6-dev\n"; exit 1; fi
1414
---
1515
#!/bin/bash -ex
16-
rsync -a --exclude='**/.git' --delete --delete-excluded "$SOURCEDIR/" ./
16+
rsync -a --chmod=ug=rwX --exclude='**/.git' --delete --delete-excluded "$SOURCEDIR/" ./
17+
type libtoolize && export LIBTOOLIZE=libtoolize
18+
type glibtoolize && export LIBTOOLIZE=glibtoolize
1719
sh autogen.sh
1820
./configure --prefix="$INSTALLROOT" \
1921
--with-png=no \

geant4.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
package: GEANT4
22
version: "%(tag_basename)s"
3-
tag: "v11.2.0"
3+
tag: "v11.3.0"
44
# source: https://github.com/alisw/geant4.git
55
source: https://gitlab.cern.ch/geant4/geant4.git
66
requires:
77
- "GCC-Toolchain:(?!osx)"
88
- xercesc
9+
- zlib
910
build_requires:
1011
- CMake
1112
- "Xcode:(osx.*)"
@@ -46,15 +47,18 @@ cmake $SOURCEDIR \
4647
${XERCESC_ROOT:+-DXERCESC_ROOT_DIR=$XERCESC_ROOT} \
4748
${CXXSTD:+-DGEANT4_BUILD_CXXSTD=$CXXSTD} \
4849
-DG4_USE_GDML=ON \
49-
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
50+
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
51+
-DGEANT4_USE_SYSTEM_ZLIB=ON
5052

5153

5254
make ${JOBS+-j $JOBS}
5355
make install
5456

5557
# we should not use cached package links
5658
packagecachefile=$(find ${INSTALLROOT} -name "Geant4PackageCache.cmake")
57-
echo "#" > $packagecachefile
59+
if [ -f "$packagecachefile" ]; then
60+
echo "#" > $packagecachefile
61+
fi
5862

5963
# Install data sets
6064
# Can be done after Geant4 installation, if installed with -DGEANT4_INSTALL_DATA=OFF

0 commit comments

Comments
 (0)