Skip to content

Comments

RC feb26#582

Open
fuhlig1 wants to merge 38 commits intoFairRootGroup:devfrom
fuhlig1:RC_feb26
Open

RC feb26#582
fuhlig1 wants to merge 38 commits intoFairRootGroup:devfrom
fuhlig1:RC_feb26

Conversation

@fuhlig1
Copy link
Member

@fuhlig1 fuhlig1 commented Feb 13, 2026

This PR updates nearly all packages to their latest available versions. The main changes are

  • Update minimal CMake version to 3.24. If the optional packages onnxruntime and dds should be compiled a CMake version > 3.28 is needed.
  • Bump cmake version in bootstrap script to 4.2.3.
  • Update setup scripts for various systems. Add missing packages.
  • Update the used versions of many packages.
  • Fix issues with CMake 4.x.x. CMake dropped old policies, if old CMake configuration code is used an extra parameter has to be passed when running CMake. Most packages already updated their CMake code.
  • Add RPATH information to the shared libraries. This should allow to get rid of the usage of (DY)LD_LIBRARY_PATH.
  • On macOS allow to use a non standard SDK. This allows to compile older ROOT versions on systems with the newest SDK.
  • Update the documentation. Add information about the SDK usage on macOS. Update information about tested systems and included packages.
  • Add the FairRoot dev branch to the test suite.
  • Build the optional package dds in the test suite.

One of the installed cmake scripts of vecgeom has a runtime dependency
of CMake 3.24. To fix the issues that this breaks when using
CMake < 3.24 during configuration of ROOT we don't allow CMake < 3.24
from the beginning.
Fix license header.
@fuhlig1 fuhlig1 added this to the next milestone Feb 13, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 13, 2026

📝 Walkthrough

Walkthrough

Updates build and test orchestration, macOS SDK/sysroot handling, dependency versions and patches, macOS-specific build fixes (ROOT, VecGeom, pythia8), test submission flow, and multiple distro bootstrap/setup scripts and docs.

Changes

Cohort / File(s) Summary
macOS SDK & Sysroot Handling
FairSoftConfig.cmake, FairSoft_test.cmake, test/legacy/fairroot.sh.in
Guard macOS SDK detection so Brew-derived CMAKE_OSX_SYSROOT is set only when CMAKE_OSX_SYSROOT is unset; propagate CMAKE_OSX_SYSROOT into test/build invocations and add -DCMAKE_C_STANDARD=11 to generated cmake args.
Test workflow & submission
FairSoft_test.cmake
Add optional tests for dds and onnxruntime (onnxruntime gated by CMake ≥3.28), integrate these tests into the ctest submit sequence, and ensure build/test error propagation to _ctest_build_retval/_ctest_build_errors.
Core build/package updates
cmake/legacy.cmake
Bump copyright years and CMake policy/version, add FAIRSOFT_RPATH_ARGS propagation, prefer gpatch/gmake on Apple, pass explicit compiler args, add macOS -isysroot handling across packages, and upgrade many package versions (boost, fmt, dds, fairlogger, vecgeom, geant4, root, onnxruntime, pythia8, etc.).
ONNXRuntime changes
legacy/onnxruntime/... (fix_gcc13_compilation.patch, fix_python_detection.patch, install_config_files.patch)
Add Fedora 38 detection and GCC13 guards for AVX assembly, switch to modern find_package(Python COMPONENTS Interpreter Development), and remove/install-time ONNXRuntime CMakeConfig files (delete config/version cmake files and their install step).
ROOT macOS & RPATH fixes
legacy/root/... (fix_macos_sdk_for_rootcling.patch, fix_macosx_findOpenGL.patch, fix_rpath_info.patch)
Thread CMAKE_OSX_SYSROOT/SDKROOT into rootcling/dictionary generation and add --macosx-sdk root-config option; remove macOS OpenGL framework-reorder logic; add ROOT_APPEND_LIBDIR_TO_INSTALL_RPATH usage in several CMakeLists.
Smaller patches / compatibility
legacy/boost/support-numpy-2.patch, legacy/dds/relax_protobuf_requirement.patch, legacy/pythia6/add_missing_extern_keyword.patch
Boost numpy ABI guard added; relax Protobuf version requirement in dds; convert pythia6 global definitions to extern declarations.
Bootstrap & docs
legacy/bootstrap-cmake.sh, legacy/README.md, legacy/advanced.md
Bump bootstrapped CMake to 4.2.3 with macOS-specific install flow; update release/patch naming (feb26/dev variants); add macOS SDK guidance and notes about onnxruntime/dds requiring newer CMake.
Platform setup scripts
legacy/setup-debian.sh, legacy/setup-fedora.sh, legacy/setup-macos.sh, legacy/setup-opensuse.sh
Streamline/modify package lists, add tools (bash, make, ncdu, htop, joe), change Fedora/OpenSUSE install semantics, add OS-version-specific compiler/Python handling for openSUSE, and add cleanup steps.
Misc tests/build glue
legacy/README.md, legacy/bootstrap-cmake.sh, legacy/dds/..., test/legacy/fairroot.sh.in
Document and script changes related to CMake bootstrapping, onnxruntime/dds CMake requirements, macOS SDK workarounds, and updated test/build invocation patterns.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant CI as Build System
participant DDS as dds Test
participant CMake as CMake (version check)
participant ORT as onnxruntime Test
participant Submit as fairsoft_ctest_submit

