Skip to content

[build] Align SDK path seen by rootcling with CMake#21390

Merged
vepadulano merged 1 commit intoroot-project:masterfrom
vepadulano:rootcling-force-sdkroot
Feb 26, 2026
Merged

[build] Align SDK path seen by rootcling with CMake#21390
vepadulano merged 1 commit intoroot-project:masterfrom
vepadulano:rootcling-force-sdkroot

Conversation

@vepadulano
Copy link
Member

The path to the SDK used by the build is stored within CMAKE_OSX_SYSROOT. The compiler invocations issued directly by the CMake generator will automatically inherit the SDKROOT variable to find the Apple SDK. But rootcling and similar other compiler-based utilities ROOT provides do not automatically see all CMake variables. When the Apple SDK is not found in standard locations, e.g. during a conda build for conda-forge, rootcling is not able to find the SDK automatically. This commit proposes to inject the SDK path from CMake to rootcling by aligning SDKROOT environment variable with the value of CMAKE_OSX_SYSROOT.

This is an upstream of https://github.com/conda-forge/root-feedstock/blob/df86316b299d8214d3181d76c31925696f076d5e/recipe/patches/0014-Force-SDKROOT.patch

@vepadulano vepadulano requested a review from dpiparo February 26, 2026 09:33
@vepadulano vepadulano self-assigned this Feb 26, 2026
@vepadulano vepadulano requested a review from bellenot as a code owner February 26, 2026 09:33
@vepadulano vepadulano added clean build Ask CI to do non-incremental build on PR in:Build System labels Feb 26, 2026
The path to the SDK used by the build is stored within CMAKE_OSX_SYSROOT. The compiler invocations issued directly by the CMake generator will automatically inherit the SDKROOT variable to find the Apple SDK. But rootcling and similar other compiler-based utilities ROOT provides do not automatically see all CMake variables. When the Apple SDK is not found in standard locations, e.g. during a conda build for conda-forge, rootcling is not able to find the SDK automatically. This commit proposes to inject the SDK path from CMake to rootcling by aligning SDKROOT environment variable with the value of CMAKE_OSX_SYSROOT.

This is an upstream of https://github.com/conda-forge/root-feedstock/blob/df86316b299d8214d3181d76c31925696f076d5e/recipe/patches/0014-Force-SDKROOT.patch
@vepadulano vepadulano force-pushed the rootcling-force-sdkroot branch from 1e5a932 to b44b5f3 Compare February 26, 2026 10:02
Copy link
Member

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

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

Lgtm!

@github-actions
Copy link

Test Results

    22 files      22 suites   3d 3h 11m 6s ⏱️
 3 801 tests  3 798 ✅ 1 💤 2 ❌
75 596 runs  75 585 ✅ 9 💤 2 ❌

For more details on these failures, see this check.

Results for commit b44b5f3.

@vepadulano vepadulano merged commit 4831779 into root-project:master Feb 26, 2026
27 of 30 checks passed
@vepadulano vepadulano deleted the rootcling-force-sdkroot branch February 26, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean build Ask CI to do non-incremental build on PR in:Build System

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants