[GH-ISSUE #1504] Upgrade to XCode 14.2 breaks build which is looking for 14.0 #815

Closed
opened 2026-04-12 10:29:32 -05:00 by GiteaMirror · 7 comments
Owner

Originally created by @jkleckner on GitHub (Dec 13, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1504

An upgrade to current XCode breaks the build which is looking explicitly for the sdk 14.0 which is now 14.2:

$ go generate ./...
Submodule path 'ggml': checked out '9e232f0234073358e7031c1b8d7aa45020469a3b'
CMake Warning at /opt/homebrew/Cellar/cmake/3.28.0/share/cmake/Modules/Platform/Darwin-Initialize.cmake:308 (message):
  Ignoring CMAKE_OSX_SYSROOT value:

   /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk

  because the directory does not exist.
Call Stack (most recent call first):
  /opt/homebrew/Cellar/cmake/3.28.0/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake:34 (include)
  CMakeLists.txt:2 (project)

SDK links:

$ ls -l /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
total 0
drwxr-xr-x  7 root  wheel   224B Nov 13 10:25 MacOSX.sdk
lrwxr-xr-x  1 root  wheel    10B Dec 13 06:00 MacOSX14.2.sdk -> MacOSX.sdk
lrwxr-xr-x  1 root  wheel    10B Dec 13 06:00 MacOSX14.sdk -> MacOSX.sdk
Originally created by @jkleckner on GitHub (Dec 13, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1504 An upgrade to current XCode breaks the build which is looking explicitly for the sdk 14.0 which is now 14.2: ``` $ go generate ./... Submodule path 'ggml': checked out '9e232f0234073358e7031c1b8d7aa45020469a3b' CMake Warning at /opt/homebrew/Cellar/cmake/3.28.0/share/cmake/Modules/Platform/Darwin-Initialize.cmake:308 (message): Ignoring CMAKE_OSX_SYSROOT value: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk because the directory does not exist. Call Stack (most recent call first): /opt/homebrew/Cellar/cmake/3.28.0/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake:34 (include) CMakeLists.txt:2 (project) ``` SDK links: ``` $ ls -l /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs total 0 drwxr-xr-x 7 root wheel 224B Nov 13 10:25 MacOSX.sdk lrwxr-xr-x 1 root wheel 10B Dec 13 06:00 MacOSX14.2.sdk -> MacOSX.sdk lrwxr-xr-x 1 root wheel 10B Dec 13 06:00 MacOSX14.sdk -> MacOSX.sdk ```
Author
Owner

@rgaidot commented on GitHub (Dec 13, 2023):

Do you've accept the new license sudo xcodebuild -license? I don't think it comes from ollama but your computer

I've MacOSX14.2.sdk (like you) on my mac

Screenshot 2023-12-13 at 17 08 15

what does this command give you xcrun --sdk macosx --show-sdk-path?

and you can try this cmd export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)

<!-- gh-comment-id:1854201526 --> @rgaidot commented on GitHub (Dec 13, 2023): Do you've accept the new license `sudo xcodebuild -license`? I don't think it comes from ollama but your computer I've MacOSX14.2.sdk (like you) on my mac ![Screenshot 2023-12-13 at 17 08 15](https://github.com/jmorganca/ollama/assets/5269/a5f2c28b-a2c3-4593-9d80-eaf6399f1280) what does this command give you `xcrun --sdk macosx --show-sdk-path`? and you can try this cmd `export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)`
Author
Owner

@oderwat commented on GitHub (Dec 19, 2023):

I had a similar (the same?) problem and export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) fixed it for me. But I wonder how to make this permanent or what the underlying problem may be.

And I still got:

ld: warning: ignoring duplicate libraries: '../../libllama.a'
ld: warning: search path '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/System/Library/Frameworks' not found

So it was still searching for the 14.0?

<!-- gh-comment-id:1862740695 --> @oderwat commented on GitHub (Dec 19, 2023): I had a similar (the same?) problem and `export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)` fixed it for me. But I wonder how to make this permanent or what the underlying problem may be. And I still got: ``` ld: warning: ignoring duplicate libraries: '../../libllama.a' ld: warning: search path '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/System/Library/Frameworks' not found ``` So it was still searching for the 14.0?
Author
Owner

@jkleckner commented on GitHub (Dec 22, 2023):

Do you've accept the new license sudo xcodebuild -license? I don't think it comes from ollama but your computer

Yes.

I had a similar (the same?) problem and export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) fixed it for me. But I wonder how to make this permanent or what the underlying problem may be.

This worked for me. Also I wonder how to make it permanent.

<!-- gh-comment-id:1868091609 --> @jkleckner commented on GitHub (Dec 22, 2023): > Do you've accept the new license sudo xcodebuild -license? I don't think it comes from ollama but your computer Yes. > I had a similar (the same?) problem and `export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)` fixed it for me. But I wonder how to make this permanent or what the underlying problem may be. This worked for me. Also I wonder how to make it permanent.
Author
Owner

@jmorganca commented on GitHub (Dec 24, 2023):

Hi all, are you still this issue on main? The pinned macOS deployment target variable has been removed and so it shouldn't be looking for a specific version of XCode

<!-- gh-comment-id:1868600873 --> @jmorganca commented on GitHub (Dec 24, 2023): Hi all, are you still this issue on `main`? The pinned macOS deployment target variable has been removed and so it shouldn't be looking for a specific version of XCode
Author
Owner

@oderwat commented on GitHub (Dec 27, 2023):

@jmorganca I did not need to recompile till some minutes ago. But now I updated to current main, and it did work without problems for me.

<!-- gh-comment-id:1870433120 --> @oderwat commented on GitHub (Dec 27, 2023): @jmorganca I did not need to recompile till some minutes ago. But now I updated to current main, and it did work without problems for me.
Author
Owner

@jmorganca commented on GitHub (Jan 4, 2024):

Thanks for the update!

<!-- gh-comment-id:1876274608 --> @jmorganca commented on GitHub (Jan 4, 2024): Thanks for the update!
Author
Owner

@vdentello commented on GitHub (Apr 4, 2024):

Not sure if it helps, but in my case, after updating, I would get the following warning.

Showing All Messages
unable to find sdk '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk'

Whereas the folder is named MacOSX14.sdk.

I renamed the folder to MacOSX14.0.sdk and now it works again, took my a while to figure out but it worked.
Additionally, I believe you could just create a new pointing shortcut into the folder with 14.0 and keep the one with 14, in case something tries to search for the other one.

<!-- gh-comment-id:2037231687 --> @vdentello commented on GitHub (Apr 4, 2024): Not sure if it helps, but in my case, after updating, I would get the following warning. Showing All Messages unable to find sdk '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk' Whereas the folder is named MacOSX14.sdk. I renamed the folder to MacOSX14.0.sdk and now it works again, took my a while to figure out but it worked. Additionally, I believe you could just create a new pointing shortcut into the folder with 14.0 and keep the one with 14, in case something tries to search for the other one.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#815