CI->>CI: build legacy path
CI->>DDS: run dds test (if build OK)
DDS-->>CI: result
CI->>CMake: check CMake version
alt CMake ≥ 3.28 and previous tests OK
    CI->>ORT: run onnxruntime test
    ORT-->>CI: result
end
CI->>Submit: fairsoft_ctest_submit (submit after tests)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'RC feb26' is vague and generic, providing no meaningful information about the actual changes in this large changeset. Consider a more descriptive title that highlights the main change, such as 'Update packages to latest versions and improve macOS SDK support' or 'RC feb26: Package updates and CMake 4.x compatibility fixes'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description is comprehensive and clearly explains the major updates (package versions, CMake requirements, RPATH handling, macOS SDK support, setup scripts, and test suite changes) that correspond to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into dev

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
FairSoft_test.cmake (1)

183-203: ⚠️ Potential issue | 🟠 Major

A dds build failure prevents onnxruntime from being tested.

Line 195 checks NOT _ctest_build_errors, but _ctest_build_errors is updated by the dds build on line 187. Since these are independent optional packages, a dds failure shouldn't block onnxruntime testing. Consider tracking their error counts separately or resetting before the onnxruntime build.

🔧 Proposed fix — use separate error tracking
   # Test the optional packages dds and onnxruntime
   # onnxruntime needs at least CMAKE 3.28
   if(NOT _ctest_build_errors)
     ctest_build(RETURN_VALUE _ctest_build_retval
                 NUMBER_ERRORS _ctest_build_errors
                 TARGET "dds"
                 FLAGS "-j${NCPUS}")
     if (_ctest_build_errors)
       set(_ctest_build_retval 255)
     endif()
   endif()
   fairsoft_ctest_submit()
-  if(NOT _ctest_build_errors AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.28.0)
+  if(NOT _ctest_build_retval_main AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.28.0)
     ctest_build(RETURN_VALUE _ctest_build_retval
                 NUMBER_ERRORS _ctest_build_errors
                 TARGET "onnxruntime"
                 FLAGS "-j${NCPUS}")
     if (_ctest_build_errors)
       set(_ctest_build_retval 255)
     endif()
   endif()

This requires saving the main build's error state before the optional package builds. Alternatively, if the intent is indeed to skip onnxruntime when dds fails, a comment clarifying this dependency would help.

