# Trying to build julia locally after latest macOS Tahoe update: \`lld: error: malformed sdk version\`

**URL:** <https://discourse.julialang.org/t/trying-to-build-julia-locally-after-latest-macos-tahoe-update-lld-error-malformed-sdk-version/134633>\
**Category:** Tooling\
**Tags:** build\
**Created:** [December 18, 2025, 6:34pm UTC](https://discourse.julialang.org/t/trying-to-build-julia-locally-after-latest-macos-tahoe-update-lld-error-malformed-sdk-version/134633 "2025-12-18T18:34:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NHDaly](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nhdaly/32/1413_2.png) [@NHDaly](https://discourse.julialang.org/u/NHDaly)\
**Post date:** [December 18, 2025, 6:34pm UTC](https://discourse.julialang.org/t/trying-to-build-julia-locally-after-latest-macos-tahoe-update-lld-error-malformed-sdk-version/134633/1 "2025-12-18T18:34:03Z")

</div>

Has anyone else seen an error like this? I _think_ it probably started after updating to the latest macOS.

Struggling to build julia from source on my mac.  
It works fine at first, but fails right at the end of precompiling the stdlibs:

```julia-auto
    LINK usr/lib/julia/sys.dylib
ld: warning: reexported library with install name '@rpath/libunwind.1.dylib' found at '/Users/nathandaly/src/julia/usr/lib/libunwind.1.0.dylib' couldn't be matched with any parent library and will be linked directly
    JULIA stdlib/release.image
Precompiling for 2 compilation configurations...
lld: error: malformed sdk version: ━━━━━━━━━━━━━━━━━━━━━━━━━ 0/108
Task failed ProcessFailedException(Base.Process[Process(setenv(`/Users/nathandaly/src/julia/usr/tools/lld -flavor darwin -arch arm64 -undefined dynamic_lookup -platform_version macos 26.2 '' '' -dylib -o /Users/nathandaly/src/julia/usr/share/julia/compiled/v1.14/UUIDs/jl_y0zbf3 -force_load /Users/nathandaly/src/julia/usr/share/julia/compiled/v1.14/UUIDs/jl_ihCkpQ -L/Users/nathandaly/src/julia/usr/lib/julia -L/Users/nathandaly/src/julia/usr/lib -ljulia -ljulia-internal`,["TERM=xterm-256color", "CPPFLAGS=-I/opt/homebrew/opt/openjdk/include", "ADOTDIR=/Users/nathandaly/.antigen", "OPENBLAS_MAIN_FREE=1", "MANPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/share/man:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/usr/share/man:/Applications/Xcode.app/Contents/Developer/usr/share/man:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man::/usr/local/man:/usr/share/man:/usr/local/share/man:", "MMTK_BUILD=release", "SHELL=/bin/zsh", "LC_ALL=C", "SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.vus4KOCs5K/Listeners", "MallocNanoZone=0", "BUILDROOT=/Users/nathandaly/src/julia", "JULIA_SSL_CA_ROOTS_PATH=", " __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0", "_ANTIGEN_LOG_PATH=/Users/nathandaly/.antigen/antigen.log", "VSCODE_GIT_ASKPASS_MAIN=/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass-main.js", "CLAUDE_CODE_SSE_PORT=32852", "JULIA_DEPOT_PATH=/Users/nathandaly/src/julia/usr/share/julia", "JULIA_LOAD_PATH=@stdlib:/Users/nathandaly/src/julia/stdlib", "TMPDIR=/var/folders/nw/lxdth34x7s57tqdbp26xmscr0000gn/T/", "HOMEBREW_CELLAR=/opt/homebrew/Cellar", "_ZCACHE_BUNDLES_PATH=/Users/nathandaly/.antigen/.cache/.zcache-bundles", "VSCODE_PROFILE_INITIALIZED=1", "ENABLE_GDBLISTENER=0", "PYDEVD_DISABLE_FILE_VALIDATION=1", "__ CFBundleIdentifier=com.microsoft.VSCode", "RAICLOUD_ENV=latest", "MFLAGS=-sj", "HOMEBREW_REPOSITORY=/opt/homebrew", "VSCODE_DEBUGPY_ADAPTER_ENDPOINTS=/Users/nathandaly/.vscode/extensions/ms-python.debugpy-2025.10.0-darwin-arm64/.noConfigDebugAdapterEndpoints/endpoint-104d2ad6e1c87964.txt", "SAVEHIST=2147483648", "PATH=/Users/nathandaly/src/julia/usr/tools:/Users/nathandaly/.juliaup/bin:/Applications/SnowSQL.app/Contents/MacOS:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/nathandaly/Library/Application Support/Code/User/globalStorage/github.copilot-chat/debugCommand:/Users/nathandaly/Library/Application Support/Code/User/globalStorage/github.copilot-chat/copilotCli:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pmk/env/global/bin:/Library/Apple/usr/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Users/nathandaly/.juliaup/bin:/Users/nathandaly/.cargo/bin:/Applications/SnowSQL.app/Contents/MacOS:/Users/nathandaly/dotfiles/nhdaly/scripts:/Users/nathandaly/bin:/Users/nathandaly/go/bin:/Users/nathandaly/.vscode/extensions/ms-python.debugpy-2025.10.0-darwin-arm64/bundled/scripts/noConfigScripts:/Users/nathandaly/go/bin", "VSCODE_GIT_ASKPASS_EXTRA_ARGS=", "_ZCACHE_PAYLOAD_PATH=/Users/nathandaly/.antigen/.cache/.zcache-payload", "EDITOR=vim", "_ZCACHE_EXTENSION_CLEAN_FUNCTIONS=true", "DYLD_FALLBACK_LIBRARY_PATH=/Users/nathandaly/src/julia/usr/lib/julia:/Users/nathandaly/src/julia/usr/lib:/Users/nathandaly/lib:/usr/local/lib:/lib:/usr/lib", "COLORTERM=truecolor", "LOGNAME=nathandaly", "CLICOLOR=1", "VSCODE_GIT_IPC_HANDLE=/var/folders/nw/lxdth34x7s57tqdbp26xmscr0000gn/T/vscode-git-5e5f70533d.sock", "INFOPATH=/opt/homebrew/share/info:/opt/homebrew/share/info:", "_ZCACHE_PATH=/Users/nathandaly/.antigen/.cache", "TERM_PROGRAM_VERSION=1.107.0", "JULIA_CPU_TARGET=sysimage", "PKG_CONFIG_LIBDIR=/Users/nathandaly/src/julia/usr/lib/pkgconfig", "JULIA_FALLBACK_REPL=true", "HISTSIZE=2147483648", "ANTIGEN_COMPDUMPFILE=/Users/nathandaly/.zcompdump", "USER=nathandaly", "MMTK_JULIA_DIR=../mmtk-julia", "XPC_FLAGS=0x0", "LSCOLORS=Gxfxcxdxbxegedabagacad", "PKG_CONFIG_PATH=/Users/nathandaly/src/julia/usr/lib/pkgconfig", "COMMAND_MODE=unix2003", "MAKELEVEL=2", "BUNDLED_DEBUGPY_PATH=/Users/nathandaly/.vscode/extensions/ms-python.debugpy-2025.10.0-darwin-arm64/bundled/libs/debugpy", "XPC_SERVICE_NAME=0", "SHLVL=2", "MACOSX_DEPLOYMENT_TARGET=11.0", "ENABLE_IDE_INTEGRATION=true", "GIT_ASKPASS=/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass.sh", "SECURITYSESSIONID=186c3", "PAGER=less", "MMTK_PLAN=Immix ", "TERM_PROGRAM=vscode", "PWD=/Users/nathandaly/src/julia", "VSCODE_INJECTION=1", "HOMEBREW_PREFIX=/opt/homebrew", "OPENBLAS_DEFAULT_NUM_THREADS=1", "VSCODE_PYTHON_AUTOACTIVATE_GUARD=1", "MAKEFLAGS=sj", "USER_ZDOTDIR=/Users/nathandaly", "LaunchInstanceID=C91AABA6-9044-4E1B-9586-A673FF8352F7", "ANTIGEN_DEFAULT_REPO_URL=https://github.com/robbyrussell/oh-my-zsh.git", "HOME=/Users/nathandaly", "VSCODE_GIT_ASKPASS_NODE=/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)", "OSLogRateLimit=64", "_=/Users/nathandaly/src/julia/usr/bin/julia", "RAICLOUD_PREFIX=nhd", "LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43", "LANG=C", "LESS=-R"]), ProcessExited(1))])
lld: error: malformed sdk version: 
lld: error: malformed sdk version: 
lld: error: malformed sdk version: 
lld: error: malformed sdk version: 
lld: error: malformed sdk version: 
lld: error: malformed sdk version: 
lld: error: malformed sdk version: 
ERROR: Precompiling packages ╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/108
  ◑ dSFMT_jll -g2 -O3
  ◑ dSFMT_jll -g2 --check-bounds=yes -O3
Task failed ProcessFailedException(Base.Process[Process(setenv(`/Users/nathandaly/src/julia/usr/tools/lld -flavor darwin -arch arm64 -undefined dynamic_lookup -platform_version macos 26.2 '' '' -dylib -o /Users/nathandaly/src/julia/usr/share/julia/compiled/v1.14/dSFMT_jll/jl_5m7lIW -force_load /Users/nathandaly/src/julia/usr/share/julia/compiled/v1.14/dSFMT_jll/jl_HZJdtw -L/Users/nathandaly/src/julia/usr/lib/julia -L/Users/nathandaly/src/julia/usr/lib -ljulia -ljulia-internal`,["TERM=xterm-256color", "CPPFLAGS=-I/opt/homebrew/opt/openjdk/include", "ADOTDIR=/Users/nathandaly/.antigen", "OPENBLAS_MAIN_FREE=1", "MANPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/share/man:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/usr/share/man:/Applications/Xcode.app/Contents/Developer/usr/share/man:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man::/usr/local/man:/usr/share/man:/usr/local/share/man:", "MMTK_BUILD=release", "SHELL=/bin/zsh", "LC_ALL=C", "SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.vus4KOCs5K/Listeners", "MallocNanoZone=0", "BUILDROOT=/Users/nathandaly/src/julia", "JULIA_SSL_CA_ROOTS_PATH=", " __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0", "_ANTIGEN_LOG_PATH=/Users/nathandaly/.antigen/antigen.log", "VSCODE_GIT_ASKPASS_MAIN=/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass-main.js", "CLAUDE_CODE_SSE_PORT=32852", "JULIA_DEPOT_PATH=/Users/nathandaly/src/julia/usr/share/julia", "JULIA_LOAD_PATH=@stdlib:/Users/nathandaly/src/julia/stdlib", "TMPDIR=/var/folders/nw/lxdth34x7s57tqdbp26xmscr0000gn/T/", "HOMEBREW_CELLAR=/opt/homebrew/Cellar", "_ZCACHE_BUNDLES_PATH=/Users/nathandaly/.antigen/.cache/.zcache-bundles", "VSCODE_PROFILE_INITIALIZED=1", "ENABLE_GDBLISTENER=0", "PYDEVD_DISABLE_FILE_VALIDATION=1", "__ CFBundleIdentifier=com.microsoft.VSCode", "RAICLOUD_ENV=latest", "MFLAGS=-sj", "HOMEBREW_REPOSITORY=/opt/homebrew", "VSCODE_DEBUGPY_ADAPTER_ENDPOINTS=/Users/nathandaly/.vscode/extensions/ms-python.debugpy-2025.10.0-darwin-arm64/.noConfigDebugAdapterEndpoints/endpoint-104d2ad6e1c87964.txt", "SAVEHIST=2147483648", "PATH=/Users/nathandaly/src/julia/usr/tools:/Users/nathandaly/.juliaup/bin:/Applications/SnowSQL.app/Contents/MacOS:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/nathandaly/Library/Application Support/Code/User/globalStorage/github.copilot-chat/debugCommand:/Users/nathandaly/Library/Application Support/Code/User/globalStorage/github.copilot-chat/copilotCli:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pmk/env/global/bin:/Library/Apple/usr/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Users/nathandaly/.juliaup/bin:/Users/nathandaly/.cargo/bin:/Applications/SnowSQL.app/Contents/MacOS:/Users/nathandaly/dotfiles/nhdaly/scripts:/Users/nathandaly/bin:/Users/nathandaly/go/bin:/Users/nathandaly/.vscode/extensions/ms-python.debugpy-2025.10.0-darwin-arm64/bundled/scripts/noConfigScripts:/Users/nathandaly/go/bin", "VSCODE_GIT_ASKPASS_EXTRA_ARGS=", "_ZCACHE_PAYLOAD_PATH=/Users/nathandaly/.antigen/.cache/.zcache-payload", "EDITOR=vim", "_ZCACHE_EXTENSION_CLEAN_FUNCTIONS=true", "DYLD_FALLBACK_LIBRARY_PATH=/Users/nathandaly/src/julia/usr/lib/julia:/Users/nathandaly/src/julia/usr/lib:/Users/nathandaly/lib:/usr/local/lib:/lib:/usr/lib", "COLORTERM=truecolor", "LOGNAME=nathandaly", "CLICOLOR=1", "VSCODE_GIT_IPC_HANDLE=/var/folders/nw/lxdth34x7s57tqdbp26xmscr0000gn/T/vscode-git-5e5f70533d.sock", "INFOPATH=/opt/homebrew/share/info:/opt/homebrew/share/info:", "_ZCACHE_PATH=/Users/nathandaly/.antigen/.cache", "TERM_PROGRAM_VERSION=1.107.0", "JULIA_CPU_TARGET=sysimage", "PKG_CONFIG_LIBDIR=/Users/nathandaly/src/julia/usr/lib/pkgconfig", "JULIA_FALLBACK_REPL=true", "HISTSIZE=2147483648", "ANTIGEN_COMPDUMPFILE=/Users/nathandaly/.zcompdump", "USER=nathandaly", "MMTK_JULIA_DIR=../mmtk-julia", "XPC_FLAGS=0x0", "LSCOLORS=Gxfxcxdxbxegedabagacad", "PKG_CONFIG_PATH=/Users/nathandaly/src/julia/usr/lib/pkgconfig", "COMMAND_MODE=unix2003", "MAKELEVEL=2", "BUNDLED_DEBUGPY_PATH=/Users/nathandaly/.vscode/extensions/ms-python.debugpy-2025.10.0-darwin-arm64/bundled/libs/debugpy", "XPC_SERVICE_NAME=0", "SHLVL=2", "MACOSX_DEPLOYMENT_TARGET=11.0", "ENABLE_IDE_INTEGRATION=true", "GIT_ASKPASS=/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass.sh", "SECURITYSESSIONID=186c3", "PAGER=less", "MMTK_PLAN=Immix ", "TERM_PROGRAM=vscode", "PWD=/Users/nathandaly/src/julia", "VSCODE_INJECTION=1", "HOMEBREW_PREFIX=/opt/homebrew", "OPENBLAS_DEFAULT_NUM_THREADS=1", "VSCODE_PYTHON_AUTOACTIVATE_GUARD=1", "MAKEFLAGS=sj", "USER_ZDOTDIR=/Users/nathandaly", "LaunchInstanceID=C91AABA6-9044-4E1B-9586-A673FF8352F7", "ANTIGEN_DEFAULT_REPO_URL=https://github.com/robbyrussell/oh-my-zsh.git", "HOME=/Users/nathandaly", "VSCODE_GIT_ASKPASS_NODE=/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)", "OSLogRateLimit=64", "_=/Users/nathandaly/src/julia/usr/bin/julia", "RAICLOUD_PREFIX=nhd", "LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43", "LANG=C", "LESS=-R"]), ProcessExited(1))])
...
and on and on.
```

---

<div class="post-metadata">

**Author:** ![NHDaly](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nhdaly/32/1413_2.png) [@NHDaly](https://discourse.julialang.org/u/NHDaly)\
**Post date:** [December 18, 2025, 6:46pm UTC](https://discourse.julialang.org/t/trying-to-build-julia-locally-after-latest-macos-tahoe-update-lld-error-malformed-sdk-version/134633/2 "2025-12-18T18:46:06Z")

</div>

Mosè helped me identify this issue:

```julia-auto
shell> xcrun --show-sdk-version
2025-12-18 11:43:54.901 xcodebuild[73409:25275522] Writing error result bundle to /var/folders/nw/lxdth34x7s57tqdbp26xmscr0000gn/T/ResultBundle_2025-18-12_11-43-0054.xcresult
xcodebuild: error: SDK "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" cannot be located.
xcrun: error: unable to lookup item 'SDKVersion' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'

```

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [December 18, 2025, 6:52pm UTC](https://discourse.julialang.org/t/trying-to-build-julia-locally-after-latest-macos-tahoe-update-lld-error-malformed-sdk-version/134633/3 "2025-12-18T18:52:24Z")

</div>

We debugged this on Slack: the linking arguments are coming from

> <https://github.com/JuliaLang/julia/blob/3b21c7f60d131e73adf437ff7a3831a708bb1b26/base/linking.jl#L101>

with `Base.MACOS_PLATFORM_VERSION` being set during build-time

> <https://github.com/JuliaLang/julia/blob/3b21c7f60d131e73adf437ff7a3831a708bb1b26/base/Makefile#L83>

but the command `xcrun` was messed up after a recent macOS upgrade:

```console
shell> xcrun --show-sdk-version
2025-12-18 11:42:37.901 xcodebuild[69244:25260268] Writing error result bundle to /var/folders/nw/lxdth34x7s57tqdbp26xmscr0000gn/T/ResultBundle_2025-18-12_11-42-0037.xcresult
xcodebuild: error: SDK "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" cannot be located.
xcrun: error: unable to lookup item 'SDKVersion' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'

```

---

<div class="post-metadata">

**Author:** ![NHDaly](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nhdaly/32/1413_2.png) [@NHDaly](https://discourse.julialang.org/u/NHDaly)\
**Post date:** [December 18, 2025, 7:44pm UTC](https://discourse.julialang.org/t/trying-to-build-julia-locally-after-latest-macos-tahoe-update-lld-error-malformed-sdk-version/134633/4 "2025-12-18T19:44:52Z")

</div>

Good news: **Updating XCode through the App Store has fixed this for me!**

```julia-auto
shell> xcrun --show-sdk-version
26.2

```

and building julia succeeded now. 😊 thanks all
