[GH-ISSUE #7392] Fails to build on macOS with "fatal error: {'string','cstdint'} file not found" #66755

Closed
opened 2026-05-04 08:05:47 -05:00 by GiteaMirror · 11 comments
Owner

Originally created by @efd6 on GitHub (Oct 28, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7392

Originally assigned to: @dhiltgen on GitHub.

What is the issue?

I followed the instructions for building on mac here, but this failed at the go generate step.

Running go generate ./... fails with a set of header files not found errors.

$ go generate ./...
+ set -o pipefail
+ compress_pids=
+ echo 'Starting darwin generate script'
Starting darwin generate script
++ dirname ./gen_darwin.sh
<snip>
[ 26%] Linking CXX static library libggml.a
[ 26%] Built target ggml
[ 33%] Building CXX object src/CMakeFiles/llama.dir/llama.cpp.o
[ 40%] Building CXX object src/CMakeFiles/llama.dir/llama-vocab.cpp.o
[ 46%] Building CXX object src/CMakeFiles/llama.dir/llama-sampling.cpp.o
[ 53%] Building CXX object src/CMakeFiles/llama.dir/unicode-data.cpp.o
[ 53%] Building CXX object src/CMakeFiles/llama.dir/llama-grammar.cpp.o
[ 53%] Building CXX object src/CMakeFiles/llama.dir/unicode.cpp.o
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/unicode.cpp:5:
.../src/github.com/ollama/ollama/llm/llama.cpp/src/unicode.h:3:10: fatal error: 'cstdint' file not found
    3 | #include <cstdint>
      |          ^~~~~~~~~
1 error generated.
make[3]: *** [src/CMakeFiles/llama.dir/unicode.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/unicode-data.cpp:3:
.../src/github.com/ollama/ollama/llm/llama.cpp/src/unicode-data.h:3:10: fatal error: 'cstdint' file not found
    3 | #include <cstdint>
      |          ^~~~~~~~~
1 error generated.
make[3]: *** [src/CMakeFiles/llama.dir/unicode-data.cpp.o] Error 1
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-grammar.cpp:1:
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-grammar.h:3:
.../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-impl.h:5:10: fatal error: 'string' file not found
    5 | #include <string>
      |          ^~~~~~~~
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-vocab.cpp:1:
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-vocab.h:3:
.../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-impl.h:5:10: fatal error: 'string' file not found
    5 | #include <string>
      |          ^~~~~~~~
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-sampling.cpp:1:
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-sampling.h:5:
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-grammar.h:3:
.../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-impl.h:5:10: fatal error: 'string' file not found
    5 | #include <string>
      |          ^~~~~~~~
1 error generated.
make[3]: *** [src/CMakeFiles/llama.dir/llama-grammar.cpp.o] Error 1
1 error generated.
1 error generated.
make[3]: *** [src/CMakeFiles/llama.dir/llama-vocab.cpp.o] Error 1
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama.cpp:1:
.../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-impl.h:5:10: fatal error: 'string' file not found
    5 | #include <string>
      |          ^~~~~~~~
make[3]: *** [src/CMakeFiles/llama.dir/llama-sampling.cpp.o] Error 1
1 error generated.
make[3]: *** [src/CMakeFiles/llama.dir/llama.cpp.o] Error 1
make[2]: *** [src/CMakeFiles/llama.dir/all] Error 2
make[1]: *** [ext_server/CMakeFiles/ollama_llama_server.dir/rule] Error 2
make: *** [ollama_llama_server] Error 2
llm/generate/generate_darwin.go:3: running "bash": exit status 2

Noted dependencies:

$ go version
go version go1.22.8 darwin/amd64
$ cmake --version
cmake version 3.30.5

CMake suite maintained and supported by Kitware (kitware.com/cmake).
$ gcc --version
Apple clang version 16.0.0 (clang-1600.0.26.3)
Target: x86_64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

I expected to see a completed generation (as seen on linux). Alternatively, if other deps are required, I expected to see them listed in the developer build instructions.

OS

macOS

GPU

Apple

CPU

AMD

Ollama version

abd5dfd06a

Originally created by @efd6 on GitHub (Oct 28, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7392 Originally assigned to: @dhiltgen on GitHub. ### What is the issue? I followed the instructions for building on mac [here](https://github.com/ollama/ollama/blob/main/docs/development.md#macos), but this failed at the `go generate` step. Running `go generate ./...` fails with a set of header files not found errors. ``` $ go generate ./... + set -o pipefail + compress_pids= + echo 'Starting darwin generate script' Starting darwin generate script ++ dirname ./gen_darwin.sh <snip> [ 26%] Linking CXX static library libggml.a [ 26%] Built target ggml [ 33%] Building CXX object src/CMakeFiles/llama.dir/llama.cpp.o [ 40%] Building CXX object src/CMakeFiles/llama.dir/llama-vocab.cpp.o [ 46%] Building CXX object src/CMakeFiles/llama.dir/llama-sampling.cpp.o [ 53%] Building CXX object src/CMakeFiles/llama.dir/unicode-data.cpp.o [ 53%] Building CXX object src/CMakeFiles/llama.dir/llama-grammar.cpp.o [ 53%] Building CXX object src/CMakeFiles/llama.dir/unicode.cpp.o In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/unicode.cpp:5: .../src/github.com/ollama/ollama/llm/llama.cpp/src/unicode.h:3:10: fatal error: 'cstdint' file not found 3 | #include <cstdint> | ^~~~~~~~~ 1 error generated. make[3]: *** [src/CMakeFiles/llama.dir/unicode.cpp.o] Error 1 make[3]: *** Waiting for unfinished jobs.... In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/unicode-data.cpp:3: .../src/github.com/ollama/ollama/llm/llama.cpp/src/unicode-data.h:3:10: fatal error: 'cstdint' file not found 3 | #include <cstdint> | ^~~~~~~~~ 1 error generated. make[3]: *** [src/CMakeFiles/llama.dir/unicode-data.cpp.o] Error 1 In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-grammar.cpp:1: In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-grammar.h:3: .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-impl.h:5:10: fatal error: 'string' file not found 5 | #include <string> | ^~~~~~~~ In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-vocab.cpp:1: In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-vocab.h:3: .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-impl.h:5:10: fatal error: 'string' file not found 5 | #include <string> | ^~~~~~~~ In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-sampling.cpp:1: In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-sampling.h:5: In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-grammar.h:3: .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-impl.h:5:10: fatal error: 'string' file not found 5 | #include <string> | ^~~~~~~~ 1 error generated. make[3]: *** [src/CMakeFiles/llama.dir/llama-grammar.cpp.o] Error 1 1 error generated. 1 error generated. make[3]: *** [src/CMakeFiles/llama.dir/llama-vocab.cpp.o] Error 1 In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama.cpp:1: .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-impl.h:5:10: fatal error: 'string' file not found 5 | #include <string> | ^~~~~~~~ make[3]: *** [src/CMakeFiles/llama.dir/llama-sampling.cpp.o] Error 1 1 error generated. make[3]: *** [src/CMakeFiles/llama.dir/llama.cpp.o] Error 1 make[2]: *** [src/CMakeFiles/llama.dir/all] Error 2 make[1]: *** [ext_server/CMakeFiles/ollama_llama_server.dir/rule] Error 2 make: *** [ollama_llama_server] Error 2 llm/generate/generate_darwin.go:3: running "bash": exit status 2 ``` Noted dependencies: ``` $ go version go version go1.22.8 darwin/amd64 $ cmake --version cmake version 3.30.5 CMake suite maintained and supported by Kitware (kitware.com/cmake). $ gcc --version Apple clang version 16.0.0 (clang-1600.0.26.3) Target: x86_64-apple-darwin23.6.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin ``` I expected to see a completed generation (as seen on linux). Alternatively, if other deps are required, I expected to see them listed in the [developer build instructions](https://github.com/ollama/ollama/blob/main/docs/development.md#macos). ### OS macOS ### GPU Apple ### CPU AMD ### Ollama version abd5dfd06a8e1309394b07c111be5f8412fca600
GiteaMirror added the macosbuildbugneeds more info labels 2026-05-04 08:05:48 -05:00
Author
Owner

@dhiltgen commented on GitHub (Oct 29, 2024):

I tried to repro on a freshly installed MacOS v11 x86 system, and it successfully built Ollama.

% go version
go version go1.23.2 darwin/amd64
% cmake --version
cmake version 3.30.5

CMake suite maintained and supported by Kitware (kitware.com/cmake).
% gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Is there anything else interesting/unusual about your system, or warnings/errors that occurred during the brew install? Are you low on disk space maybe?

<!-- gh-comment-id:2445216349 --> @dhiltgen commented on GitHub (Oct 29, 2024): I tried to repro on a freshly installed MacOS v11 x86 system, and it successfully built Ollama. ``` % go version go version go1.23.2 darwin/amd64 % cmake --version cmake version 3.30.5 CMake suite maintained and supported by Kitware (kitware.com/cmake). % gcc --version Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple clang version 13.0.0 (clang-1300.0.29.30) Target: x86_64-apple-darwin20.6.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin ``` Is there anything else interesting/unusual about your system, or warnings/errors that occurred during the brew install? Are you low on disk space maybe?
Author
Owner

@efd6 commented on GitHub (Oct 29, 2024):

My suspicion is that the brew-installed compiler is shadowed by the xcode-installed compiler. I'm not a mac guy, so I'm longing for the simplicity and openness of a linux system. This is undoubtedly falling on my ignorance.

<!-- gh-comment-id:2445251796 --> @efd6 commented on GitHub (Oct 29, 2024): My suspicion is that the brew-installed compiler is shadowed by the xcode-installed compiler. I'm not a mac guy, so I'm longing for the simplicity and openness of a linux system. This is undoubtedly falling on my ignorance.
Author
Owner

@shwangdev commented on GitHub (Oct 30, 2024):

I have similar issue...

/Users/shwang/workspaces/ollama/llm/llama.cpp/ggml/src/ggml-blas.cpp:5:10: fatal error: 'future' file not found
    5 | #include <future>
<!-- gh-comment-id:2446159423 --> @shwangdev commented on GitHub (Oct 30, 2024): I have similar issue... ``` /Users/shwang/workspaces/ollama/llm/llama.cpp/ggml/src/ggml-blas.cpp:5:10: fatal error: 'future' file not found 5 | #include <future> ```
Author
Owner

@dhiltgen commented on GitHub (Oct 30, 2024):

Searching around a bit it seems like others have reported a broken C++ CMake setup on MacOS after a system update where the headers moved around apparently, and the emitted configuration was stale. Perhaps that's what's going on in these systems?

The CMake based build will be going away soon, so perhaps give the new make based build a try - see https://github.com/ollama/ollama/blob/main/docs/development.md#transition-to-go-runner

<!-- gh-comment-id:2447614072 --> @dhiltgen commented on GitHub (Oct 30, 2024): Searching around a bit it seems like others have reported a broken C++ CMake setup on MacOS after a system update where the headers moved around apparently, and the emitted configuration was stale. Perhaps that's what's going on in these systems? The CMake based build will be going away soon, so perhaps give the new `make` based build a try - see https://github.com/ollama/ollama/blob/main/docs/development.md#transition-to-go-runner
Author
Owner

@efd6 commented on GitHub (Oct 30, 2024):

Yes, I thought that might be an issue too, but

$ make -C llama -j 5
rm -rf .../src/github.com/ollama/ollama/build/darwin/amd64/default .../src/github.com/ollama/ollama/build/darwin/amd64/metal .../src/github.com/ollama/ollama/build/darwin/amd64/cpu .../src/github.com/ollama/ollama/build/darwin/amd64/cpu_avx .../src/github.com/ollama/ollama/build/darwin/amd64/cpu_avx2
/Library/Developer/CommandLineTools/usr/bin/make -f make/Makefile.default
GOARCH=amd64 go build -buildmode=pie "-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=0.3.14-16-gabd5dfd\" \"-X=github.com/ollama/ollama/llama.CpuFeatures=\" " -trimpath   -o .../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu/ollama_llama_server ./runner
GOARCH=amd64 go build -buildmode=pie "-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=0.3.14-16-gabd5dfd\" \"-X=github.com/ollama/ollama/llama.CpuFeatures="avx"\" " -trimpath -tags "avx" -o .../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu_avx/ollama_llama_server ./runner
GOARCH=amd64 go build -buildmode=pie "-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=0.3.14-16-gabd5dfd\" \"-X=github.com/ollama/ollama/llama.CpuFeatures="avx,avx2"\" " -trimpath -tags "avx,avx2" -o .../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu_avx2/ollama_llama_server ./runner
# github.com/ollama/ollama/llama
clip.cpp:55:10: fatal error: 'cassert' file not found
# github.com/ollama/ollama/llama
clip.cpp:55:10: fatal error: 'cassert' file not found
make[1]: *** [.../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu/ollama_llama_server] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [.../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu_avx/ollama_llama_server] Error 1
# github.com/ollama/ollama/llama
clip.cpp:55:10: fatal error: 'cassert' file not found
make[1]: *** [.../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu_avx2/ollama_llama_server] Error 1
make: *** [default] Error 2
<!-- gh-comment-id:2448373651 --> @efd6 commented on GitHub (Oct 30, 2024): Yes, I thought that might be an issue too, but ``` $ make -C llama -j 5 rm -rf .../src/github.com/ollama/ollama/build/darwin/amd64/default .../src/github.com/ollama/ollama/build/darwin/amd64/metal .../src/github.com/ollama/ollama/build/darwin/amd64/cpu .../src/github.com/ollama/ollama/build/darwin/amd64/cpu_avx .../src/github.com/ollama/ollama/build/darwin/amd64/cpu_avx2 /Library/Developer/CommandLineTools/usr/bin/make -f make/Makefile.default GOARCH=amd64 go build -buildmode=pie "-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=0.3.14-16-gabd5dfd\" \"-X=github.com/ollama/ollama/llama.CpuFeatures=\" " -trimpath -o .../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu/ollama_llama_server ./runner GOARCH=amd64 go build -buildmode=pie "-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=0.3.14-16-gabd5dfd\" \"-X=github.com/ollama/ollama/llama.CpuFeatures="avx"\" " -trimpath -tags "avx" -o .../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu_avx/ollama_llama_server ./runner GOARCH=amd64 go build -buildmode=pie "-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=0.3.14-16-gabd5dfd\" \"-X=github.com/ollama/ollama/llama.CpuFeatures="avx,avx2"\" " -trimpath -tags "avx,avx2" -o .../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu_avx2/ollama_llama_server ./runner # github.com/ollama/ollama/llama clip.cpp:55:10: fatal error: 'cassert' file not found # github.com/ollama/ollama/llama clip.cpp:55:10: fatal error: 'cassert' file not found make[1]: *** [.../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu/ollama_llama_server] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [.../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu_avx/ollama_llama_server] Error 1 # github.com/ollama/ollama/llama clip.cpp:55:10: fatal error: 'cassert' file not found make[1]: *** [.../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu_avx2/ollama_llama_server] Error 1 make: *** [default] Error 2 ```
Author
Owner

@dhiltgen commented on GitHub (Oct 30, 2024):

Can you check to see which gcc and/or clang is first in your PATH? If you used the instructions guiding to install with brew, make sure the brew one is the one being used. If that does clear it up, we can update the docs to note that.

<!-- gh-comment-id:2448386886 --> @dhiltgen commented on GitHub (Oct 30, 2024): Can you check to see which gcc and/or clang is first in your PATH? If you used the instructions guiding to install with brew, make sure the brew one is the one being used. If that does clear it up, we can update the docs to note that.
Author
Owner

@efd6 commented on GitHub (Oct 31, 2024):

No, that fails. Though differently.

Confirming the correct GCC is running:

$ gcc --version
gcc (Homebrew GCC 14.2.0_1) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ which gcc
/usr/local/Cellar/gcc/14.2.0_1/bin/gcc

go generate approach:

$ go generate ./...
+ set -o pipefail
+ compress_pids=
+ echo 'Starting darwin generate script'
Starting darwin generate script
++ dirname ./gen_darwin.sh
+ source ./gen_common.sh
+ init_vars
+ case "${GOARCH}" in
+ ARCH=x86_64
+ LLAMACPP_DIR=../llama.cpp
+ CMAKE_DEFS=-DCMAKE_SKIP_RPATH=on
+ CMAKE_TARGETS='--target ollama_llama_server'
+ echo ''
+ grep -- -g
+ CMAKE_DEFS='-DCMAKE_BUILD_TYPE=Release -DLLAMA_SERVER_VERBOSE=off -DCMAKE_SKIP_RPATH=on'
+ case $(uname -s) in
++ uname -s
+ LIB_EXT=dylib
+ WHOLE_ARCHIVE=-Wl,-force_load
+ NO_WHOLE_ARCHIVE=
+ GCC_ARCH='-arch x86_64'
+ DIST_BASE=../../dist/darwin-amd64/
+ PAYLOAD_BASE=../../build/darwin/amd64
+ '[' -z '' ']'
+ CMAKE_CUDA_ARCHITECTURES='50;52;61;70;75;80'
++ command -v pigz
++ echo gzip
+ GZIP=gzip
+ RUNNER_BASE=../../dist/darwin-amd64//lib/ollama/runners
+ git_module_setup
+ '[' -n '' ']'
+ '[' -d ../llama.cpp/gguf ']'
+ git submodule init
+ git submodule update --force ../llama.cpp
Submodule path '../llama.cpp': checked out '3f1ae2e32cde00c39b96be6d01c2997c29bae555'
+ apply_patches
+ for patch in '../patches/*.patch'
+ git -c user.name=nobody -c 'user.email=<>' -C ../llama.cpp am ../patches/0000-cmakelist.patch
Applying: patch cmakelist
+ for patch in '../patches/*.patch'
+ git -c user.name=nobody -c 'user.email=<>' -C ../llama.cpp am ../patches/0001-load-progress.patch
Applying: patch load progress
+ for patch in '../patches/*.patch'
+ git -c user.name=nobody -c 'user.email=<>' -C ../llama.cpp am ../patches/0002-clip-log.patch
Applying: clip log
+ for patch in '../patches/*.patch'
+ git -c user.name=nobody -c 'user.email=<>' -C ../llama.cpp am ../patches/0003-load_exception.patch
Applying: load exception
+ for patch in '../patches/*.patch'
+ git -c user.name=nobody -c 'user.email=<>' -C ../llama.cpp am ../patches/0004-metal.patch
Applying: metal
+ for patch in '../patches/*.patch'
+ git -c user.name=nobody -c 'user.email=<>' -C ../llama.cpp am ../patches/0005-default-pretokenizer.patch
Applying: 05-default-pretokenizer.diff
+ for patch in '../patches/*.patch'
+ git -c user.name=nobody -c 'user.email=<>' -C ../llama.cpp am ../patches/0006-embeddings.patch
Applying: embeddings
+ for patch in '../patches/*.patch'
+ git -c user.name=nobody -c 'user.email=<>' -C ../llama.cpp am ../patches/0007-clip-unicode.patch
Applying: clip unicode
+ for patch in '../patches/*.patch'
+ git -c user.name=nobody -c 'user.email=<>' -C ../llama.cpp am ../patches/0008-solar-pro.patch
Applying: add solar-pro support
+ COMMON_DARWIN_DEFS='-DBUILD_SHARED_LIBS=off -DCMAKE_OSX_DEPLOYMENT_TARGET=11.3 -DGGML_METAL_MACOSX_VERSION_MIN=11.3 -DCMAKE_SYSTEM_NAME=Darwin -DGGML_METAL_EMBED_LIBRARY=on -DGGML_OPENMP=off'
+ case "${GOARCH}" in
+ COMMON_CPU_DEFS='-DBUILD_SHARED_LIBS=off -DCMAKE_OSX_DEPLOYMENT_TARGET=11.3 -DGGML_METAL_MACOSX_VERSION_MIN=11.3 -DCMAKE_SYSTEM_NAME=Darwin -DGGML_METAL_EMBED_LIBRARY=on -DGGML_OPENMP=off -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DCMAKE_OSX_ARCHITECTURES=x86_64 -DGGML_METAL=off -DGGML_NATIVE=off'
+ '[' -z '' ']'
+ init_vars
+ case "${GOARCH}" in
+ ARCH=x86_64
+ LLAMACPP_DIR=../llama.cpp
+ CMAKE_DEFS=-DCMAKE_SKIP_RPATH=on
+ CMAKE_TARGETS='--target ollama_llama_server'
+ echo ''
+ grep -- -g
+ CMAKE_DEFS='-DCMAKE_BUILD_TYPE=Release -DLLAMA_SERVER_VERBOSE=off -DCMAKE_SKIP_RPATH=on'
+ case $(uname -s) in
++ uname -s
+ LIB_EXT=dylib
+ WHOLE_ARCHIVE=-Wl,-force_load
+ NO_WHOLE_ARCHIVE=
+ GCC_ARCH='-arch x86_64'
+ DIST_BASE=../../dist/darwin-amd64/
+ PAYLOAD_BASE=../../build/darwin/amd64
+ '[' -z '50;52;61;70;75;80' ']'
++ command -v pigz
++ echo gzip
+ GZIP=gzip
+ RUNNER_BASE=../../dist/darwin-amd64//lib/ollama/runners
+ CMAKE_DEFS='-DBUILD_SHARED_LIBS=off -DCMAKE_OSX_DEPLOYMENT_TARGET=11.3 -DGGML_METAL_MACOSX_VERSION_MIN=11.3 -DCMAKE_SYSTEM_NAME=Darwin -DGGML_METAL_EMBED_LIBRARY=on -DGGML_OPENMP=off -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DCMAKE_OSX_ARCHITECTURES=x86_64 -DGGML_METAL=off -DGGML_NATIVE=off -DGGML_ACCELERATE=off -DGGML_BLAS=off -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DCMAKE_BUILD_TYPE=Release -DLLAMA_SERVER_VERBOSE=off -DCMAKE_SKIP_RPATH=on'
+ RUNNER=cpu
+ BUILD_DIR=../build/darwin/amd64/cpu
+ echo 'Building LCD CPU'
Building LCD CPU
+ build
+ cmake -S ../llama.cpp -B ../build/darwin/amd64/cpu -DBUILD_SHARED_LIBS=off -DCMAKE_OSX_DEPLOYMENT_TARGET=11.3 -DGGML_METAL_MACOSX_VERSION_MIN=11.3 -DCMAKE_SYSTEM_NAME=Darwin -DGGML_METAL_EMBED_LIBRARY=on -DGGML_OPENMP=off -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DCMAKE_OSX_ARCHITECTURES=x86_64 -DGGML_METAL=off -DGGML_NATIVE=off -DGGML_ACCELERATE=off -DGGML_BLAS=off -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DCMAKE_BUILD_TYPE=Release -DLLAMA_SERVER_VERBOSE=off -DCMAKE_SKIP_RPATH=on
-- The C compiler identification is AppleClang 16.0.0.16000026
-- The CXX compiler identification is AppleClang 16.0.0.16000026
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.39.5 (Apple Git-154)")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Using llamafile
-- ccache found, compilation results will be cached. Disable with GGML_CCACHE=OFF.
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- x86 detected
-- Configuring done (6.7s)
-- Generating done (1.2s)
-- Build files have been written to: .../src/github.com/ollama/ollama/llm/build/darwin/amd64/cpu
+ cmake --build ../build/darwin/amd64/cpu --target ollama_llama_server -j8
[  0%] Generating build details from Git
[  0%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml.c.o
[  6%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml-alloc.c.o
[ 13%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml-quants.c.o
[ 13%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml-backend.c.o
[ 13%] Building CXX object ggml/src/CMakeFiles/ggml.dir/llamafile/sgemm.cpp.o
[ 20%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml-aarch64.c.o
-- Found Git: /usr/bin/git (found version "2.39.5 (Apple Git-154)")
[ 26%] Building CXX object common/CMakeFiles/build_info.dir/build-info.cpp.o
[ 26%] Built target build_info
.../src/github.com/ollama/ollama/llm/llama.cpp/ggml/src/ggml.c:2352:39: warning: passing 'const ggml_fp16_t *' (aka 'const unsigned short *') to parameter of type 'ggml_fp16_t *' (aka 'unsigned short *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
 2352 |             ax[j] = GGML_F16_VEC_LOAD(x + i + j*GGML_F16_EPR, j);
      |                     ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
.../src/github.com/ollama/ollama/llm/llama.cpp/ggml/src/ggml.c:1722:55: note: expanded from macro 'GGML_F16_VEC_LOAD'
 1722 | #define GGML_F16_VEC_LOAD(p, i)      GGML_F32Cx4_LOAD(p)
      |                                      ~~~~~~~~~~~~~~~~~^~
.../src/github.com/ollama/ollama/llm/llama.cpp/ggml/src/ggml.c:1712:50: note: expanded from macro 'GGML_F32Cx4_LOAD'
 1712 | #define GGML_F32Cx4_LOAD(x)     __sse_f16x4_load(x)
      |                                                  ^
.../src/github.com/ollama/ollama/llm/llama.cpp/ggml/src/ggml.c:1687:52: note: passing argument to parameter 'x' here
 1687 | static inline __m128 __sse_f16x4_load(ggml_fp16_t *x) {
      |                                                    ^
1 warning generated.
[ 26%] Linking CXX static library libggml.a
[ 26%] Built target ggml
[ 33%] Building CXX object src/CMakeFiles/llama.dir/llama.cpp.o
[ 40%] Building CXX object src/CMakeFiles/llama.dir/llama-vocab.cpp.o
[ 46%] Building CXX object src/CMakeFiles/llama.dir/llama-sampling.cpp.o
[ 53%] Building CXX object src/CMakeFiles/llama.dir/unicode-data.cpp.o
[ 53%] Building CXX object src/CMakeFiles/llama.dir/unicode.cpp.o
[ 53%] Building CXX object src/CMakeFiles/llama.dir/llama-grammar.cpp.o
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama.cpp:1:
.../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-impl.h:5:10: fatal error: 'string' file not found
    5 | #include <string>
      |          ^~~~~~~~
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-vocab.cpp:1:
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-vocab.h:3:
.../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-impl.h:5:10: fatal error: 'string' file not found
    5 | #include <string>
      |          ^~~~~~~~
1 error generated.
make[3]: *** [src/CMakeFiles/llama.dir/llama-vocab.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-grammar.cpp:1:
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-grammar.h:3:
.../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-impl.h:5:10: fatal error: 'string' file not found
    5 | #include <string>
      |          ^~~~~~~~
1 error generated.
make[3]: *** [src/CMakeFiles/llama.dir/llama-grammar.cpp.o] Error 1
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/unicode-data.cpp:3:
.../src/github.com/ollama/ollama/llm/llama.cpp/src/unicode-data.h:3:10: fatal error: 'cstdint' file not found
    3 | #include <cstdint>
      |          ^~~~~~~~~
1 error generated.
make[3]: *** [src/CMakeFiles/llama.dir/unicode-data.cpp.o] Error 1
1 error generated.
make[3]: *** [src/CMakeFiles/llama.dir/llama.cpp.o] Error 1
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-sampling.cpp:1:
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-sampling.h:5:
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-grammar.h:3:
.../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-impl.h:5:10: fatal error: 'string' file not found
    5 | #include <string>
      |          ^~~~~~~~
1 error generated.
In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/unicode.cpp:5:
.../src/github.com/ollama/ollama/llm/llama.cpp/src/unicode.h:3:10: fatal error: 'cstdint' file not found
    3 | #include <cstdint>
      |          ^~~~~~~~~
make[3]: *** [src/CMakeFiles/llama.dir/llama-sampling.cpp.o] Error 1
1 error generated.
make[3]: *** [src/CMakeFiles/llama.dir/unicode.cpp.o] Error 1
make[2]: *** [src/CMakeFiles/llama.dir/all] Error 2
make[1]: *** [ext_server/CMakeFiles/ollama_llama_server.dir/rule] Error 2
make: *** [ollama_llama_server] Error 2
llm/generate/generate_darwin.go:3: running "bash": exit status 2

make approach:

$ make -C llama -j 5
rm -rf .../src/github.com/ollama/ollama/build/darwin/amd64/default .../src/github.com/ollama/ollama/build/darwin/amd64/metal .../src/github.com/ollama/ollama/build/darwin/amd64/cpu .../src/github.com/ollama/ollama/build/darwin/amd64/cpu_avx .../src/github.com/ollama/ollama/build/darwin/amd64/cpu_avx2
/Library/Developer/CommandLineTools/usr/bin/make -f make/Makefile.default
GOARCH=amd64 go build -buildmode=pie "-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=0.3.14-16-gabd5dfd\" \"-X=github.com/ollama/ollama/llama.CpuFeatures=\" " -trimpath   -o .../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu/ollama_llama_server ./runner
GOARCH=amd64 go build -buildmode=pie "-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=0.3.14-16-gabd5dfd\" \"-X=github.com/ollama/ollama/llama.CpuFeatures="avx"\" " -trimpath -tags "avx" -o .../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu_avx/ollama_llama_server ./runner
GOARCH=amd64 go build -buildmode=pie "-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=0.3.14-16-gabd5dfd\" \"-X=github.com/ollama/ollama/llama.CpuFeatures="avx,avx2"\" " -trimpath -tags "avx,avx2" -o .../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu_avx2/ollama_llama_server ./runner
# github.com/ollama/ollama/llama
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Accelerate.framework/Headers/../Frameworks/vecLib.framework/Headers/vecLib.h:42,
                 from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h:20,
                 from ggml.c:456:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vU16HalfMultiply':
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:381:3: note: use '-flax-vector-conversions' to permit conversions between vectors with differing element types or numbers of subparts
  381 |   vUInt16   __vbasicops_vB) { return _mm_mullo_epi16(__vbasicops_vA, __vbasicops_vB); }
      |   ^~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:381:54: error: incompatible type for argument 1 of '_mm_mullo_epi16'
  381 |   vUInt16   __vbasicops_vB) { return _mm_mullo_epi16(__vbasicops_vA, __vbasicops_vB); }
      |                                                      ^~~~~~~~~~~~~~
      |                                                      |
      |                                                      vUInt16
In file included from /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/xmmintrin.h:1322,
                 from /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/immintrin.h:31,
                 from ggml-cpu-impl.h:452,
                 from ggml.c:32:
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1166:26: note: expected '__m128i' but argument is of type 'vUInt16'
 1166 | _mm_mullo_epi16 (__m128i __A, __m128i __B)
      |                  ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:381:70: error: incompatible type for argument 2 of '_mm_mullo_epi16'
  381 |   vUInt16   __vbasicops_vB) { return _mm_mullo_epi16(__vbasicops_vA, __vbasicops_vB); }
      |                                                                      ^~~~~~~~~~~~~~
      |                                                                      |
      |                                                                      vUInt16
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1166:39: note: expected '__m128i' but argument is of type 'vUInt16'
 1166 | _mm_mullo_epi16 (__m128i __A, __m128i __B)
      |                               ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vS16HalfMultiply':
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:411:54: error: incompatible type for argument 1 of '_mm_mullo_epi16'
  411 |   vSInt16   __vbasicops_vB) { return _mm_mullo_epi16(__vbasicops_vA, __vbasicops_vB); }
      |                                                      ^~~~~~~~~~~~~~
      |                                                      |
      |                                                      vSInt16
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1166:26: note: expected '__m128i' but argument is of type 'vSInt16'
 1166 | _mm_mullo_epi16 (__m128i __A, __m128i __B)
      |                  ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:411:70: error: incompatible type for argument 2 of '_mm_mullo_epi16'
  411 |   vSInt16   __vbasicops_vB) { return _mm_mullo_epi16(__vbasicops_vA, __vbasicops_vB); }
      |                                                                      ^~~~~~~~~~~~~~
      |                                                                      |
      |                                                                      vSInt16
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1166:39: note: expected '__m128i' but argument is of type 'vSInt16'
 1166 | _mm_mullo_epi16 (__m128i __A, __m128i __B)
      |                               ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vU32FullMulEven':
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:471:37: error: incompatible type for argument 1 of '_mm_srli_epi64'
  471 |     __vbasicops_vA = _mm_srli_epi64(__vbasicops_vA, 32);
      |                                     ^~~~~~~~~~~~~~
      |                                     |
      |                                     vUInt32
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1261:25: note: expected '__m128i' but argument is of type 'vUInt32'
 1261 | _mm_srli_epi64 (__m128i __A, int __B)
      |                 ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:472:37: error: incompatible type for argument 1 of '_mm_srli_epi64'
  472 |     __vbasicops_vB = _mm_srli_epi64(__vbasicops_vB, 32);
      |                                     ^~~~~~~~~~~~~~
      |                                     |
      |                                     vUInt32
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1261:25: note: expected '__m128i' but argument is of type 'vUInt32'
 1261 | _mm_srli_epi64 (__m128i __A, int __B)
      |                 ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:473:26: error: incompatible type for argument 1 of '_mm_mul_epu32'
  473 |     return _mm_mul_epu32(__vbasicops_vA, __vbasicops_vB);
      |                          ^~~~~~~~~~~~~~
      |                          |
      |                          vUInt32
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1178:24: note: expected '__m128i' but argument is of type 'vUInt32'
 1178 | _mm_mul_epu32 (__m128i __A, __m128i __B)
      |                ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:473:42: error: incompatible type for argument 2 of '_mm_mul_epu32'
  473 |     return _mm_mul_epu32(__vbasicops_vA, __vbasicops_vB);
      |                                          ^~~~~~~~~~~~~~
      |                                          |
      |                                          vUInt32
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1178:37: note: expected '__m128i' but argument is of type 'vUInt32'
 1178 | _mm_mul_epu32 (__m128i __A, __m128i __B)
      |                             ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vU32FullMulOdd':
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:498:52: error: incompatible type for argument 1 of '_mm_mul_epu32'
  498 |   vUInt32   __vbasicops_vB) { return _mm_mul_epu32(__vbasicops_vA, __vbasicops_vB); }
      |                                                    ^~~~~~~~~~~~~~
      |                                                    |
      |                                                    vUInt32
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1178:24: note: expected '__m128i' but argument is of type 'vUInt32'
 1178 | _mm_mul_epu32 (__m128i __A, __m128i __B)
      |                ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:498:68: error: incompatible type for argument 2 of '_mm_mul_epu32'
  498 |   vUInt32   __vbasicops_vB) { return _mm_mul_epu32(__vbasicops_vA, __vbasicops_vB); }
      |                                                                    ^~~~~~~~~~~~~~
      |                                                                    |
      |                                                                    vUInt32
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1178:37: note: expected '__m128i' but argument is of type 'vUInt32'
 1178 | _mm_mul_epu32 (__m128i __A, __m128i __B)
      |                             ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vU64Sub':
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:667:52: error: incompatible type for argument 1 of '_mm_sub_epi64'
  667 |   vUInt32   __vbasicops_vB) { return _mm_sub_epi64(__vbasicops_vA, __vbasicops_vB); }
      |                                                    ^~~~~~~~~~~~~~
      |                                                    |
      |                                                    vUInt32
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1124:24: note: expected '__m128i' but argument is of type 'vUInt32'
 1124 | _mm_sub_epi64 (__m128i __A, __m128i __B)
      |                ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:667:68: error: incompatible type for argument 2 of '_mm_sub_epi64'
  667 |   vUInt32   __vbasicops_vB) { return _mm_sub_epi64(__vbasicops_vA, __vbasicops_vB); }
      |                                                                    ^~~~~~~~~~~~~~
      |                                                                    |
      |                                                                    vUInt32
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1124:37: note: expected '__m128i' but argument is of type 'vUInt32'
 1124 | _mm_sub_epi64 (__m128i __A, __m128i __B)
      |                             ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vS64Sub':
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:742:52: error: incompatible type for argument 1 of '_mm_sub_epi64'
  742 |   vSInt32   __vbasicops_vB) { return _mm_sub_epi64(__vbasicops_vA, __vbasicops_vB); }
      |                                                    ^~~~~~~~~~~~~~
      |                                                    |
      |                                                    vSInt32
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1124:24: note: expected '__m128i' but argument is of type 'vSInt32'
 1124 | _mm_sub_epi64 (__m128i __A, __m128i __B)
      |                ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:742:68: error: incompatible type for argument 2 of '_mm_sub_epi64'
  742 |   vSInt32   __vbasicops_vB) { return _mm_sub_epi64(__vbasicops_vA, __vbasicops_vB); }
      |                                                                    ^~~~~~~~~~~~~~
      |                                                                    |
      |                                                                    vSInt32
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1124:37: note: expected '__m128i' but argument is of type 'vSInt32'
 1124 | _mm_sub_epi64 (__m128i __A, __m128i __B)
      |                             ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vU64Add':
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:814:52: error: incompatible type for argument 1 of '_mm_add_epi64'
  814 |   vUInt32   __vbasicops_vB) { return _mm_add_epi64(__vbasicops_vA, __vbasicops_vB); }
      |                                                    ^~~~~~~~~~~~~~
      |                                                    |
      |                                                    vUInt32
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1076:24: note: expected '__m128i' but argument is of type 'vUInt32'
 1076 | _mm_add_epi64 (__m128i __A, __m128i __B)
      |                ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:814:68: error: incompatible type for argument 2 of '_mm_add_epi64'
  814 |   vUInt32   __vbasicops_vB) { return _mm_add_epi64(__vbasicops_vA, __vbasicops_vB); }
      |                                                                    ^~~~~~~~~~~~~~
      |                                                                    |
      |                                                                    vUInt32
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1076:37: note: expected '__m128i' but argument is of type 'vUInt32'
 1076 | _mm_add_epi64 (__m128i __A, __m128i __B)
      |                             ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vS64Add':
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:884:52: error: incompatible type for argument 1 of '_mm_add_epi64'
  884 |   vSInt32   __vbasicops_vB) { return _mm_add_epi64(__vbasicops_vA, __vbasicops_vB); }
      |                                                    ^~~~~~~~~~~~~~
      |                                                    |
      |                                                    vSInt32
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1076:24: note: expected '__m128i' but argument is of type 'vSInt32'
 1076 | _mm_add_epi64 (__m128i __A, __m128i __B)
      |                ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:884:68: error: incompatible type for argument 2 of '_mm_add_epi64'
  884 |   vSInt32   __vbasicops_vB) { return _mm_add_epi64(__vbasicops_vA, __vbasicops_vB); }
      |                                                                    ^~~~~~~~~~~~~~
      |                                                                    |
      |                                                                    vSInt32
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1076:37: note: expected '__m128i' but argument is of type 'vSInt32'
 1076 | _mm_add_epi64 (__m128i __A, __m128i __B)
      |                             ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vLL64Shift':
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:989:40: error: incompatible type for argument 1 of '_mm_and_si128'
  989 |                          _mm_and_si128(__vbasicops_vShiftFactor, _mm_cvtsi32_si128( 0x3F )));
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                        |
      |                                        vUInt8
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1315:24: note: expected '__m128i' but argument is of type 'vUInt8'
 1315 | _mm_and_si128 (__m128i __A, __m128i __B)
      |                ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:988:26: error: incompatible type for argument 1 of '_mm_sll_epi64'
  988 |     return _mm_sll_epi64(__vbasicops_vA,
      |                          ^~~~~~~~~~~~~~
      |                          |
      |                          vUInt32
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1279:24: note: expected '__m128i' but argument is of type 'vUInt32'
 1279 | _mm_sll_epi64 (__m128i __A, __m128i __B)
      |                ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vLR64Shift':
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:1027:40: error: incompatible type for argument 1 of '_mm_and_si128'
 1027 |                          _mm_and_si128(__vbasicops_vShiftFactor, _mm_cvtsi32_si128( 0x3F )));
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                        |
      |                                        vUInt8
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1315:24: note: expected '__m128i' but argument is of type 'vUInt8'
 1315 | _mm_and_si128 (__m128i __A, __m128i __B)
      |                ~~~~~~~~^~~
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:1026:26: error: incompatible type for argument 1 of '_mm_srl_epi64'
 1026 |     return _mm_srl_epi64(__vbasicops_vA,
      |                          ^~~~~~~~~~~~~~
      |                          |
      |                          vUInt32
/usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1309:24: note: expected '__m128i' but argument is of type 'vUInt32'
 1309 | _mm_srl_epi64 (__m128i __A, __m128i __B)
      |                ~~~~~~~~^~~
At top level:
cc1: note: unrecognized command-line option '-Wno-incompatible-pointer-types-discards-qualifiers' may have been intended to silence earlier diagnostics
make[1]: *** [.../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu_avx2/ollama_llama_server] Error 1
make[1]: *** Waiting for unfinished jobs....
# github.com/ollama/ollama/llama
ggml.c: In function 'ggml_vec_mad_f16':
ggml.c:2378:45: warning: passing argument 1 of '__sse_f16x4_load' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
 2378 |             ax[j] = GGML_F16_VEC_LOAD(x + i + j*GGML_F16_EPR, j);
      |                                             ^
ggml.c:1738:50: note: in definition of macro 'GGML_F32Cx4_LOAD'
 1738 | #define GGML_F32Cx4_LOAD(x)     __sse_f16x4_load(x)
      |                                                  ^
ggml.c:2378:21: note: in expansion of macro 'GGML_F16_VEC_LOAD'
 2378 |             ax[j] = GGML_F16_VEC_LOAD(x + i + j*GGML_F16_EPR, j);
      |                     ^~~~~~~~~~~~~~~~~
ggml.c:1713:52: note: expected 'ggml_fp16_t *' {aka 'short unsigned int *'} but argument is of type 'const ggml_fp16_t *' {aka 'const short unsigned int *'}
 1713 | static inline __m128 __sse_f16x4_load(ggml_fp16_t *x) {
      |                                       ~~~~~~~~~~~~~^
At top level:
cc1: note: unrecognized command-line option '-Wno-incompatible-pointer-types-discards-qualifiers' may have been intended to silence earlier diagnostics
# github.com/ollama/ollama/llama
ggml.c: In function 'ggml_vec_mad_f16':
ggml.c:2378:45: warning: passing argument 1 of '__avx_f32cx8_load' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
 2378 |             ax[j] = GGML_F16_VEC_LOAD(x + i + j*GGML_F16_EPR, j);
      |                                             ^
ggml.c:1458:51: note: in definition of macro 'GGML_F32Cx8_LOAD'
 1458 | #define GGML_F32Cx8_LOAD(x)     __avx_f32cx8_load(x)
      |                                                   ^
ggml.c:2378:21: note: in expansion of macro 'GGML_F16_VEC_LOAD'
 2378 |             ax[j] = GGML_F16_VEC_LOAD(x + i + j*GGML_F16_EPR, j);
      |                     ^~~~~~~~~~~~~~~~~
ggml.c:1441:53: note: expected 'ggml_fp16_t *' {aka 'short unsigned int *'} but argument is of type 'const ggml_fp16_t *' {aka 'const short unsigned int *'}
 1441 | static inline __m256 __avx_f32cx8_load(ggml_fp16_t *x) {
      |                                        ~~~~~~~~~~~~~^
At top level:
cc1: note: unrecognized command-line option '-Wno-incompatible-pointer-types-discards-qualifiers' may have been intended to silence earlier diagnostics
make: *** [default] Error 2
<!-- gh-comment-id:2449065798 --> @efd6 commented on GitHub (Oct 31, 2024): No, that fails. Though differently. Confirming the correct GCC is running: ``` $ gcc --version gcc (Homebrew GCC 14.2.0_1) 14.2.0 Copyright (C) 2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ which gcc /usr/local/Cellar/gcc/14.2.0_1/bin/gcc ``` `go generate` approach: ``` $ go generate ./... + set -o pipefail + compress_pids= + echo 'Starting darwin generate script' Starting darwin generate script ++ dirname ./gen_darwin.sh + source ./gen_common.sh + init_vars + case "${GOARCH}" in + ARCH=x86_64 + LLAMACPP_DIR=../llama.cpp + CMAKE_DEFS=-DCMAKE_SKIP_RPATH=on + CMAKE_TARGETS='--target ollama_llama_server' + echo '' + grep -- -g + CMAKE_DEFS='-DCMAKE_BUILD_TYPE=Release -DLLAMA_SERVER_VERBOSE=off -DCMAKE_SKIP_RPATH=on' + case $(uname -s) in ++ uname -s + LIB_EXT=dylib + WHOLE_ARCHIVE=-Wl,-force_load + NO_WHOLE_ARCHIVE= + GCC_ARCH='-arch x86_64' + DIST_BASE=../../dist/darwin-amd64/ + PAYLOAD_BASE=../../build/darwin/amd64 + '[' -z '' ']' + CMAKE_CUDA_ARCHITECTURES='50;52;61;70;75;80' ++ command -v pigz ++ echo gzip + GZIP=gzip + RUNNER_BASE=../../dist/darwin-amd64//lib/ollama/runners + git_module_setup + '[' -n '' ']' + '[' -d ../llama.cpp/gguf ']' + git submodule init + git submodule update --force ../llama.cpp Submodule path '../llama.cpp': checked out '3f1ae2e32cde00c39b96be6d01c2997c29bae555' + apply_patches + for patch in '../patches/*.patch' + git -c user.name=nobody -c 'user.email=<>' -C ../llama.cpp am ../patches/0000-cmakelist.patch Applying: patch cmakelist + for patch in '../patches/*.patch' + git -c user.name=nobody -c 'user.email=<>' -C ../llama.cpp am ../patches/0001-load-progress.patch Applying: patch load progress + for patch in '../patches/*.patch' + git -c user.name=nobody -c 'user.email=<>' -C ../llama.cpp am ../patches/0002-clip-log.patch Applying: clip log + for patch in '../patches/*.patch' + git -c user.name=nobody -c 'user.email=<>' -C ../llama.cpp am ../patches/0003-load_exception.patch Applying: load exception + for patch in '../patches/*.patch' + git -c user.name=nobody -c 'user.email=<>' -C ../llama.cpp am ../patches/0004-metal.patch Applying: metal + for patch in '../patches/*.patch' + git -c user.name=nobody -c 'user.email=<>' -C ../llama.cpp am ../patches/0005-default-pretokenizer.patch Applying: 05-default-pretokenizer.diff + for patch in '../patches/*.patch' + git -c user.name=nobody -c 'user.email=<>' -C ../llama.cpp am ../patches/0006-embeddings.patch Applying: embeddings + for patch in '../patches/*.patch' + git -c user.name=nobody -c 'user.email=<>' -C ../llama.cpp am ../patches/0007-clip-unicode.patch Applying: clip unicode + for patch in '../patches/*.patch' + git -c user.name=nobody -c 'user.email=<>' -C ../llama.cpp am ../patches/0008-solar-pro.patch Applying: add solar-pro support + COMMON_DARWIN_DEFS='-DBUILD_SHARED_LIBS=off -DCMAKE_OSX_DEPLOYMENT_TARGET=11.3 -DGGML_METAL_MACOSX_VERSION_MIN=11.3 -DCMAKE_SYSTEM_NAME=Darwin -DGGML_METAL_EMBED_LIBRARY=on -DGGML_OPENMP=off' + case "${GOARCH}" in + COMMON_CPU_DEFS='-DBUILD_SHARED_LIBS=off -DCMAKE_OSX_DEPLOYMENT_TARGET=11.3 -DGGML_METAL_MACOSX_VERSION_MIN=11.3 -DCMAKE_SYSTEM_NAME=Darwin -DGGML_METAL_EMBED_LIBRARY=on -DGGML_OPENMP=off -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DCMAKE_OSX_ARCHITECTURES=x86_64 -DGGML_METAL=off -DGGML_NATIVE=off' + '[' -z '' ']' + init_vars + case "${GOARCH}" in + ARCH=x86_64 + LLAMACPP_DIR=../llama.cpp + CMAKE_DEFS=-DCMAKE_SKIP_RPATH=on + CMAKE_TARGETS='--target ollama_llama_server' + echo '' + grep -- -g + CMAKE_DEFS='-DCMAKE_BUILD_TYPE=Release -DLLAMA_SERVER_VERBOSE=off -DCMAKE_SKIP_RPATH=on' + case $(uname -s) in ++ uname -s + LIB_EXT=dylib + WHOLE_ARCHIVE=-Wl,-force_load + NO_WHOLE_ARCHIVE= + GCC_ARCH='-arch x86_64' + DIST_BASE=../../dist/darwin-amd64/ + PAYLOAD_BASE=../../build/darwin/amd64 + '[' -z '50;52;61;70;75;80' ']' ++ command -v pigz ++ echo gzip + GZIP=gzip + RUNNER_BASE=../../dist/darwin-amd64//lib/ollama/runners + CMAKE_DEFS='-DBUILD_SHARED_LIBS=off -DCMAKE_OSX_DEPLOYMENT_TARGET=11.3 -DGGML_METAL_MACOSX_VERSION_MIN=11.3 -DCMAKE_SYSTEM_NAME=Darwin -DGGML_METAL_EMBED_LIBRARY=on -DGGML_OPENMP=off -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DCMAKE_OSX_ARCHITECTURES=x86_64 -DGGML_METAL=off -DGGML_NATIVE=off -DGGML_ACCELERATE=off -DGGML_BLAS=off -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DCMAKE_BUILD_TYPE=Release -DLLAMA_SERVER_VERBOSE=off -DCMAKE_SKIP_RPATH=on' + RUNNER=cpu + BUILD_DIR=../build/darwin/amd64/cpu + echo 'Building LCD CPU' Building LCD CPU + build + cmake -S ../llama.cpp -B ../build/darwin/amd64/cpu -DBUILD_SHARED_LIBS=off -DCMAKE_OSX_DEPLOYMENT_TARGET=11.3 -DGGML_METAL_MACOSX_VERSION_MIN=11.3 -DCMAKE_SYSTEM_NAME=Darwin -DGGML_METAL_EMBED_LIBRARY=on -DGGML_OPENMP=off -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DCMAKE_OSX_ARCHITECTURES=x86_64 -DGGML_METAL=off -DGGML_NATIVE=off -DGGML_ACCELERATE=off -DGGML_BLAS=off -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DCMAKE_BUILD_TYPE=Release -DLLAMA_SERVER_VERBOSE=off -DCMAKE_SKIP_RPATH=on -- The C compiler identification is AppleClang 16.0.0.16000026 -- The CXX compiler identification is AppleClang 16.0.0.16000026 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found Git: /usr/bin/git (found version "2.39.5 (Apple Git-154)") -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Using llamafile -- ccache found, compilation results will be cached. Disable with GGML_CCACHE=OFF. -- CMAKE_SYSTEM_PROCESSOR: x86_64 -- x86 detected -- Configuring done (6.7s) -- Generating done (1.2s) -- Build files have been written to: .../src/github.com/ollama/ollama/llm/build/darwin/amd64/cpu + cmake --build ../build/darwin/amd64/cpu --target ollama_llama_server -j8 [ 0%] Generating build details from Git [ 0%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml.c.o [ 6%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml-alloc.c.o [ 13%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml-quants.c.o [ 13%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml-backend.c.o [ 13%] Building CXX object ggml/src/CMakeFiles/ggml.dir/llamafile/sgemm.cpp.o [ 20%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml-aarch64.c.o -- Found Git: /usr/bin/git (found version "2.39.5 (Apple Git-154)") [ 26%] Building CXX object common/CMakeFiles/build_info.dir/build-info.cpp.o [ 26%] Built target build_info .../src/github.com/ollama/ollama/llm/llama.cpp/ggml/src/ggml.c:2352:39: warning: passing 'const ggml_fp16_t *' (aka 'const unsigned short *') to parameter of type 'ggml_fp16_t *' (aka 'unsigned short *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] 2352 | ax[j] = GGML_F16_VEC_LOAD(x + i + j*GGML_F16_EPR, j); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ .../src/github.com/ollama/ollama/llm/llama.cpp/ggml/src/ggml.c:1722:55: note: expanded from macro 'GGML_F16_VEC_LOAD' 1722 | #define GGML_F16_VEC_LOAD(p, i) GGML_F32Cx4_LOAD(p) | ~~~~~~~~~~~~~~~~~^~ .../src/github.com/ollama/ollama/llm/llama.cpp/ggml/src/ggml.c:1712:50: note: expanded from macro 'GGML_F32Cx4_LOAD' 1712 | #define GGML_F32Cx4_LOAD(x) __sse_f16x4_load(x) | ^ .../src/github.com/ollama/ollama/llm/llama.cpp/ggml/src/ggml.c:1687:52: note: passing argument to parameter 'x' here 1687 | static inline __m128 __sse_f16x4_load(ggml_fp16_t *x) { | ^ 1 warning generated. [ 26%] Linking CXX static library libggml.a [ 26%] Built target ggml [ 33%] Building CXX object src/CMakeFiles/llama.dir/llama.cpp.o [ 40%] Building CXX object src/CMakeFiles/llama.dir/llama-vocab.cpp.o [ 46%] Building CXX object src/CMakeFiles/llama.dir/llama-sampling.cpp.o [ 53%] Building CXX object src/CMakeFiles/llama.dir/unicode-data.cpp.o [ 53%] Building CXX object src/CMakeFiles/llama.dir/unicode.cpp.o [ 53%] Building CXX object src/CMakeFiles/llama.dir/llama-grammar.cpp.o In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama.cpp:1: .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-impl.h:5:10: fatal error: 'string' file not found 5 | #include <string> | ^~~~~~~~ In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-vocab.cpp:1: In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-vocab.h:3: .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-impl.h:5:10: fatal error: 'string' file not found 5 | #include <string> | ^~~~~~~~ 1 error generated. make[3]: *** [src/CMakeFiles/llama.dir/llama-vocab.cpp.o] Error 1 make[3]: *** Waiting for unfinished jobs.... In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-grammar.cpp:1: In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-grammar.h:3: .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-impl.h:5:10: fatal error: 'string' file not found 5 | #include <string> | ^~~~~~~~ 1 error generated. make[3]: *** [src/CMakeFiles/llama.dir/llama-grammar.cpp.o] Error 1 In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/unicode-data.cpp:3: .../src/github.com/ollama/ollama/llm/llama.cpp/src/unicode-data.h:3:10: fatal error: 'cstdint' file not found 3 | #include <cstdint> | ^~~~~~~~~ 1 error generated. make[3]: *** [src/CMakeFiles/llama.dir/unicode-data.cpp.o] Error 1 1 error generated. make[3]: *** [src/CMakeFiles/llama.dir/llama.cpp.o] Error 1 In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-sampling.cpp:1: In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-sampling.h:5: In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-grammar.h:3: .../src/github.com/ollama/ollama/llm/llama.cpp/src/llama-impl.h:5:10: fatal error: 'string' file not found 5 | #include <string> | ^~~~~~~~ 1 error generated. In file included from .../src/github.com/ollama/ollama/llm/llama.cpp/src/unicode.cpp:5: .../src/github.com/ollama/ollama/llm/llama.cpp/src/unicode.h:3:10: fatal error: 'cstdint' file not found 3 | #include <cstdint> | ^~~~~~~~~ make[3]: *** [src/CMakeFiles/llama.dir/llama-sampling.cpp.o] Error 1 1 error generated. make[3]: *** [src/CMakeFiles/llama.dir/unicode.cpp.o] Error 1 make[2]: *** [src/CMakeFiles/llama.dir/all] Error 2 make[1]: *** [ext_server/CMakeFiles/ollama_llama_server.dir/rule] Error 2 make: *** [ollama_llama_server] Error 2 llm/generate/generate_darwin.go:3: running "bash": exit status 2 ``` `make` approach: ``` $ make -C llama -j 5 rm -rf .../src/github.com/ollama/ollama/build/darwin/amd64/default .../src/github.com/ollama/ollama/build/darwin/amd64/metal .../src/github.com/ollama/ollama/build/darwin/amd64/cpu .../src/github.com/ollama/ollama/build/darwin/amd64/cpu_avx .../src/github.com/ollama/ollama/build/darwin/amd64/cpu_avx2 /Library/Developer/CommandLineTools/usr/bin/make -f make/Makefile.default GOARCH=amd64 go build -buildmode=pie "-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=0.3.14-16-gabd5dfd\" \"-X=github.com/ollama/ollama/llama.CpuFeatures=\" " -trimpath -o .../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu/ollama_llama_server ./runner GOARCH=amd64 go build -buildmode=pie "-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=0.3.14-16-gabd5dfd\" \"-X=github.com/ollama/ollama/llama.CpuFeatures="avx"\" " -trimpath -tags "avx" -o .../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu_avx/ollama_llama_server ./runner GOARCH=amd64 go build -buildmode=pie "-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=0.3.14-16-gabd5dfd\" \"-X=github.com/ollama/ollama/llama.CpuFeatures="avx,avx2"\" " -trimpath -tags "avx,avx2" -o .../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu_avx2/ollama_llama_server ./runner # github.com/ollama/ollama/llama In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Accelerate.framework/Headers/../Frameworks/vecLib.framework/Headers/vecLib.h:42, from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h:20, from ggml.c:456: /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vU16HalfMultiply': /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:381:3: note: use '-flax-vector-conversions' to permit conversions between vectors with differing element types or numbers of subparts 381 | vUInt16 __vbasicops_vB) { return _mm_mullo_epi16(__vbasicops_vA, __vbasicops_vB); } | ^~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:381:54: error: incompatible type for argument 1 of '_mm_mullo_epi16' 381 | vUInt16 __vbasicops_vB) { return _mm_mullo_epi16(__vbasicops_vA, __vbasicops_vB); } | ^~~~~~~~~~~~~~ | | | vUInt16 In file included from /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/xmmintrin.h:1322, from /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/immintrin.h:31, from ggml-cpu-impl.h:452, from ggml.c:32: /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1166:26: note: expected '__m128i' but argument is of type 'vUInt16' 1166 | _mm_mullo_epi16 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:381:70: error: incompatible type for argument 2 of '_mm_mullo_epi16' 381 | vUInt16 __vbasicops_vB) { return _mm_mullo_epi16(__vbasicops_vA, __vbasicops_vB); } | ^~~~~~~~~~~~~~ | | | vUInt16 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1166:39: note: expected '__m128i' but argument is of type 'vUInt16' 1166 | _mm_mullo_epi16 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vS16HalfMultiply': /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:411:54: error: incompatible type for argument 1 of '_mm_mullo_epi16' 411 | vSInt16 __vbasicops_vB) { return _mm_mullo_epi16(__vbasicops_vA, __vbasicops_vB); } | ^~~~~~~~~~~~~~ | | | vSInt16 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1166:26: note: expected '__m128i' but argument is of type 'vSInt16' 1166 | _mm_mullo_epi16 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:411:70: error: incompatible type for argument 2 of '_mm_mullo_epi16' 411 | vSInt16 __vbasicops_vB) { return _mm_mullo_epi16(__vbasicops_vA, __vbasicops_vB); } | ^~~~~~~~~~~~~~ | | | vSInt16 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1166:39: note: expected '__m128i' but argument is of type 'vSInt16' 1166 | _mm_mullo_epi16 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vU32FullMulEven': /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:471:37: error: incompatible type for argument 1 of '_mm_srli_epi64' 471 | __vbasicops_vA = _mm_srli_epi64(__vbasicops_vA, 32); | ^~~~~~~~~~~~~~ | | | vUInt32 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1261:25: note: expected '__m128i' but argument is of type 'vUInt32' 1261 | _mm_srli_epi64 (__m128i __A, int __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:472:37: error: incompatible type for argument 1 of '_mm_srli_epi64' 472 | __vbasicops_vB = _mm_srli_epi64(__vbasicops_vB, 32); | ^~~~~~~~~~~~~~ | | | vUInt32 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1261:25: note: expected '__m128i' but argument is of type 'vUInt32' 1261 | _mm_srli_epi64 (__m128i __A, int __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:473:26: error: incompatible type for argument 1 of '_mm_mul_epu32' 473 | return _mm_mul_epu32(__vbasicops_vA, __vbasicops_vB); | ^~~~~~~~~~~~~~ | | | vUInt32 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1178:24: note: expected '__m128i' but argument is of type 'vUInt32' 1178 | _mm_mul_epu32 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:473:42: error: incompatible type for argument 2 of '_mm_mul_epu32' 473 | return _mm_mul_epu32(__vbasicops_vA, __vbasicops_vB); | ^~~~~~~~~~~~~~ | | | vUInt32 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1178:37: note: expected '__m128i' but argument is of type 'vUInt32' 1178 | _mm_mul_epu32 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vU32FullMulOdd': /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:498:52: error: incompatible type for argument 1 of '_mm_mul_epu32' 498 | vUInt32 __vbasicops_vB) { return _mm_mul_epu32(__vbasicops_vA, __vbasicops_vB); } | ^~~~~~~~~~~~~~ | | | vUInt32 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1178:24: note: expected '__m128i' but argument is of type 'vUInt32' 1178 | _mm_mul_epu32 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:498:68: error: incompatible type for argument 2 of '_mm_mul_epu32' 498 | vUInt32 __vbasicops_vB) { return _mm_mul_epu32(__vbasicops_vA, __vbasicops_vB); } | ^~~~~~~~~~~~~~ | | | vUInt32 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1178:37: note: expected '__m128i' but argument is of type 'vUInt32' 1178 | _mm_mul_epu32 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vU64Sub': /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:667:52: error: incompatible type for argument 1 of '_mm_sub_epi64' 667 | vUInt32 __vbasicops_vB) { return _mm_sub_epi64(__vbasicops_vA, __vbasicops_vB); } | ^~~~~~~~~~~~~~ | | | vUInt32 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1124:24: note: expected '__m128i' but argument is of type 'vUInt32' 1124 | _mm_sub_epi64 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:667:68: error: incompatible type for argument 2 of '_mm_sub_epi64' 667 | vUInt32 __vbasicops_vB) { return _mm_sub_epi64(__vbasicops_vA, __vbasicops_vB); } | ^~~~~~~~~~~~~~ | | | vUInt32 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1124:37: note: expected '__m128i' but argument is of type 'vUInt32' 1124 | _mm_sub_epi64 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vS64Sub': /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:742:52: error: incompatible type for argument 1 of '_mm_sub_epi64' 742 | vSInt32 __vbasicops_vB) { return _mm_sub_epi64(__vbasicops_vA, __vbasicops_vB); } | ^~~~~~~~~~~~~~ | | | vSInt32 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1124:24: note: expected '__m128i' but argument is of type 'vSInt32' 1124 | _mm_sub_epi64 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:742:68: error: incompatible type for argument 2 of '_mm_sub_epi64' 742 | vSInt32 __vbasicops_vB) { return _mm_sub_epi64(__vbasicops_vA, __vbasicops_vB); } | ^~~~~~~~~~~~~~ | | | vSInt32 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1124:37: note: expected '__m128i' but argument is of type 'vSInt32' 1124 | _mm_sub_epi64 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vU64Add': /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:814:52: error: incompatible type for argument 1 of '_mm_add_epi64' 814 | vUInt32 __vbasicops_vB) { return _mm_add_epi64(__vbasicops_vA, __vbasicops_vB); } | ^~~~~~~~~~~~~~ | | | vUInt32 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1076:24: note: expected '__m128i' but argument is of type 'vUInt32' 1076 | _mm_add_epi64 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:814:68: error: incompatible type for argument 2 of '_mm_add_epi64' 814 | vUInt32 __vbasicops_vB) { return _mm_add_epi64(__vbasicops_vA, __vbasicops_vB); } | ^~~~~~~~~~~~~~ | | | vUInt32 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1076:37: note: expected '__m128i' but argument is of type 'vUInt32' 1076 | _mm_add_epi64 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vS64Add': /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:884:52: error: incompatible type for argument 1 of '_mm_add_epi64' 884 | vSInt32 __vbasicops_vB) { return _mm_add_epi64(__vbasicops_vA, __vbasicops_vB); } | ^~~~~~~~~~~~~~ | | | vSInt32 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1076:24: note: expected '__m128i' but argument is of type 'vSInt32' 1076 | _mm_add_epi64 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:884:68: error: incompatible type for argument 2 of '_mm_add_epi64' 884 | vSInt32 __vbasicops_vB) { return _mm_add_epi64(__vbasicops_vA, __vbasicops_vB); } | ^~~~~~~~~~~~~~ | | | vSInt32 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1076:37: note: expected '__m128i' but argument is of type 'vSInt32' 1076 | _mm_add_epi64 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vLL64Shift': /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:989:40: error: incompatible type for argument 1 of '_mm_and_si128' 989 | _mm_and_si128(__vbasicops_vShiftFactor, _mm_cvtsi32_si128( 0x3F ))); | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | vUInt8 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1315:24: note: expected '__m128i' but argument is of type 'vUInt8' 1315 | _mm_and_si128 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:988:26: error: incompatible type for argument 1 of '_mm_sll_epi64' 988 | return _mm_sll_epi64(__vbasicops_vA, | ^~~~~~~~~~~~~~ | | | vUInt32 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1279:24: note: expected '__m128i' but argument is of type 'vUInt32' 1279 | _mm_sll_epi64 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function 'vLR64Shift': /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:1027:40: error: incompatible type for argument 1 of '_mm_and_si128' 1027 | _mm_and_si128(__vbasicops_vShiftFactor, _mm_cvtsi32_si128( 0x3F ))); | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | vUInt8 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1315:24: note: expected '__m128i' but argument is of type 'vUInt8' 1315 | _mm_and_si128 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:1026:26: error: incompatible type for argument 1 of '_mm_srl_epi64' 1026 | return _mm_srl_epi64(__vbasicops_vA, | ^~~~~~~~~~~~~~ | | | vUInt32 /usr/local/Cellar/gcc/14.2.0_1/lib/gcc/current/gcc/x86_64-apple-darwin23/14/include/emmintrin.h:1309:24: note: expected '__m128i' but argument is of type 'vUInt32' 1309 | _mm_srl_epi64 (__m128i __A, __m128i __B) | ~~~~~~~~^~~ At top level: cc1: note: unrecognized command-line option '-Wno-incompatible-pointer-types-discards-qualifiers' may have been intended to silence earlier diagnostics make[1]: *** [.../src/github.com/ollama/ollama/llama/build/darwin-amd64/runners/cpu_avx2/ollama_llama_server] Error 1 make[1]: *** Waiting for unfinished jobs.... # github.com/ollama/ollama/llama ggml.c: In function 'ggml_vec_mad_f16': ggml.c:2378:45: warning: passing argument 1 of '__sse_f16x4_load' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 2378 | ax[j] = GGML_F16_VEC_LOAD(x + i + j*GGML_F16_EPR, j); | ^ ggml.c:1738:50: note: in definition of macro 'GGML_F32Cx4_LOAD' 1738 | #define GGML_F32Cx4_LOAD(x) __sse_f16x4_load(x) | ^ ggml.c:2378:21: note: in expansion of macro 'GGML_F16_VEC_LOAD' 2378 | ax[j] = GGML_F16_VEC_LOAD(x + i + j*GGML_F16_EPR, j); | ^~~~~~~~~~~~~~~~~ ggml.c:1713:52: note: expected 'ggml_fp16_t *' {aka 'short unsigned int *'} but argument is of type 'const ggml_fp16_t *' {aka 'const short unsigned int *'} 1713 | static inline __m128 __sse_f16x4_load(ggml_fp16_t *x) { | ~~~~~~~~~~~~~^ At top level: cc1: note: unrecognized command-line option '-Wno-incompatible-pointer-types-discards-qualifiers' may have been intended to silence earlier diagnostics # github.com/ollama/ollama/llama ggml.c: In function 'ggml_vec_mad_f16': ggml.c:2378:45: warning: passing argument 1 of '__avx_f32cx8_load' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 2378 | ax[j] = GGML_F16_VEC_LOAD(x + i + j*GGML_F16_EPR, j); | ^ ggml.c:1458:51: note: in definition of macro 'GGML_F32Cx8_LOAD' 1458 | #define GGML_F32Cx8_LOAD(x) __avx_f32cx8_load(x) | ^ ggml.c:2378:21: note: in expansion of macro 'GGML_F16_VEC_LOAD' 2378 | ax[j] = GGML_F16_VEC_LOAD(x + i + j*GGML_F16_EPR, j); | ^~~~~~~~~~~~~~~~~ ggml.c:1441:53: note: expected 'ggml_fp16_t *' {aka 'short unsigned int *'} but argument is of type 'const ggml_fp16_t *' {aka 'const short unsigned int *'} 1441 | static inline __m256 __avx_f32cx8_load(ggml_fp16_t *x) { | ~~~~~~~~~~~~~^ At top level: cc1: note: unrecognized command-line option '-Wno-incompatible-pointer-types-discards-qualifiers' may have been intended to silence earlier diagnostics make: *** [default] Error 2 ```
Author
Owner

@dhiltgen commented on GitHub (Nov 5, 2024):

I haven't been able to repro this yet. Can you clarify what version of the OS and XCode (if any) you have installed?

<!-- gh-comment-id:2456005413 --> @dhiltgen commented on GitHub (Nov 5, 2024): I haven't been able to repro this yet. Can you clarify what version of the OS and XCode (if any) you have installed?
Author
Owner

@efd6 commented on GitHub (Nov 5, 2024):

Sonoma 14.7.1 amd64/Xcode 16.1

<!-- gh-comment-id:2456012834 --> @efd6 commented on GitHub (Nov 5, 2024): Sonoma 14.7.1 amd64/Xcode 16.1
Author
Owner

@vseledkin commented on GitHub (Dec 7, 2024):

export SDKROOT=$(xcrun --show-sdk-path)

try again

<!-- gh-comment-id:2525312147 --> @vseledkin commented on GitHub (Dec 7, 2024): export SDKROOT=$(xcrun --show-sdk-path) try again
Author
Owner

@efd6 commented on GitHub (Dec 8, 2024):

Still fails, as in the original comments.

For me, it's not worth fighting this OS. I have a Linux machine that works.

<!-- gh-comment-id:2526387043 --> @efd6 commented on GitHub (Dec 8, 2024): Still fails, as in the original comments. For me, it's not worth fighting this OS. I have a Linux machine that works.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#66755