🤖 Fix all issues with AI agents
In `@cmake/legacy.cmake`:
- Around line 378-388: The vecgeom ExternalProject_Add invocation is missing the
source cache dependency so its downloads can race with source extraction; update
the DEPENDS clause of ExternalProject_Add(vecgeom) to include the source-cache
dependency used elsewhere (either ${DEPENDS_ON_SOURCE_CACHE} or
${extract_source_cache_target}) alongside vc so that vecgeom waits for the
source cache extraction before starting.
- Around line 372-376: Update the processor check so ARM and AArch64 both select
the scalar VecGeom backend: change the if condition that currently uses
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm") to use CMAKE_SYSTEM_PROCESSOR
MATCHES "arm|aarch64" (i.e. include "aarch64" in the regex) and remove the
unnecessary ${} expansion; keep the existing set(vector
"-DVECGEOM_VECTOR=empty") for the ARM/AArch64 branch and set(vector
"-DVECGEOM_VECTOR=native") in the else branch.

In `@legacy/advanced.md`:
- Around line 62-71: Fix three minor grammar issues in the paragraph: change
"rootcling take the setting" to "rootcling takes the setting", change "With this
changes" to "With these changes", and change "macosx 15" to "macOS 15" so the
sentences read correctly and use proper casing.

In `@legacy/bootstrap-cmake.sh`:
- Line 22: The cmakeversion variable (cmakeversion="4.2.3") combined with the
existing filename construction breaks on macOS because CMake ships macOS
tarballs as "macos-universal" rather than "darwin-{arch}"; update the download
filename logic in legacy/bootstrap-cmake.sh (where filenames are built from
cmakeversion and platform/arch) to special-case darwin for v4.2.3 (and any
future versions that use macos-universal): when uname reports Darwin, map the
platform to "macos-universal" and use that exact token (instead of
darwin-{arm64,x86_64}) when composing the tarball name and checksum lookup so
the script requests cmake-4.2.3-macos-universal.tar.gz and the corresponding SHA
file.

In `@legacy/onnxruntime/fix_gcc13_compilation.patch`:
- Around line 20-22: The string(FIND) call uses an unquoted variable which can
be split if /etc/fedora-release contains list separators; change file(READ
"/etc/fedora-release" fedora_info) and then call string(FIND "${fedora_info}"
"38" fedora38) (quote the variable and the needle) and adjust the following
if(${fedora38} GREATER -1) block to match parent indentation; ensure quotes
around literals/variables in string(FIND) and keep consistent indentation for
the if/endif scope.

In `@legacy/README.md`:
- Around line 54-89: In the "3.1 CMake configure step for macOS users" section
of README.md fix the typos and redundant notice: change the phrase "on needs" to
"one needs", correct "macOs" to "macOS" wherever it appears (e.g., the example
comment and mentions), and remove or rephrase the final redundant notice line
"macOS users: Notice [macOS SDK](advanced.md#macos-sdk)!" so it doesn't repeat
the earlier guidance; update the paragraph text accordingly to preserve meaning
and capitalization consistency.

In `@legacy/root/fix_macos_sdk_for_rootcling.patch`:
- Around line 64-67: The comment for the --macosx-sdk case is incorrect; update
the inline comment in the case block (the line above the assignment to out in
the --macosx-sdk handler) so it describes that this option outputs the macOS SDK
path (e.g., "Output the macOS SDK path") rather than "Output the prefix"; locate
the --macosx-sdk case where out is set to "$out `@macosxsdk`@" and replace the
comment accordingly.
- Around line 87-88: The new elseif branch that sets rootcling_env (elseif(APPLE
AND CMAKE_OSX_SYSROOT) ... set(rootcling_env ...)) incorrectly hardcodes
LD_LIBRARY_PATH; change it to use the existing ${ld_library_path} variable so it
resolves to DYLD_LIBRARY_PATH on macOS (and LD_LIBRARY_PATH on Linux) and
include SDKROOT=${CMAKE_OSX_SYSROOT} as before; update the set(rootcling_env
...) call in that branch to mirror the else branch pattern using
${ld_library_path} and SDKROOT for consistency.

In `@legacy/setup-fedora.sh`:
- Line 12: The package list line containing "libunistring-devel libuuid-devel
libxml2-devel libzstd-devel lz4-devel m4 make make mesa-libGL-devel" has a
duplicated "make"; remove the second "make" from that package list in
legacy/setup-fedora.sh so the list contains only one "make" token.

