GNAT toolchain now broken after OS upgrade to MacOS 26 (Tahoe), arm64

Actually it’s probably not empty, it’s just that the order of operations is wrong. SDKROOT=… is setting the variable after ${SDKROOT} has already been expanded. Observe how a command like FOO=hello echo $FOO prints nothing.

You can separate it into two statements:

SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
gnatmake -v ./shift_left.adb -largs -Wl,-syslibroot,"$SDKROOT"

Or you can dispense with the variable and do it as a single command:

gnatmake -v ./shift_left.adb -largs -Wl,-syslibroot,"$(xcrun --sdk macosx --show-sdk-path)"

If you plan to type gnatmake commands a lot, you could make a wrapper script that adds the syslibroot stuff for you. For example, save the following as a new text file:

#!/bin/sh
exec gnatmake "$@" -largs -Wl,-syslibroot,"$(xcrun --sdk macosx --show-sdk-path)"

chmod a+x that file and run that file instead of gnatmake. The fact that gnatmake doesn’t seem to know to use the standard macOS SDK path automatically feels like a bug to me, but this should allow you to work around it.

This is a gcc bug. It computes the default deployment target from the Darwin version. You’re on Darwin 25 and it erroneously thinks that’s macOS 16. The version of gcc you’re using was released before it was known that Apple would change the version numbering scheme and that Darwin 25 would actually be called macOS 26.

If I interpret the message correctly, clang (perhaps being invoked as the linker?) is letting you know it was asked to use the deployment target 16.0 and it has changed it to 26.0 for you. When you specify -mmacosx-version-min=26.0 you’re overriding gcc’s erroneous default and specifying 26.0 directly, which eliminates the warning but otherwise changes nothing.

4 Likes