diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 69364651f5..e12f8ecf37 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,7 @@ jobs: CMAKE_GENERATOR: "Visual Studio 17 2022" CMAKE_GENERATOR_PLATFORM: "Win32" - - os: macos-13 + - os: macos-15-intel arch: "x86_64" env: MACOSX_DEPLOYMENT_TARGET: 11.0 @@ -48,7 +48,7 @@ jobs: # Apple Silicon M1/arm64/aarch64 builds: # https://cibuildwheel.readthedocs.io/en/stable/faq/#apple-silicon # https://github.com/pypa/cibuildwheel/pull/704 - - os: macos-13 + - os: macos-14 arch: "arm64" env: CMAKE_OSX_ARCHITECTURES: "arm64" @@ -60,7 +60,7 @@ jobs: # https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary # ADIOS1 tricky to build and HDF5 even with CMake as well (as of 1.12) # We could build them twice and use `lipo` to combine the lib artifacts. - #- os: macos-13 + #- os: macos-15-intel # arch: "universal2" # env: # CMAKE_OSX_ARCHITECTURES: "arm64;x86_64" @@ -70,7 +70,7 @@ jobs: - uses: actions/checkout@v4 with: path: 'src' - ref: '0.16.1' + ref: '0.17.0' - uses: actions/checkout@v4 with: @@ -87,12 +87,12 @@ jobs: python -m pip install cibuildwheel==3.2.1 # 0.16.1.post1 bump - - name: Download Patch 1/1 - uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 # 1.6.0 - id: setupversion - with: - url: "https://github.com/openPMD/openPMD-api/commit/f94a1d48eefbc81784a9c25f61c913cf30fe2ece.patch" - target: src/.patch/ +# - name: Download Patch 1/1 +# uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 # 1.6.0 +# id: setupversion +# with: +# url: "https://github.com/openPMD/openPMD-api/commit/f94a1d48eefbc81784a9c25f61c913cf30fe2ece.patch" +# target: src/.patch/ # # Patch: Fix versioning # - name: Download Patch 1/2 @@ -110,10 +110,10 @@ jobs: # url: "https://github.com/openPMD/openPMD-api/pull/1684.patch" # target: src/.patch/ - - name: Apply Patches - run: | - cd src - git apply .patch/f94a1d48eefbc81784a9c25f61c913cf30fe2ece.patch +# - name: Apply Patches +# run: | +# cd src +# git apply .patch/f94a1d48eefbc81784a9c25f61c913cf30fe2ece.patch - name: Build wheel env: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 50b60cdebf..41de0b5a96 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,6 +13,7 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks +exclude: ^.*\.patch$ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.4.0 diff --git a/.travis.yml b/.travis.yml index f32efa93db..49ae65c7f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ branches: env: global: - - OPENPMD_GIT_REF="0.16.1" + - OPENPMD_GIT_REF="0.17.0" - CIBW_PROJECT_REQUIRES_PYTHON=">=3.10" # Install dependencies on Linux and OSX diff --git a/0001-Fix-h_errno-declarations-for-Windows.patch b/0001-Fix-h_errno-declarations-for-Windows.patch new file mode 100644 index 0000000000..c2ceb8b814 --- /dev/null +++ b/0001-Fix-h_errno-declarations-for-Windows.patch @@ -0,0 +1,41 @@ +From c1b900ff5c674f282463a8dfeb897a39dbc2c454 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Franz=20P=C3=B6schel?= +Date: Fri, 23 Jan 2026 14:42:21 +0100 +Subject: [PATCH] Fix h_errno declarations for Windows + +--- + thirdparty/EVPath/EVPath/ip_config.c | 2 ++ + thirdparty/EVPath/EVPath/qual_hostname.c | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/thirdparty/EVPath/EVPath/ip_config.c b/thirdparty/EVPath/EVPath/ip_config.c +index f058c320d..aba640864 100644 +--- a/thirdparty/EVPath/EVPath/ip_config.c ++++ b/thirdparty/EVPath/EVPath/ip_config.c +@@ -387,7 +387,9 @@ get_qual_hostname(char *buf, int len, attr_list attrs, + if (buf[0] == 0) { + /* bloody hell, what do you have to do? */ + struct in_addr IP; ++#ifndef HAVE_WINDOWS_H + extern int h_errno; ++#endif + char *iface; + if (get_string_attr(attrs, CM_IP_INTERFACE, &iface)){ + IP.s_addr = htonl(get_self_ip_iface(trace_func, trace_data, iface)); +diff --git a/thirdparty/EVPath/EVPath/qual_hostname.c b/thirdparty/EVPath/EVPath/qual_hostname.c +index 138dde170..52cb8c6e0 100644 +--- a/thirdparty/EVPath/EVPath/qual_hostname.c ++++ b/thirdparty/EVPath/EVPath/qual_hostname.c +@@ -342,7 +342,9 @@ get_qual_hostname(void *cm, char *buf, int len, CMtrans_services svc, attr_list + if (buf[0] == 0) { + /* bloody hell, what do you have to do? */ + struct in_addr IP; ++#ifndef HAVE_WINDOWS_H + extern int h_errno; ++#endif + IP.s_addr = htonl(get_self_ip_addr(cm, svc)); + svc->trace_out(cm, "CM - No hostname yet, trying gethostbyaddr on IP %lx", IP); + if (!is_private_IP(ntohl(IP.s_addr))) { +-- +2.51.2 + diff --git a/0001-Try-another-fix.patch b/0001-Try-another-fix.patch new file mode 100644 index 0000000000..8d9ddc8f56 --- /dev/null +++ b/0001-Try-another-fix.patch @@ -0,0 +1,29 @@ +From 176fd3197c1702c8aa9dc6f7bf667729ae6bd2d2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Franz=20P=C3=B6schel?= +Date: Fri, 23 Jan 2026 18:10:23 +0100 +Subject: [PATCH] Try another fix + +--- + thirdparty/ffs/CMakeLists.txt | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/thirdparty/ffs/CMakeLists.txt b/thirdparty/ffs/CMakeLists.txt +index e47512f58..f02868257 100644 +--- a/thirdparty/ffs/CMakeLists.txt ++++ b/thirdparty/ffs/CMakeLists.txt +@@ -4,7 +4,11 @@ set(BUILD_TESTING OFF) + set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_CMAKEDIR}/thirdparty") + + set(FFS_USE_ATL ON CACHE INTERNAL "") +-set(FFS_USE_DILL ON CACHE INTERNAL "") ++if(TARGET dill::dill) ++ set(FFS_USE_DILL ON CACHE INTERNAL "") ++else() ++ set(FFS_USE_DILL OFF CACHE INTERNAL "") ++endif() + set(FFS_LIBRARIES_ONLY ON CACHE INTERNAL "") + set(FFS_QUIET ON CACHE INTERNAL "") + set(FFS_LIBRARY_PREFIX adios2${ADIOS2_LIBRARY_SUFFIX}_ CACHE INTERNAL "") +-- +2.51.2 + diff --git a/library_builders.bat b/library_builders.bat index 35baffd75e..c12c66181d 100644 --- a/library_builders.bat +++ b/library_builders.bat @@ -17,29 +17,29 @@ exit /b 0 :build_adios2 if exist adios2-stamp exit /b 0 - curl -sLo adios2-2.10.2.zip ^ - https://github.com/ornladios/ADIOS2/archive/v2.10.2.zip - powershell Expand-Archive adios2-2.10.2.zip -DestinationPath dep-adios2 - - curl -sLo dep-adios2/ADIOS2-2.10.2/patch.diff https://github.com/franzpoeschel/ADIOS2/commit/patches-fix-32-bit-builds.patch + curl -sLo adios2-2.11.0.zip ^ + https://github.com/ornladios/ADIOS2/archive/v2.11.0.zip + powershell Expand-Archive adios2-2.11.0.zip -DestinationPath dep-adios2 :: Use git-am for applying the patch, :: for some reason, python -m patch just silently does nothing. :: git-am requires a Git repository to apply a patch, but the release zip :: strips away any Git info, so we just quickly initialize a repository. - cd dep-adios2/ADIOS2-2.10.2 + + cd dep-adios2/ADIOS2-2.11.0 git init git config user.email "tooling@tools.com" git config user.name "Tooling" git add . git commit --message="Initial commit so we can use git-am" - git am patch.diff + git am ..\..\..\..\0001-Fix-h_errno-declarations-for-Windows.patch + git show cd .. cd .. cmake --version - cmake -S dep-adios2/ADIOS2-2.10.2 -B build-adios2 ^ + cmake -S dep-adios2/ADIOS2-2.11.0 -B build-adios2 ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_DISABLE_FIND_PACKAGE_LibFFI=TRUE ^ -DBUILD_SHARED_LIBS=OFF ^ @@ -49,7 +49,7 @@ exit /b 0 -DADIOS2_Blosc2_PREFER_SHARED=OFF ^ -DADIOS2_USE_Blosc2=ON ^ -DADIOS2_USE_BZip2=OFF ^ - -DADIOS2_USE_Campaign=OFF ^ + -DADIOS2_USE_Campaign=ON ^ -DADIOS2_USE_Fortran=OFF ^ -DADIOS2_USE_HDF5=OFF ^ -DADIOS2_USE_MHS=OFF ^ @@ -58,7 +58,8 @@ exit /b 0 -DADIOS2_USE_Python=OFF ^ -DADIOS2_USE_ZeroMQ=OFF ^ -DADIOS2_USE_ZFP=ON ^ - -DADIOS2_RUN_INSTALL_TEST=OFF + -DADIOS2_RUN_INSTALL_TEST=OFF ^ + -DSQLite3_ROOT=%BUILD_PREFIX%/SQLite3 if errorlevel 1 exit 1 :: TODO: Could NOT find HDF5 (missing: HDF5_LIBRARIES C) :: -DADIOS2_USE_HDF5=ON @@ -160,6 +161,52 @@ exit /b 0 if errorlevel 1 exit 1 exit /b 0 +:build_sqlite + if exist sqlite-stamp exit /b 0 + + set SQLITE_VERSION="3510200" + + curl -sLo sqlite-amalgamation-%SQLITE_VERSION%.zip ^ + https://www.sqlite.org/2026/sqlite-amalgamation-%SQLITE_VERSION%.zip + if errorlevel 1 exit 1 + + powershell Expand-Archive sqlite-amalgamation-%SQLITE_VERSION%.zip -DestinationPath '.' + if errorlevel 1 exit 1 + + cd sqlite-amalgamation-%SQLITE_VERSION% + if errorlevel 1 exit 1 + + REM Create a minimal CMakeLists.txt + ( + echo cmake_minimum_required(VERSION 3.10^) + echo project(sqlite3 C^) + echo add_library(sqlite3 STATIC sqlite3.c^) + echo target_compile_definitions(sqlite3 PRIVATE SQLITE_ENABLE_FTS3 SQLITE_ENABLE_FTS5 SQLITE_ENABLE_RTREE SQLITE_ENABLE_DBSTAT_VTAB SQLITE_ENABLE_RBU SQLITE_ENABLE_SESSION^) + echo set_property(TARGET sqlite3 PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>"^) + echo install(TARGETS sqlite3 ARCHIVE DESTINATION lib^) + echo install(FILES sqlite3.h DESTINATION include^) + ) > CMakeLists.txt + + :: build and install + cmake -S . -B build ^ + -DCMAKE_INSTALL_PREFIX=%BUILD_PREFIX%/SQLite3 + if errorlevel 1 exit 1 + + cmake --build build --config Release + if errorlevel 1 exit 1 + + cmake --install build --config Release + if errorlevel 1 exit 1 + + :: cleanup + cd .. + rmdir /s /q sqlite-amalgamation-%SQLITE_VERSION% + if errorlevel 1 exit 1 + + break > sqlite-stamp + if errorlevel 1 exit 1 +exit /b 0 + :build_zfp if exist zfp-stamp exit /b 0 @@ -225,6 +272,7 @@ exit /b 0 :main call :install_buildessentials call :build_zlib +call :build_sqlite :: build_bzip2 :: build_szip call :build_zfp diff --git a/library_builders.sh b/library_builders.sh index fc65b96864..a3b9ea716c 100644 --- a/library_builders.sh +++ b/library_builders.sh @@ -9,8 +9,10 @@ BUILD_PREFIX="${BUILD_PREFIX:-/usr/local}" if [ "$(uname -s)" = "Darwin" ] then CPU_COUNT="${CPU_COUNT:-3}" + SUDO="sudo" else CPU_COUNT="${CPU_COUNT:-2}" + SUDO="" fi function install_buildessentials { @@ -75,11 +77,26 @@ function install_buildessentials { function build_adios2 { if [ -e adios2-stamp ]; then return; fi - curl -sLo adios2-2.10.2.tar.gz \ - https://github.com/ornladios/ADIOS2/archive/v2.10.2.tar.gz - file adios2*.tar.gz - tar -xzf adios2*.tar.gz - rm adios2*.tar.gz + # curl -sLo adios2-2.11.0.tar.gz \ + # https://github.com/ornladios/ADIOS2/archive/v2.11.0.tar.gz + # file adios2*.tar.gz + # tar -xzf adios2*.tar.gz + # rm adios2*.tar.gz + + # cd ADIOS2-* + # # Need this PR for static builds https://github.com/ornladios/ADIOS2/pull/4812 + # # Since the PR does not cleanly merge, this is a custom patch that checks out + # # the subdirectories of the atl, dill, EVPath and ffs thirdparty libraries + # patch -p1 ../0001-Pull-in-atl-dill-EVPath-ffs-after-merging-https-gith.patch + # cd .. + + # temporary, need to try sth + git clone https://github.com/ornladios/ADIOS2 ADIOS2-2.11.0 + cd ADIOS2-2.11.0 + git checkout 7a21e4ef2f5def6659e67084b5210a66582d4b1a + patch -p1 ../0001-Try-another-fix.patch + git diff + cd .. # build mkdir build-adios2 @@ -94,7 +111,7 @@ function build_adios2 { -DADIOS2_Blosc2_PREFER_SHARED=OFF \ -DADIOS2_USE_BZip2=OFF \ -DADIOS2_USE_Blosc2=ON \ - -DADIOS2_USE_Campaign=OFF \ + -DADIOS2_USE_Campaign=ON \ -DADIOS2_USE_Fortran=OFF \ -DADIOS2_USE_HDF5=OFF \ -DADIOS2_USE_MHS=OFF \ @@ -108,15 +125,16 @@ function build_adios2 { -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_DISABLE_FIND_PACKAGE_LibFFI=TRUE \ -DCMAKE_DISABLE_FIND_PACKAGE_BISON=TRUE \ + -DFFS_USE_DILL=FALSE \ -DADIOS2_INSTALL_GENERATE_CONFIG=OFF \ -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} ../ADIOS2-* make -j${CPU_COUNT} - make install + ${SUDO} make install # CMake Config package of C-Blosc 2.10.1+ only # https://github.com/ornladios/ADIOS2/issues/3903 - rm -rf ${BUILD_PREFIX}/lib*/cmake/adios2/FindBlosc2.cmake + ${SUDO} rm -rf ${BUILD_PREFIX}/lib*/cmake/adios2/FindBlosc2.cmake cd - @@ -163,7 +181,7 @@ function build_blosc2 { "${architecture_specific_flags[@]}" \ ../c-blosc2-* make -j${CPU_COUNT} - make install + ${SUDO} make install cd - rm -rf build-blosc2 @@ -171,6 +189,32 @@ function build_blosc2 { touch blosc-stamp2 } +function build_sqlite { + if [ -e sqlite-stamp ]; then return; fi + + SQLITE_VERSION="3510200" # "3.51.2" + + curl -sLO https://www.sqlite.org/2026/sqlite-autoconf-${SQLITE_VERSION}.tar.gz + file sqlite-autoconf*.tar.gz + tar xzf sqlite-autoconf-${SQLITE_VERSION}.tar.gz + rm sqlite-autoconf*.tar.gz + + cd sqlite-autoconf-${SQLITE_VERSION} + + ./configure \ + --disable-shared \ + --prefix=${BUILD_PREFIX} \ + --all \ + --disable-readline + make + ${SUDO} make install + + cd - + rm -rf sqlite-autoconf* + + touch sqlite-stamp +} + function build_zfp { if [ -e zfp-stamp ]; then return; fi @@ -192,7 +236,7 @@ function build_zfp { -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} \ ../zfp-* make -j${CPU_COUNT} - make install + ${SUDO} make install cd - rm -rf build-zfp @@ -220,8 +264,8 @@ function build_zlib { -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} PATH=${CMAKE_BIN}:${PATH} cmake --build build-zlib --parallel ${CPU_COUNT} - PATH=${CMAKE_BIN}:${PATH} cmake --build build-zlib --target install - rm -rf ${BUILD_PREFIX}/lib/libz.*dylib ${BUILD_PREFIX}/lib/libz.*so + PATH=${CMAKE_BIN}:${PATH} ${SUDO} cmake --build build-zlib --target install + ${SUDO} rm -rf ${BUILD_PREFIX}/lib/libz.*dylib ${BUILD_PREFIX}/lib/libz.*so rm -rf build-zlib @@ -292,7 +336,7 @@ function build_hdf5 { fi make -j${CPU_COUNT} - make install + ${SUDO} make install cd .. touch hdf5-stamp @@ -314,6 +358,7 @@ fi install_buildessentials build_zlib +build_sqlite build_zfp build_blosc2 build_hdf5