In `@legacy/setup-opensuse.sh`:
- Line 19: The assignment to os_version uses `${...}` (parameter expansion)
instead of command substitution so the pipeline is never executed; replace the
expression with a proper command substitution using $(...) or, better, source
/etc/os-release and read VERSION or VERSION_ID directly. Update the line that
sets os_version (the os_version=... expression) to either use os_version=$(grep
'VERSION=' /etc/os-release | cut -d\" -f2) or source /etc/os-release and set
os_version="$VERSION" (or "$VERSION_ID") to reliably capture the OS version.
- Around line 12-13: Remove the duplicated package list entry "libXmu-devel
libXpm-devel libXrender-devel liblz4-devel libzstd-devel lsb-release Mesa-devel"
in legacy/setup-opensuse.sh: keep a single occurrence of that package string in
the zypper install arguments (remove the copy-paste duplicate), and scan the
surrounding install command to ensure there are no other repeated package
tokens.
- Around line 20-35: The conditional checks use the literal Jinja/Ansible string
"{{ os_version }}" so both branches never run; change the conditional
expressions in the [[ ... ]] tests to use the shell variable (e.g. "$os_version"
or "${os_version}") instead of the literal, updating both occurrences of [[ "{{
os_version }}" == "15.6" ]] and [[ "{{ os_version }}" == "16.0" ]] so the
intended package-install branches (gcc14/python310/protobuf-c-devel) execute at
runtime.
- Around line 29-31: Don't remove the system python package; replace the three
commands (zypper remove -y python3 python3-devel, rm /usr/bin/python3, ln -s
/usr/bin/python3.10 /usr/bin/python3) with a safer approach: leave the system
package installed and either register python3.10 with update-alternatives (so
/usr/bin/python3 is managed) or, if you must create a symlink, only create it
without removing the package and guard the removal with a safe check (use a
force/remove-if-present behavior) and verify /usr/bin/python3.10 exists before
linking; update the script around the zypper/remove and ln -s operations to
implement one of these safer flows.
🧹 Nitpick comments (9)
legacy/onnxruntime/fix_gcc13_compilation.patch (2)

29-36: Inconsistent indentation on endif() closings.

Lines 35 and 36 use different indentation levels (5 and 3 spaces respectively) compared to the rest of the block which uses multiples of 2. This is likely a copy-paste artifact.

Proposed fix
         if(NOT(Fedora38_FOUND))
           if(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 13.1 AND NOT(APPLE))
             set(mlas_platform_srcs_avx2
               ${mlas_platform_srcs_avx2}
               ${MLAS_SRC_DIR}/x86_64/cvtfp16Avx.S
             )
-         endif()
-       endif()
+          endif()
+        endif()

49-50: __GNUC_RH_RELEASE__ used without defined() guard — may trigger -Wundef warnings.

On non-Red Hat toolchains, __GNUC_RH_RELEASE__ is undefined. While undefined macros evaluate to 0 in #if expressions (so the logic is correct), compilers with -Wundef enabled will emit a warning. A defined() check makes the intent explicit.

Proposed fix
-#if (defined(_MSC_VER) && (_MSC_VER >= 1933)) || (defined(__GNUC__) && (__GNUC__ >= 13)  && (__GNUC_RH_RELEASE__ != 7))
+#if (defined(_MSC_VER) && (_MSC_VER >= 1933)) || (defined(__GNUC__) && (__GNUC__ >= 13) && (!defined(__GNUC_RH_RELEASE__) || (__GNUC_RH_RELEASE__ != 7)))
legacy/root/fix_rpath_info.patch (1)

31-42: Inconsistent MSVC guard for ROOT_APPEND_LIBDIR_TO_INSTALL_RPATH in pythonizations.

In the CPyCppyy and cppyy-backend patches, the ROOT_APPEND_LIBDIR_TO_INSTALL_RPATH call is guarded by if(NOT MSVC), but in pythonizations/CMakeLists.txt (line 39) it's called unconditionally. If this is intentional (e.g., MSVC doesn't reach this code path), a brief comment would clarify; otherwise, wrap it in the same guard for consistency.

legacy/README.md (2)

77-84: Add language specifiers to fenced code blocks.

