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

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


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

commit a88e2d1cd8fa38a10ecfe264c63eafd75b92b25a
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 a3c432d63f..0d1c63104d 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
@@ -4014,6 +4015,7 @@ if test  "$_os" = "Darwin"; then
 
       MACOSX_SDK_PATH=$sdk_path
       SDKROOT=$sdk_path
+      export SDKROOT
    fi
 
 fi

Reply via email to