This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
     new e3a2414bf2 macOS configure: export SDKROOT, fix SDK auto-detection for 
Xcode 13+
e3a2414bf2 is described below

commit e3a2414bf2fcb7c1911f85b7cf279190eaddf823
Author: Jim Jagielski <[email protected]>
AuthorDate: Tue Jun 30 15:27:07 2026 -0400

    macOS configure: export SDKROOT, fix SDK auto-detection for Xcode 13+
    
    SDKROOT was assigned but never exported, so the resolved clang/cc1
    subprocess couldn't see the SDK sysroot and failed with
    "ld: library 'System' not found" on a bare compile check.
    
    The SDK auto-detection cascade only matched macosx10.x/11.x/12.x in
    `xcodebuild -showsdks` output, so it always failed to find an SDK on
    any Xcode 13+ toolchain. Replaced with a generic macosx<major>.<minor>
    match, picking the newest installed SDK since -showsdks lists oldest
    to newest.
---
 main/configure.ac | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/main/configure.ac b/main/configure.ac
index 0654f771bd..ed06204f77 100644
--- a/main/configure.ac
+++ b/main/configure.ac
@@ -1146,6 +1146,7 @@ case "$build_os" in
                   enable_systray=no
                fi
                SDKROOT="`xcrun --sdk macosx --show-sdk-path`"
+               export SDKROOT
                if test ! -n "$CC"; then
                   CC="`xcrun -f clang`"
                fi
@@ -4000,6 +4001,7 @@ if test  "$_os" = "Darwin"; then
 
       MACOSX_SDK_PATH=$sdk_path
       SDKROOT=$sdk_path
+      export SDKROOT
    fi
 
 fi

Reply via email to