Static analysis (markdownlint MD040) flags lines 77 and 83 for missing language specifiers on fenced code blocks. Adding bash or text improves rendering and accessibility.


163-168: Trailing whitespace on line 164.

Line 164 contains only whitespace. Consider removing the trailing spaces.

cmake/legacy.cmake (4)

62-70: Prefer variable name over expansion in if() condition.

On Line 62, ${CMAKE_MAKE_PROGRAM} is eagerly expanded before if() evaluates the MATCHES predicate. This works in common cases, but paths with spaces or semicolons would break the condition. The idiomatic CMake way is to pass the variable name directly:

-if(APPLE AND ${CMAKE_MAKE_PROGRAM} MATCHES ".*/make$")
+if(APPLE AND CMAKE_MAKE_PROGRAM MATCHES ".*/make$")

CMake's if() auto-dereferences variable names in MATCHES expressions.


110-110: Remove leftover debug artifact.

This commented-out FATAL_ERROR message is a debug leftover and should be removed before merging.

-#message(FATAL_ERROR "CMAKE_DEFAULT_ARGS: ${CMAKE_DEFAULT_ARGS}")

429-431: Dead condition: CMAKE_VERSION VERSION_GREATER 3.15 is always true.

Since cmake_minimum_required is now 3.24 (Line 8), the CMAKE_VERSION VERSION_GREATER 3.15 check on Line 429 is always satisfied. This can be simplified:

-if(APPLE AND CMAKE_VERSION VERSION_GREATER 3.15)
-  set(root_builtin_glew "-Dbuiltin_glew=ON")
-endif()
+if(APPLE)
+  set(root_builtin_glew "-Dbuiltin_glew=ON")
+endif()

Or merge it into the existing if(APPLE) block that follows on Line 432.


112-117: Ensure consistent RPATH configuration across all CMake-based packages.

FAIRSOFT_RPATH_ARGS is applied to only 7 of 21 packages: zeromq, clhep, geant4, vmc, geant3, vgm, and geant4_vmc. The remaining 14 packages (fmt, fairlogger, fairmq, hepmc, vc, vecgeom, flatbuffers, faircmakemodules, boost, dds, pythia8, root, onnxruntime, fairsoft-config) do not receive these RPATH arguments. ROOT handles RPATH explicitly with -Drpath=ON, but packages like fmt, fairlogger, fairmq, hepmc, vc, vecgeom, and flatbuffers have no visible RPATH configuration. This inconsistency could result in some libraries not being built with proper RPATH support, potentially leaving gaps in eliminating (DY)LD_LIBRARY_PATH reliance.

Add additional packages.
The default bash version on macosx is to old to support all features
needed in the test suite of FairRoot.
The system version of make doesn't properly support the jobserver
such that the build process ins't properly parallelized.
With this commit the correct RPATH information is added to the shared
libraries and binaries of all installed packages. For packages not
adding the info already properly we add some CMake variables in our
meta build system to pass the needed information to the CMake based
build system of the individual packages.
With this change the FairSoft installtion is definitely not relocatable
any longer, but it is not clear if it was before.
With the changes the environment varaible (DY)LD_LIBRARY_PATH shouldn't
be needed any longer. But this fact still has to be tested.

This PR fixes FairRootGroup#535
On some systems the default compiler is to old to compile FairSoft.
Allow using a newer non system compiler by using CMAKE variables which
are properly passed to the package build systems.
Before a SDK defined via the CMake parameter CMAKE_OSX_SYSROOT was
overwritten with the value extracted from brew.
Pythia6 isn't supported by ROOT any longer.
Take code form Cern GitLab repo. There is no package any longer.
In contrast to the default packages onnxruntime needs newer versions of
CMake (cmake >=3.28) and the compiler (gcc >= 11.1).
For the optional package this is tolerated. The error messages are
meaningful and point to the problem of insufficient versions.
Do not search for any packages in the system for packages added using
FetchContent. The packages included with onnxruntime are verry
specific and may interfere with system installed packages.
Add patch needed for Fedora 38.

Fixes FairRootGroup#510
Add a patch such that rootcling also uses the specified SDK if defined
with -DCMAKE_OSX_SYSROOT. This allows in some cases to compile older
ROOT versions with newer compiler versions. For example it becomes
possible to compile ROOT 6.30 with Apple Clang 17 on macosx 15.6.
All projects depending on ROOT need also to set CMAKE_OSX_SYSROOT to the
same value used when building ROOT. Otherwise the dictionary generation
may fail. Currently there is no way to automatically extract the
information from the ROOT CMake configuration.
Describe some known problems on macosx and the corresponding
solutions.
Pass the needed information to the boost build system if a non
standard SDK is used.
Pass the needed information to the pythia8 build system if a non
standard SDK is used.
Properly pass CMAKE_OSX_SYSROOT to the build and test processes.
Some legacy C code can't be compiled with C standard version 23 which
is the new default for gcc15 so use C standard version 11 for the
compilation.
@fuhlig1
Copy link
Member Author

fuhlig1 commented Feb 13, 2026

@CodeRabbit full review

@coderabbitai
Copy link

coderabbitai bot commented Feb 13, 2026

✅ Actions performed

Full review triggered.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
FairSoft_test.cmake (1)

183-204: ⚠️ Potential issue | 🟠 Major

Optional dds/onnxruntime build failures cascade and block the main test suite.

The _ctest_build_errors / _ctest_build_retval variables are shared between the main build and the optional package builds. If dds fails on line 190, _ctest_build_retval is set to 255 (line 191), and then line 232 skips all FairRoot tests with "Skipping Tests, Build Failed." This means an optional package failure prevents the main test suite from running.

Consider isolating the optional builds' error state, or resetting _ctest_build_retval after optional builds so the main test suite still runs:

Proposed fix
   # Test the optional packages dds and onnxruntime
   # onnxruntime needs at least CMAKE 3.28
+  set(_optional_build_failed FALSE)
   if(NOT _ctest_build_errors)
     ctest_build(RETURN_VALUE _ctest_build_retval
                 NUMBER_ERRORS _ctest_build_errors
                 TARGET "dds"
                 FLAGS "-j${NCPUS}")
     if (_ctest_build_errors)
-      set(_ctest_build_retval 255)
+      set(_optional_build_failed TRUE)
+      set(_ctest_build_errors 0)
     endif()
   endif()
   fairsoft_ctest_submit()
-  if(NOT _ctest_build_errors AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.28.0)
+  if(NOT _optional_build_failed AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.28.0)
     ctest_build(RETURN_VALUE _ctest_build_retval
                 NUMBER_ERRORS _ctest_build_errors
                 TARGET "onnxruntime"
                 FLAGS "-j${NCPUS}")
     if (_ctest_build_errors)
-      set(_ctest_build_retval 255)
+      set(_optional_build_failed TRUE)
     endif()
   endif()
   fairsoft_ctest_submit()
+  # Reset so optional failures don't block the main test suite
+  set(_ctest_build_retval 0)
🤖 Fix all issues with AI agents
In `@legacy/bootstrap-cmake.sh`:
- Around line 34-37: The grep pattern is wrapped in single quotes so ${unames}
and ${unamem} are not expanded; update the assignment of grepstring (the
variable named grepstring near where cmaketargz is set) to use double quotes so
the shell expands ${unames} and ${unamem} (e.g.,
grepstring="${unames}.*${unamem}.*\.tar\.gz"), ensuring the regex and escaped
dot remain intact for correct checksum matching.
- Around line 13-18: The script's install-directory check uses a misspelled
command `eche` which will cause "command not found" before the exit; replace the
`eche "Please create the directory."` invocation with `echo "Please create the
directory."` so the explanatory message is printed correctly in the
install-directory check block (the conditional that tests `$? -ne 0` and
currently prints "Install directory $installdir must exist on macOS.").

In `@legacy/README.md`:
- Around line 87-89: Combine the incomplete sentence "More information can be
found at" and the separate "**macOS users**: Notice [macOS
SDK](advanced.md#macos-sdk)!" into a single concise sentence that links to the
advanced section (e.g., "For macOS users, see the macOS SDK section
(advanced.md#macos-sdk) for more information.") and remove the redundant
standalone notice line so the README reads as one complete, non-repetitive
sentence.

In `@legacy/setup-opensuse.sh`:
- Line 18: The os_version assignment uses an unanchored grep which matches both
VERSION= and VERSION_ID= causing os_version to contain multiple lines and
breaking subsequent comparisons; fix by sourcing /etc/os-release (e.g., .
/etc/os-release) and then use the VERSION variable directly, or if you prefer to
keep parsing, change the grep to anchor '^VERSION=' so os_version only captures
the intended VERSION value used in the comparisons that follow.
🧹 Nitpick comments (7)
legacy/root/fix_rpath_info.patch (2)

22-27: Nit: extra blank line after endif().

There's a double blank line separating the new block from set_property. One blank line would be consistent with the surrounding style.


39-40: Inconsistent MSVC guard compared to the other two patch hunks.

In CPyCppyy and cppyy-backend, ROOT_APPEND_LIBDIR_TO_INSTALL_RPATH is guarded by if(NOT MSVC), but here in pythonizations it's called unconditionally. If the function is safe to call on MSVC (likely a no-op), this works but is inconsistent. Consider wrapping for consistency:

Proposed diff
-ROOT_APPEND_LIBDIR_TO_INSTALL_RPATH(${libname} ${CMAKE_INSTALL_LIBDIR})
+if(NOT MSVC)
+  ROOT_APPEND_LIBDIR_TO_INSTALL_RPATH(${libname} ${CMAKE_INSTALL_LIBDIR})
+endif()
legacy/onnxruntime/fix_gcc13_compilation.patch (2)

35-36: Inconsistent indentation on endif() closings.

Line 35 uses 9 spaces and line 36 uses 7 spaces. These should be aligned with their corresponding if() blocks (8 spaces each, matching the surrounding scope).

♻️ Proposed fix
-         endif()
-       endif()
+        endif()
+        endif()

49-50: The __GNUC_RH_RELEASE__ guard is functionally correct but brittle.

On non–Red Hat compilers, __GNUC_RH_RELEASE__ is undefined and evaluates to 0 in the preprocessor, so 0 != 7 is true — preserving the original behavior. On Fedora 38's GCC 13 (where __GNUC_RH_RELEASE__ is 7), it correctly disables the AVX NE CONVERT path.

Consider wrapping the check with defined() for clarity and to avoid relying on the implicit-zero behavior of undefined macros:

♻️ Proposed alternative
-#if (defined(_MSC_VER) && (_MSC_VER >= 1933)) || (defined(__GNUC__) && (__GNUC__ >= 13)  && (__GNUC_RH_RELEASE__ != 7))
+#if (defined(_MSC_VER) && (_MSC_VER >= 1933)) || (defined(__GNUC__) && (__GNUC__ >= 13) && (!defined(__GNUC_RH_RELEASE__) || (__GNUC_RH_RELEASE__ != 7)))
legacy/README.md (2)

77-77: Fenced code blocks are missing language identifiers.

Static analysis (markdownlint MD040) flags the code blocks on lines 77 and 83. Adding a language hint (e.g. ```bash) improves rendering and accessibility.

📝 Proposed fix
-```
+```bash
 -DCMAKE_OSX_SYSROOT=<full path to SDK directory>
-```
+```bash
 -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk

Also applies to: 83-83


163-164: Trailing whitespace in the table area.

Line 164 appears to contain only whitespace. This is a minor formatting artifact that could be cleaned up.

cmake/legacy.cmake (1)

280-285: CMAKE_POLICY_VERSION_MINIMUM is a CMake 4.x workaround — document intent.

Lines 285, 319, and 330 all pass -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to older upstream projects. This is the standard approach to suppress CMake 4.x policy errors in projects that haven't updated their cmake_minimum_required. Consider adding a brief comment near the first usage (or near FAIRSOFT_RPATH_ARGS) explaining this pattern so future maintainers don't accidentally remove it.

The name of the tar file as well as the content has changed on macOS.
Adapt the installation to those changes.
Only build onnxruntime optionaly if cmake >= 3.28.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants