Can't install llama-cpp-python -libpython3.11.a file not found during building wheel (pyproject.toml)

Prerequisites
Please answer the following questions for yourself before submitting an issue.

[x] I am running the latest code. Development is very rapid so there are no tagged versions as of now.
[x] I carefully followed the README.md.
[x] I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
[x] I reviewed the Discussions, and have a new bug or useful enhancement to share.

Expected Behavior
Trying to install llama-cpp-python as stated by this document: https://github.com/KillianLucas/open-interpreter/blob/main/docs/MACOS.md.
Current Behavior
Getting the following error while running CMAKE_ARGS="-DLLAMA_METAL=on" FORCE_CMAKE=1 pip install -U llama-cpp-python --no-cache-dir:
 Building wheel for llama-cpp-python (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for llama-cpp-python (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [44 lines of output]
      *** scikit-build-core 0.5.0 using CMake 3.27.4 (wheel)
      *** Configuring CMake...
      2023-09-14 11:43:30,426 - scikit_build_core - WARNING - libdir/ldlibrary: /Users/arjen/miniforge3/envs/oi/lib/libpython3.11.a is not a real file!
      2023-09-14 11:43:30,426 - scikit_build_core - WARNING - Can't find a Python library, got libdir=/Users/arjen/miniforge3/envs/oi/lib, ldlibrary=libpython3.11.a, multiarch=darwin, masd=None

Environment and Context
python3.11.4 in a conda environment from miniforge3 for arm64 support, as stated in the readme file:
"Note: If you are using Apple Silicon (M1) Mac, make sure you have installed a version of Python that supports arm64 architecture. For example:

wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh
bash Miniforge3-MacOSX-arm64.sh"

Tried to find online for solutions, installed packages like gcc, xcode c++, etc. but nothing resolved the issue.
The error states it requires libpython3.11.a in that location, but such a file does not exist there. However, the libpython3.11 does.
If I search online for that file, I can only find .deb packages for linux containing that file. But I can't unpack such packages, even with the ar command I can't get that file to release from the package.

Physical (or virtual) hardware you are using:
Macbook m1 max 10core cpu - 24core gpu - 32gb ram - 2tb disk

Operating System:
MacOS Ventura 13.0:

Darwin Laptop-van-Arjen.local 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct  9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 arm64
$ python3 --version = 3.11.4
$ make --version = GNU Make 3.81
This program built for i386-apple-darwin11.3.0
$ g++ --version = Apple clang version 14.0.0 (clang-14<IP_ADDRESS>)
Target: arm64-apple-darwin22.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Error output during install:
Building wheels for collected packages: llama-cpp-python
  Building wheel for llama-cpp-python (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for llama-cpp-python (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [44 lines of output]
      *** scikit-build-core 0.5.0 using CMake 3.27.4 (wheel)
      *** Configuring CMake...
      2023-09-14 11:43:30,426 - scikit_build_core - WARNING - libdir/ldlibrary: /Users/arjen/miniforge3/envs/oi/lib/libpython3.11.a is not a real file!
      2023-09-14 11:43:30,426 - scikit_build_core - WARNING - Can't find a Python library, got libdir=/Users/arjen/miniforge3/envs/oi/lib, ldlibrary=libpython3.11.a, multiarch=darwin, masd=None
      loading initial cache file /var/folders/r4/9mrbh04j1_gc4h5z0m3f52d80000gn/T/tmpnhw2qb6p/build/CMakeInit.txt
      -- The C compiler identification is AppleClang <IP_ADDRESS>00029
      -- The CXX compiler identification is AppleClang <IP_ADDRESS>00029
      -- 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.37.1 (Apple Git-137.1)")
      fatal: not a git repository (or any of the parent directories): .git
      fatal: not a git repository (or any of the parent directories): .git
      CMake Warning at vendor/llama.cpp/CMakeLists.txt:125 (message):
        Git repository not found; to enable automatic generation of build info,
        make sure Git is installed and the project is a Git repository.

      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
      -- Check if compiler accepts -pthread
      -- Check if compiler accepts -pthread - no
      -- Looking for pthread_create in pthreads
      -- Looking for pthread_create in pthreads - not found
      -- Looking for pthread_create in pthread
      -- Looking for pthread_create in pthread - not found
      CMake Error at /opt/homebrew/Cellar/cmake/3.27.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
        Could NOT find Threads (missing: Threads_FOUND)
      Call Stack (most recent call first):
        /opt/homebrew/Cellar/cmake/3.27.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
        /opt/homebrew/Cellar/cmake/3.27.4/share/cmake/Modules/FindThreads.cmake:226 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
        vendor/llama.cpp/CMakeLists.txt:137 (find_package)

      -- Configuring incomplete, errors occurred!

      *** CMake configuration failed
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for llama-cpp-python
Failed to build llama-cpp-python
ERROR: Could not build wheels for llama-cpp-python, which is required to install pyproject.toml-based projects

I noticed that the make command was still the old version. Finally managed to update the make to version 4.4.1.
Then tried installing llama-cpp-python again using :CMAKE_ARGS="-DLLAMA_METAL=on" FORCE_CMAKE=1 pip install -U llama-cpp-python --no-cache-dir
but no luck. headache

I'm having the same issue on macOS with versions 0.2+ the installation fails

Me too on MacOs. Following thread

I noticed the following:
When I input "python --version" it outputs "Python 3.11.4"
When I input "python3 --version" it outputs "Python 3.10.10"
Perhaps useful information for whomever this may concern

Hey @primemp looking at tthe logs the issue libpython.11.a file thing is just a warning, the actual error that is causing the build to fail is from cmake here:
      -- Looking for pthread_create in pthread - not found
      CMake Error at /opt/homebrew/Cellar/cmake/3.27.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
        Could NOT find Threads (missing: Threads_FOUND)
      Call Stack (most recent call first):
        /opt/homebrew/Cellar/cmake/3.27.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
        /opt/homebrew/Cellar/cmake/3.27.4/share/cmake/Modules/FindThreads.cmake:226 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
        vendor/llama.cpp/CMakeLists.txt:137 (find_package)

Can you try installing llama.cpp with cmake and posting that log? Should help me narrow down the issue.

@abetlen
mine is a bit more extensive. Sorry if its a rookie mistake :( :
Building wheels for collected packages: llama-cpp-python
Building wheel for llama-cpp-python (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for llama-cpp-python (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [109 lines of output]
*** scikit-build-core 0.5.0 using CMake 3.27.4 (wheel)
*** Configuring CMake...
2023-09-14 14:42:22,443 - scikit_build_core - WARNING - libdir/ldlibrary: /Library/Frameworks/Python.framework/Versions/3.11/lib/Python.framework/Versions/3.11/Python is not a real file!
loading initial cache file /var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/tmp1hvh10jk/build/CMakeInit.txt
-- The C compiler identification is AppleClang <IP_ADDRESS>30032
-- The CXX compiler identification is AppleClang <IP_ADDRESS>30032
-- 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/local/bin/git (found version "2.42.0")
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
CMake Warning at vendor/llama.cpp/CMakeLists.txt:125 (message):
Git repository not found; to enable automatic generation of build info,
make sure Git is installed and the project is a Git repository.
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
  -- Found Threads: TRUE
  -- Accelerate framework found
  -- Metal framework found
  -- CMAKE_SYSTEM_PROCESSOR: x86_64
  -- x86 detected
  CMake Warning (dev) at vendor/llama.cpp/CMakeLists.txt:676 (install):
    Target llama has RESOURCE files but no RESOURCE DESTINATION.
  This warning is for project developers.  Use -Wno-dev to suppress it.

  -- Configuring done (2.7s)
  -- Generating done (0.0s)
  CMake Warning:
    Manually-specified variables were not used by the project:

      LLAMA_OPENBLAS

  -- Build files have been written to: /var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/tmp1hvh10jk/build
  *** Building project with Ninja...
  Change Dir: '/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/tmp1hvh10jk/build'

  Run Build Command(s): /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-build-env-oxxl37ct/normal/lib/python3.11/site-packages/ninja/data/bin/ninja -v
  [1/11] /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-alloc.c.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-alloc.c.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-alloc.c.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/ggml-alloc.c
  [2/11] /Library/Developer/CommandLineTools/usr/bin/c++ -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/common/. -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/. -march=native -mtune=native -O3 -DNDEBUG -std=gnu++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -MD -MT vendor/llama.cpp/common/CMakeFiles/common.dir/console.cpp.o -MF vendor/llama.cpp/common/CMakeFiles/common.dir/console.cpp.o.d -o vendor/llama.cpp/common/CMakeFiles/common.dir/console.cpp.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/common/console.cpp
  [3/11] /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/ggml-metal.m
  FAILED: vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o
  /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/ggml-metal.m
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/ggml-metal.m:613:5: error: use of undeclared identifier 'MTLComputePassDescriptor'
      MTLComputePassDescriptor * edesc = MTLComputePassDescriptor.computePassDescriptor;
      ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/ggml-metal.m:613:32: error: use of undeclared identifier 'edesc'
      MTLComputePassDescriptor * edesc = MTLComputePassDescriptor.computePassDescriptor;
                                 ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/ggml-metal.m:613:40: error: use of undeclared identifier 'MTLComputePassDescriptor'
      MTLComputePassDescriptor * edesc = MTLComputePassDescriptor.computePassDescriptor;
                                         ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/ggml-metal.m:618:5: error: use of undeclared identifier 'edesc'
      edesc.dispatchType = has_concur ? MTLDispatchTypeConcurrent : MTLDispatchTypeSerial;
      ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/ggml-metal.m:631:61: warning: instance method '-computeCommandEncoderWithDescriptor:' not found (return type defaults to 'id') [-Wobjc-method-access]
          ctx->command_encoders[i] = [ctx->command_buffers[i] computeCommandEncoderWithDescriptor: edesc];
                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/ggml-metal.m:631:98: error: use of undeclared identifier 'edesc'
          ctx->command_encoders[i] = [ctx->command_buffers[i] computeCommandEncoderWithDescriptor: edesc];
                                                                                ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/ggml-metal.m:873:61: error: use of undeclared identifier 'MTLGPUFamilyApple7'
                                  [ctx->device supportsFamily:MTLGPUFamilyApple7] &&
                                                              ^
  1 warning and 6 errors generated.
  [4/11] /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/k_quants.c.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/k_quants.c.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/k_quants.c.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/k_quants.c
  [5/11] /Library/Developer/CommandLineTools/usr/bin/c++ -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/common/. -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/. -march=native -mtune=native -O3 -DNDEBUG -std=gnu++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -MD -MT vendor/llama.cpp/common/CMakeFiles/common.dir/grammar-parser.cpp.o -MF vendor/llama.cpp/common/CMakeFiles/common.dir/grammar-parser.cpp.o.d -o vendor/llama.cpp/common/CMakeFiles/common.dir/grammar-parser.cpp.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/common/grammar-parser.cpp
  [6/11] /Library/Developer/CommandLineTools/usr/bin/c++ -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/common/. -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/. -march=native -mtune=native -O3 -DNDEBUG -std=gnu++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -MD -MT vendor/llama.cpp/common/CMakeFiles/common.dir/common.cpp.o -MF vendor/llama.cpp/common/CMakeFiles/common.dir/common.cpp.o.d -o vendor/llama.cpp/common/CMakeFiles/common.dir/common.cpp.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/common/common.cpp
  [7/11] /Library/Developer/CommandLineTools/usr/bin/c++ -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -DLLAMA_BUILD -DLLAMA_SHARED -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -Dllama_EXPORTS -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -MD -MT vendor/llama.cpp/CMakeFiles/llama.dir/llama.cpp.o -MF vendor/llama.cpp/CMakeFiles/llama.dir/llama.cpp.o.d -o vendor/llama.cpp/CMakeFiles/llama.dir/llama.cpp.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/llama.cpp
  [8/11] /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/ggml.c.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/ggml.c.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/ggml.c.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/ggml.c
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/ggml.c:2391:5: warning: implicit conversion increases floating-point precision: 'float' to 'ggml_float' (aka 'double') [-Wdouble-promotion]
      GGML_F16_VEC_REDUCE(sumf, sum);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/ggml.c:2023:37: note: expanded from macro 'GGML_F16_VEC_REDUCE'
  #define GGML_F16_VEC_REDUCE         GGML_F32Cx8_REDUCE
                                      ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/ggml.c:2013:33: note: expanded from macro 'GGML_F32Cx8_REDUCE'
  #define GGML_F32Cx8_REDUCE      GGML_F32x8_REDUCE
                                  ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/ggml.c:1959:11: note: expanded from macro 'GGML_F32x8_REDUCE'
      res = _mm_cvtss_f32(_mm_hadd_ps(t1, t1));                     \
          ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/ggml.c:3657:9: warning: implicit conversion increases floating-point precision: 'float' to 'ggml_float' (aka 'double') [-Wdouble-promotion]
          GGML_F16_VEC_REDUCE(sumf[k], sum[k]);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/ggml.c:2023:37: note: expanded from macro 'GGML_F16_VEC_REDUCE'
  #define GGML_F16_VEC_REDUCE         GGML_F32Cx8_REDUCE
                                      ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/ggml.c:2013:33: note: expanded from macro 'GGML_F32Cx8_REDUCE'
  #define GGML_F32Cx8_REDUCE      GGML_F32x8_REDUCE
                                  ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-n8jcpet6/llama-cpp-python_897b918c773e4c8085255b5bd8e1dbd2/vendor/llama.cpp/ggml.c:1959:11: note: expanded from macro 'GGML_F32x8_REDUCE'
      res = _mm_cvtss_f32(_mm_hadd_ps(t1, t1));                     \
          ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2 warnings generated.
  ninja: build stopped: subcommand failed.

  *** CMake build failed
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for llama-cpp-python
Failed to build llama-cpp-python
ERROR: Could not build wheels for llama-cpp-python, which is required to install pyproject.toml-based projects

@abetlen thank you for your reply. Can you give me the code which I have to input? I'm a complete noob when it comes to coding and terminal language. Cheers!

@abetlen doesn't seem to be resolving anything. I have made sure the prerequisites and dev environment have been installed prior:
Building wheels for collected packages: llama-cpp-python
Building wheel for llama-cpp-python (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for llama-cpp-python (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [103 lines of output]
*** scikit-build-core 0.5.0 using CMake 3.27.4 (wheel)
*** Configuring CMake...
2023-09-14 16:55:15,692 - scikit_build_core - WARNING - libdir/ldlibrary: /Library/Frameworks/Python.framework/Versions/3.11/lib/Python.framework/Versions/3.11/Python is not a real file!
loading initial cache file /var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/tmpmufl96cm/build/CMakeInit.txt
-- The C compiler identification is AppleClang <IP_ADDRESS>30032
-- The CXX compiler identification is AppleClang <IP_ADDRESS>30032
-- 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/local/bin/git (found version "2.42.0")
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
CMake Warning at vendor/llama.cpp/CMakeLists.txt:125 (message):
Git repository not found; to enable automatic generation of build info,
make sure Git is installed and the project is a Git repository.
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
  -- Found Threads: TRUE
  -- Accelerate framework found
  -- Metal framework found
  -- CMAKE_SYSTEM_PROCESSOR: x86_64
  -- x86 detected
  CMake Warning (dev) at vendor/llama.cpp/CMakeLists.txt:676 (install):
    Target llama has RESOURCE files but no RESOURCE DESTINATION.
  This warning is for project developers.  Use -Wno-dev to suppress it.

  -- Configuring done (0.9s)
  -- Generating done (0.0s)
  -- Build files have been written to: /var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/tmpmufl96cm/build
  *** Building project with Ninja...
  Change Dir: '/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/tmpmufl96cm/build'

  Run Build Command(s): /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-build-env-ef4utdw_/normal/lib/python3.11/site-packages/ninja/data/bin/ninja -v
  [1/11] /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-alloc.c.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-alloc.c.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-alloc.c.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/ggml-alloc.c
  [2/11] /Library/Developer/CommandLineTools/usr/bin/c++ -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/common/. -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/. -march=native -mtune=native -O3 -DNDEBUG -std=gnu++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -MD -MT vendor/llama.cpp/common/CMakeFiles/common.dir/console.cpp.o -MF vendor/llama.cpp/common/CMakeFiles/common.dir/console.cpp.o.d -o vendor/llama.cpp/common/CMakeFiles/common.dir/console.cpp.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/common/console.cpp
  [3/11] /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/ggml-metal.m
  FAILED: vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o
  /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/ggml-metal.m
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/ggml-metal.m:613:5: error: use of undeclared identifier 'MTLComputePassDescriptor'
      MTLComputePassDescriptor * edesc = MTLComputePassDescriptor.computePassDescriptor;
      ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/ggml-metal.m:613:32: error: use of undeclared identifier 'edesc'
      MTLComputePassDescriptor * edesc = MTLComputePassDescriptor.computePassDescriptor;
                                 ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/ggml-metal.m:613:40: error: use of undeclared identifier 'MTLComputePassDescriptor'
      MTLComputePassDescriptor * edesc = MTLComputePassDescriptor.computePassDescriptor;
                                         ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/ggml-metal.m:618:5: error: use of undeclared identifier 'edesc'
      edesc.dispatchType = has_concur ? MTLDispatchTypeConcurrent : MTLDispatchTypeSerial;
      ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/ggml-metal.m:631:61: warning: instance method '-computeCommandEncoderWithDescriptor:' not found (return type defaults to 'id') [-Wobjc-method-access]
          ctx->command_encoders[i] = [ctx->command_buffers[i] computeCommandEncoderWithDescriptor: edesc];
                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/ggml-metal.m:631:98: error: use of undeclared identifier 'edesc'
          ctx->command_encoders[i] = [ctx->command_buffers[i] computeCommandEncoderWithDescriptor: edesc];
                                                                                ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/ggml-metal.m:873:61: error: use of undeclared identifier 'MTLGPUFamilyApple7'
                                  [ctx->device supportsFamily:MTLGPUFamilyApple7] &&
                                                              ^
  1 warning and 6 errors generated.
  [4/11] /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/k_quants.c.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/k_quants.c.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/k_quants.c.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/k_quants.c
  [5/11] /Library/Developer/CommandLineTools/usr/bin/c++ -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/common/. -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/. -march=native -mtune=native -O3 -DNDEBUG -std=gnu++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -MD -MT vendor/llama.cpp/common/CMakeFiles/common.dir/grammar-parser.cpp.o -MF vendor/llama.cpp/common/CMakeFiles/common.dir/grammar-parser.cpp.o.d -o vendor/llama.cpp/common/CMakeFiles/common.dir/grammar-parser.cpp.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/common/grammar-parser.cpp
  [6/11] /Library/Developer/CommandLineTools/usr/bin/c++ -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/common/. -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/. -march=native -mtune=native -O3 -DNDEBUG -std=gnu++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -MD -MT vendor/llama.cpp/common/CMakeFiles/common.dir/common.cpp.o -MF vendor/llama.cpp/common/CMakeFiles/common.dir/common.cpp.o.d -o vendor/llama.cpp/common/CMakeFiles/common.dir/common.cpp.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/common/common.cpp
  [7/11] /Library/Developer/CommandLineTools/usr/bin/c++ -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -DLLAMA_BUILD -DLLAMA_SHARED -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -Dllama_EXPORTS -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -MD -MT vendor/llama.cpp/CMakeFiles/llama.dir/llama.cpp.o -MF vendor/llama.cpp/CMakeFiles/llama.dir/llama.cpp.o.d -o vendor/llama.cpp/CMakeFiles/llama.dir/llama.cpp.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/llama.cpp
  [8/11] /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/ggml.c.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/ggml.c.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/ggml.c.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/ggml.c
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/ggml.c:2391:5: warning: implicit conversion increases floating-point precision: 'float' to 'ggml_float' (aka 'double') [-Wdouble-promotion]
      GGML_F16_VEC_REDUCE(sumf, sum);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/ggml.c:2023:37: note: expanded from macro 'GGML_F16_VEC_REDUCE'
  #define GGML_F16_VEC_REDUCE         GGML_F32Cx8_REDUCE
                                      ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/ggml.c:2013:33: note: expanded from macro 'GGML_F32Cx8_REDUCE'
  #define GGML_F32Cx8_REDUCE      GGML_F32x8_REDUCE
                                  ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/ggml.c:1959:11: note: expanded from macro 'GGML_F32x8_REDUCE'
      res = _mm_cvtss_f32(_mm_hadd_ps(t1, t1));                     \
          ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/ggml.c:3657:9: warning: implicit conversion increases floating-point precision: 'float' to 'ggml_float' (aka 'double') [-Wdouble-promotion]
          GGML_F16_VEC_REDUCE(sumf[k], sum[k]);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/ggml.c:2023:37: note: expanded from macro 'GGML_F16_VEC_REDUCE'
  #define GGML_F16_VEC_REDUCE         GGML_F32Cx8_REDUCE
                                      ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/ggml.c:2013:33: note: expanded from macro 'GGML_F32Cx8_REDUCE'
  #define GGML_F32Cx8_REDUCE      GGML_F32x8_REDUCE
                                  ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-kq3owvns/llama-cpp-python_57ab56ef14ea4f498c2393998c7fb0c6/vendor/llama.cpp/ggml.c:1959:11: note: expanded from macro 'GGML_F32x8_REDUCE'
      res = _mm_cvtss_f32(_mm_hadd_ps(t1, t1));                     \
          ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2 warnings generated.
  ninja: build stopped: subcommand failed.

  *** CMake build failed
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for llama-cpp-python
Failed to build llama-cpp-python
ERROR: Could not build wheels for llama-cpp-python, which is required to install pyproject.toml-based projects
[notice] A new release of pip is available: 23.0.1 -> 23.2.1
[notice] To update, run: pip install --upgrade pip
(v2) tevykuch@sorbet-bae text-generation-webui % xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
(v2) tevykuch@sorbet-bae text-generation-webui % brew install cmake
==> Downloading https://formulae.brew.sh/api/formula.jws.json
############################################################################################################################################################################################## 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
############################################################################################################################################################################################## 100.0%
Warning: Treating cmake as a formula. For the cask, use homebrew/cask/cmake
Warning: cmake 3.27.4 is already installed and up-to-date.
To reinstall 3.27.4, run:
brew reinstall cmake
(v2) tevykuch@sorbet-bae text-generation-webui % CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python
Collecting llama-cpp-python
Using cached llama_cpp_python-0.2.4.tar.gz (1.5 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: typing-extensions>=4.5.0 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from llama-cpp-python) (4.5.0)
Requirement already satisfied: numpy>=1.20.0 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from llama-cpp-python) (1.25.2)
Collecting diskcache>=5.6.1
Using cached diskcache-5.6.3-py3-none-any.whl (45 kB)
Building wheels for collected packages: llama-cpp-python
Building wheel for llama-cpp-python (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for llama-cpp-python (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [103 lines of output]
*** scikit-build-core 0.5.0 using CMake 3.27.4 (wheel)
*** Configuring CMake...
2023-09-14 16:56:07,388 - scikit_build_core - WARNING - libdir/ldlibrary: /Library/Frameworks/Python.framework/Versions/3.11/lib/Python.framework/Versions/3.11/Python is not a real file!
loading initial cache file /var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/tmpspa24b39/build/CMakeInit.txt
-- The C compiler identification is AppleClang <IP_ADDRESS>30032
-- The CXX compiler identification is AppleClang <IP_ADDRESS>30032
-- 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/local/bin/git (found version "2.42.0")
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
CMake Warning at vendor/llama.cpp/CMakeLists.txt:125 (message):
Git repository not found; to enable automatic generation of build info,
make sure Git is installed and the project is a Git repository.
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
  -- Found Threads: TRUE
  -- Accelerate framework found
  -- Metal framework found
  -- CMAKE_SYSTEM_PROCESSOR: x86_64
  -- x86 detected
  CMake Warning (dev) at vendor/llama.cpp/CMakeLists.txt:676 (install):
    Target llama has RESOURCE files but no RESOURCE DESTINATION.
  This warning is for project developers.  Use -Wno-dev to suppress it.

  -- Configuring done (0.8s)
  -- Generating done (0.0s)
  -- Build files have been written to: /var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/tmpspa24b39/build
  *** Building project with Ninja...
  Change Dir: '/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/tmpspa24b39/build'

  Run Build Command(s): /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-build-env-74q_89qy/normal/lib/python3.11/site-packages/ninja/data/bin/ninja -v
  [1/11] /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-alloc.c.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-alloc.c.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-alloc.c.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-alloc.c
  [2/11] /Library/Developer/CommandLineTools/usr/bin/c++ -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/common/. -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/. -march=native -mtune=native -O3 -DNDEBUG -std=gnu++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -MD -MT vendor/llama.cpp/common/CMakeFiles/common.dir/console.cpp.o -MF vendor/llama.cpp/common/CMakeFiles/common.dir/console.cpp.o.d -o vendor/llama.cpp/common/CMakeFiles/common.dir/console.cpp.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/common/console.cpp
  [3/11] /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-metal.m
  FAILED: vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o
  /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-metal.m
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-metal.m:613:5: error: use of undeclared identifier 'MTLComputePassDescriptor'
      MTLComputePassDescriptor * edesc = MTLComputePassDescriptor.computePassDescriptor;
      ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-metal.m:613:32: error: use of undeclared identifier 'edesc'
      MTLComputePassDescriptor * edesc = MTLComputePassDescriptor.computePassDescriptor;
                                 ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-metal.m:613:40: error: use of undeclared identifier 'MTLComputePassDescriptor'
      MTLComputePassDescriptor * edesc = MTLComputePassDescriptor.computePassDescriptor;
                                         ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-metal.m:618:5: error: use of undeclared identifier 'edesc'
      edesc.dispatchType = has_concur ? MTLDispatchTypeConcurrent : MTLDispatchTypeSerial;
      ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-metal.m:631:61: warning: instance method '-computeCommandEncoderWithDescriptor:' not found (return type defaults to 'id') [-Wobjc-method-access]
          ctx->command_encoders[i] = [ctx->command_buffers[i] computeCommandEncoderWithDescriptor: edesc];
                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-metal.m:631:98: error: use of undeclared identifier 'edesc'
          ctx->command_encoders[i] = [ctx->command_buffers[i] computeCommandEncoderWithDescriptor: edesc];
                                                                                ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-metal.m:873:61: error: use of undeclared identifier 'MTLGPUFamilyApple7'
                                  [ctx->device supportsFamily:MTLGPUFamilyApple7] &&
                                                              ^
  1 warning and 6 errors generated.
  [4/11] /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/k_quants.c.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/k_quants.c.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/k_quants.c.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/k_quants.c
  [5/11] /Library/Developer/CommandLineTools/usr/bin/c++ -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/common/. -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/. -march=native -mtune=native -O3 -DNDEBUG -std=gnu++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -MD -MT vendor/llama.cpp/common/CMakeFiles/common.dir/grammar-parser.cpp.o -MF vendor/llama.cpp/common/CMakeFiles/common.dir/grammar-parser.cpp.o.d -o vendor/llama.cpp/common/CMakeFiles/common.dir/grammar-parser.cpp.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/common/grammar-parser.cpp
  [6/11] /Library/Developer/CommandLineTools/usr/bin/c++ -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/common/. -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/. -march=native -mtune=native -O3 -DNDEBUG -std=gnu++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -MD -MT vendor/llama.cpp/common/CMakeFiles/common.dir/common.cpp.o -MF vendor/llama.cpp/common/CMakeFiles/common.dir/common.cpp.o.d -o vendor/llama.cpp/common/CMakeFiles/common.dir/common.cpp.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/common/common.cpp
  [7/11] /Library/Developer/CommandLineTools/usr/bin/c++ -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -DLLAMA_BUILD -DLLAMA_SHARED -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -Dllama_EXPORTS -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -MD -MT vendor/llama.cpp/CMakeFiles/llama.dir/llama.cpp.o -MF vendor/llama.cpp/CMakeFiles/llama.dir/llama.cpp.o.d -o vendor/llama.cpp/CMakeFiles/llama.dir/llama.cpp.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/llama.cpp
  [8/11] /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/ggml.c.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/ggml.c.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/ggml.c.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml.c
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml.c:2391:5: warning: implicit conversion increases floating-point precision: 'float' to 'ggml_float' (aka 'double') [-Wdouble-promotion]
      GGML_F16_VEC_REDUCE(sumf, sum);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml.c:2023:37: note: expanded from macro 'GGML_F16_VEC_REDUCE'
  #define GGML_F16_VEC_REDUCE         GGML_F32Cx8_REDUCE
                                      ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml.c:2013:33: note: expanded from macro 'GGML_F32Cx8_REDUCE'
  #define GGML_F32Cx8_REDUCE      GGML_F32x8_REDUCE
                                  ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml.c:1959:11: note: expanded from macro 'GGML_F32x8_REDUCE'
      res = _mm_cvtss_f32(_mm_hadd_ps(t1, t1));                     \
          ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml.c:3657:9: warning: implicit conversion increases floating-point precision: 'float' to 'ggml_float' (aka 'double') [-Wdouble-promotion]
          GGML_F16_VEC_REDUCE(sumf[k], sum[k]);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml.c:2023:37: note: expanded from macro 'GGML_F16_VEC_REDUCE'
  #define GGML_F16_VEC_REDUCE         GGML_F32Cx8_REDUCE
                                      ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml.c:2013:33: note: expanded from macro 'GGML_F32Cx8_REDUCE'
  #define GGML_F32Cx8_REDUCE      GGML_F32x8_REDUCE
                                  ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml.c:1959:11: note: expanded from macro 'GGML_F32x8_REDUCE'
      res = _mm_cvtss_f32(_mm_hadd_ps(t1, t1));                     \
          ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2 warnings generated.
  ninja: build stopped: subcommand failed.

  *** CMake build failed
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for llama-cpp-python
Failed to build llama-cpp-python
ERROR: Could not build wheels for llama-cpp-python, which is required to install pyproject.toml-based projects

@abetlen doesn't seem to be resolving anything. I have made sure the prerequisites and dev environment have been installed prior:
× Building wheel for llama-cpp-python (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [103 lines of output]
*** scikit-build-core 0.5.0 using CMake 3.27.4 (wheel)
*** Configuring CMake...
2023-09-14 16:56:07,388 - scikit_build_core - WARNING - libdir/ldlibrary: /Library/Frameworks/Python.framework/Versions/3.11/lib/Python.framework/Versions/3.11/Python is not a real file!
loading initial cache file /var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/tmpspa24b39/build/CMakeInit.txt
-- The C compiler identification is AppleClang <IP_ADDRESS>30032
-- The CXX compiler identification is AppleClang <IP_ADDRESS>30032
-- 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/local/bin/git (found version "2.42.0")
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
CMake Warning at vendor/llama.cpp/CMakeLists.txt:125 (message):
Git repository not found; to enable automatic generation of build info,
make sure Git is installed and the project is a Git repository.
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
  -- Found Threads: TRUE
  -- Accelerate framework found
  -- Metal framework found
  -- CMAKE_SYSTEM_PROCESSOR: x86_64
  -- x86 detected
  CMake Warning (dev) at vendor/llama.cpp/CMakeLists.txt:676 (install):
    Target llama has RESOURCE files but no RESOURCE DESTINATION.
  This warning is for project developers.  Use -Wno-dev to suppress it.

  -- Configuring done (0.8s)
  -- Generating done (0.0s)
  -- Build files have been written to: /var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/tmpspa24b39/build
  *** Building project with Ninja...
  Change Dir: '/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/tmpspa24b39/build'

  Run Build Command(s): /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-build-env-74q_89qy/normal/lib/python3.11/site-packages/ninja/data/bin/ninja -v
  [1/11] /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-alloc.c.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-alloc.c.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-alloc.c.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-alloc.c
  [2/11] /Library/Developer/CommandLineTools/usr/bin/c++ -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/common/. -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/. -march=native -mtune=native -O3 -DNDEBUG -std=gnu++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -MD -MT vendor/llama.cpp/common/CMakeFiles/common.dir/console.cpp.o -MF vendor/llama.cpp/common/CMakeFiles/common.dir/console.cpp.o.d -o vendor/llama.cpp/common/CMakeFiles/common.dir/console.cpp.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/common/console.cpp
  [3/11] /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-metal.m
  FAILED: vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o
  /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-metal.m.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-metal.m
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-metal.m:613:5: error: use of undeclared identifier 'MTLComputePassDescriptor'
      MTLComputePassDescriptor * edesc = MTLComputePassDescriptor.computePassDescriptor;
      ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-metal.m:613:32: error: use of undeclared identifier 'edesc'
      MTLComputePassDescriptor * edesc = MTLComputePassDescriptor.computePassDescriptor;
                                 ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-metal.m:613:40: error: use of undeclared identifier 'MTLComputePassDescriptor'
      MTLComputePassDescriptor * edesc = MTLComputePassDescriptor.computePassDescriptor;
                                         ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-metal.m:618:5: error: use of undeclared identifier 'edesc'
      edesc.dispatchType = has_concur ? MTLDispatchTypeConcurrent : MTLDispatchTypeSerial;
      ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-metal.m:631:61: warning: instance method '-computeCommandEncoderWithDescriptor:' not found (return type defaults to 'id') [-Wobjc-method-access]
          ctx->command_encoders[i] = [ctx->command_buffers[i] computeCommandEncoderWithDescriptor: edesc];
                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-metal.m:631:98: error: use of undeclared identifier 'edesc'
          ctx->command_encoders[i] = [ctx->command_buffers[i] computeCommandEncoderWithDescriptor: edesc];
                                                                                ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml-metal.m:873:61: error: use of undeclared identifier 'MTLGPUFamilyApple7'
                                  [ctx->device supportsFamily:MTLGPUFamilyApple7] &&
                                                              ^
  1 warning and 6 errors generated.
  [4/11] /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/k_quants.c.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/k_quants.c.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/k_quants.c.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/k_quants.c
  [5/11] /Library/Developer/CommandLineTools/usr/bin/c++ -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/common/. -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/. -march=native -mtune=native -O3 -DNDEBUG -std=gnu++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -MD -MT vendor/llama.cpp/common/CMakeFiles/common.dir/grammar-parser.cpp.o -MF vendor/llama.cpp/common/CMakeFiles/common.dir/grammar-parser.cpp.o.d -o vendor/llama.cpp/common/CMakeFiles/common.dir/grammar-parser.cpp.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/common/grammar-parser.cpp
  [6/11] /Library/Developer/CommandLineTools/usr/bin/c++ -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/common/. -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/. -march=native -mtune=native -O3 -DNDEBUG -std=gnu++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -MD -MT vendor/llama.cpp/common/CMakeFiles/common.dir/common.cpp.o -MF vendor/llama.cpp/common/CMakeFiles/common.dir/common.cpp.o.d -o vendor/llama.cpp/common/CMakeFiles/common.dir/common.cpp.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/common/common.cpp
  [7/11] /Library/Developer/CommandLineTools/usr/bin/c++ -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -DLLAMA_BUILD -DLLAMA_SHARED -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -Dllama_EXPORTS -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu++11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -MD -MT vendor/llama.cpp/CMakeFiles/llama.dir/llama.cpp.o -MF vendor/llama.cpp/CMakeFiles/llama.dir/llama.cpp.o.d -o vendor/llama.cpp/CMakeFiles/llama.dir/llama.cpp.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/llama.cpp
  [8/11] /Library/Developer/CommandLineTools/usr/bin/cc -DGGML_USE_ACCELERATE -DGGML_USE_K_QUANTS -DGGML_USE_METAL -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE=600 -I/private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/. -F/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -march=native -mtune=native -O3 -DNDEBUG -std=gnu11 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/ggml.c.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/ggml.c.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/ggml.c.o -c /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml.c
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml.c:2391:5: warning: implicit conversion increases floating-point precision: 'float' to 'ggml_float' (aka 'double') [-Wdouble-promotion]
      GGML_F16_VEC_REDUCE(sumf, sum);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml.c:2023:37: note: expanded from macro 'GGML_F16_VEC_REDUCE'
  #define GGML_F16_VEC_REDUCE         GGML_F32Cx8_REDUCE
                                      ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml.c:2013:33: note: expanded from macro 'GGML_F32Cx8_REDUCE'
  #define GGML_F32Cx8_REDUCE      GGML_F32x8_REDUCE
                                  ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml.c:1959:11: note: expanded from macro 'GGML_F32x8_REDUCE'
      res = _mm_cvtss_f32(_mm_hadd_ps(t1, t1));                     \
          ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml.c:3657:9: warning: implicit conversion increases floating-point precision: 'float' to 'ggml_float' (aka 'double') [-Wdouble-promotion]
          GGML_F16_VEC_REDUCE(sumf[k], sum[k]);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml.c:2023:37: note: expanded from macro 'GGML_F16_VEC_REDUCE'
  #define GGML_F16_VEC_REDUCE         GGML_F32Cx8_REDUCE
                                      ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml.c:2013:33: note: expanded from macro 'GGML_F32Cx8_REDUCE'
  #define GGML_F32Cx8_REDUCE      GGML_F32x8_REDUCE
                                  ^
  /private/var/folders/4l/zwvr5hz51gvbhqkcpm0lhljc0000gn/T/pip-install-m27s3ma3/llama-cpp-python_f6f76d2d0d8746a8af06996220ab80a1/vendor/llama.cpp/ggml.c:1959:11: note: expanded from macro 'GGML_F32x8_REDUCE'
      res = _mm_cvtss_f32(_mm_hadd_ps(t1, t1));                     \
          ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2 warnings generated.
  ninja: build stopped: subcommand failed.

  *** CMake build failed
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for llama-cpp-python
Failed to build llama-cpp-python
ERROR: Could not build wheels for llama-cpp-python, which is required to install pyproject.toml-based projects

@primemp sure, can you run the following and let me know if it builds correctly
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
mkdir build
cd build
cmake ..
cmake --build . --config Release

@icecoldt369 so llama.cpp built correctly without any error: use of undeclared identifier errors?

@abetlen Ok here we go, the complete output just to be sure I don't miss anything:
(oi) arjen@Laptop-van-Arjen build % cmake --build . --config Release
[  1%] Built target BUILD_INFO
[  2%] Building C object CMakeFiles/ggml.dir/ggml.c.o
[  4%] Building C object CMakeFiles/ggml.dir/ggml-alloc.c.o
[  5%] Building C object CMakeFiles/ggml.dir/ggml-metal.m.o
[  7%] Building C object CMakeFiles/ggml.dir/k_quants.c.o
[  7%] Built target ggml
[  8%] Linking C static library libggml_static.a
[  8%] Built target ggml_static
[  9%] Building CXX object CMakeFiles/llama.dir/llama.cpp.o
[ 11%] Linking CXX static library libllama.a
[ 11%] Built target llama
[ 12%] Building CXX object common/CMakeFiles/common.dir/common.cpp.o
[ 14%] Building CXX object common/CMakeFiles/common.dir/console.cpp.o
[ 15%] Building CXX object common/CMakeFiles/common.dir/grammar-parser.cpp.o
[ 15%] Built target common
[ 16%] Building CXX object tests/CMakeFiles/test-quantize-fns.dir/test-quantize-fns.cpp.o
[ 18%] Linking CXX executable ../bin/test-quantize-fns
[ 18%] Built target test-quantize-fns
[ 19%] Building CXX object tests/CMakeFiles/test-quantize-perf.dir/test-quantize-perf.cpp.o
[ 21%] Linking CXX executable ../bin/test-quantize-perf
[ 21%] Built target test-quantize-perf
[ 22%] Building CXX object tests/CMakeFiles/test-sampling.dir/test-sampling.cpp.o
[ 23%] Linking CXX executable ../bin/test-sampling
[ 23%] Built target test-sampling
[ 25%] Building CXX object tests/CMakeFiles/test-tokenizer-0-llama.dir/test-tokenizer-0-llama.cpp.o
[ 26%] Linking CXX executable ../bin/test-tokenizer-0-llama
[ 26%] Built target test-tokenizer-0-llama
[ 28%] Building CXX object tests/CMakeFiles/test-tokenizer-0-falcon.dir/test-tokenizer-0-falcon.cpp.o
[ 29%] Linking CXX executable ../bin/test-tokenizer-0-falcon
[ 29%] Built target test-tokenizer-0-falcon
[ 30%] Building CXX object tests/CMakeFiles/test-tokenizer-1-llama.dir/test-tokenizer-1-llama.cpp.o
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/tests/test-tokenizer-1-llama.cpp:91:43: warning: format specifies type 'unsigned long long' but the argument has type 'std::basic_string<char>::size_type' (aka 'unsigned long') [-Wformat]
                __func__, i, str.c_str(), str.length(), check.c_str(), check.length());
                                          ^~~~~~~~~~~~
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/tests/test-tokenizer-1-llama.cpp:91:72: warning: format specifies type 'unsigned long long' but the argument has type 'std::basic_string<char>::size_type' (aka 'unsigned long') [-Wformat]
                __func__, i, str.c_str(), str.length(), check.c_str(), check.length());
                                                                       ^~~~~~~~~~~~~~
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/tests/test-tokenizer-1-llama.cpp:104:50: warning: format specifies type 'unsigned long long' but the argument has type 'std::basic_string<char>::size_type' (aka 'unsigned long') [-Wformat]
                    __func__, cp, check.c_str(), check.length(), str.c_str(), str.length());
                                                 ^~~~~~~~~~~~~~
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/tests/test-tokenizer-1-llama.cpp:104:79: warning: format specifies type 'unsigned long long' but the argument has type 'std::basic_string<char>::size_type' (aka 'unsigned long') [-Wformat]
                    __func__, cp, check.c_str(), check.length(), str.c_str(), str.length());
                                                                              ^~~~~~~~~~~~
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/tests/test-tokenizer-1-llama.cpp:116:46: warning: format specifies type 'unsigned long long' but the argument has type 'std::basic_string<char>::size_type' (aka 'unsigned long') [-Wformat]
                __func__, cp, check.c_str(), check.length(), str.c_str(), str.length());
                                             ^~~~~~~~~~~~~~
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/tests/test-tokenizer-1-llama.cpp:116:75: warning: format specifies type 'unsigned long long' but the argument has type 'std::basic_string<char>::size_type' (aka 'unsigned long') [-Wformat]
                __func__, cp, check.c_str(), check.length(), str.c_str(), str.length());
                                                                          ^~~~~~~~~~~~
6 warnings generated.
[ 32%] Linking CXX executable ../bin/test-tokenizer-1-llama
[ 32%] Built target test-tokenizer-1-llama
[ 33%] Building CXX object tests/CMakeFiles/test-grammar-parser.dir/test-grammar-parser.cpp.o
[ 35%] Linking CXX executable ../bin/test-grammar-parser
[ 35%] Built target test-grammar-parser
[ 36%] Building CXX object tests/CMakeFiles/test-llama-grammar.dir/test-llama-grammar.cpp.o
[ 38%] Linking CXX executable ../bin/test-llama-grammar
[ 38%] Built target test-llama-grammar
[ 39%] Building CXX object tests/CMakeFiles/test-grad0.dir/test-grad0.cpp.o
[ 40%] Linking CXX executable ../bin/test-grad0
[ 40%] Built target test-grad0
[ 42%] Building C object tests/CMakeFiles/test-c.dir/test-c.c.o
[ 43%] Linking CXX executable ../bin/test-c
[ 43%] Built target test-c
[ 45%] Building CXX object examples/main/CMakeFiles/main.dir/main.cpp.o
[ 46%] Linking CXX executable ../../bin/main
[ 46%] Built target main
[ 47%] Building CXX object examples/quantize/CMakeFiles/quantize.dir/quantize.cpp.o
[ 49%] Linking CXX executable ../../bin/quantize
[ 49%] Built target quantize
[ 50%] Building CXX object examples/quantize-stats/CMakeFiles/quantize-stats.dir/quantize-stats.cpp.o
[ 52%] Linking CXX executable ../../bin/quantize-stats
[ 52%] Built target quantize-stats
[ 53%] Building CXX object examples/perplexity/CMakeFiles/perplexity.dir/perplexity.cpp.o
[ 54%] Linking CXX executable ../../bin/perplexity
[ 54%] Built target perplexity
[ 56%] Building CXX object examples/embedding/CMakeFiles/embedding.dir/embedding.cpp.o
[ 57%] Linking CXX executable ../../bin/embedding
[ 57%] Built target embedding
[ 59%] Building CXX object examples/save-load-state/CMakeFiles/save-load-state.dir/save-load-state.cpp.o
[ 60%] Linking CXX executable ../../bin/save-load-state
[ 60%] Built target save-load-state
[ 61%] Building CXX object examples/benchmark/CMakeFiles/benchmark.dir/benchmark-matmult.cpp.o
[ 63%] Linking CXX executable ../../bin/benchmark
[ 63%] Built target benchmark
[ 64%] Building CXX object examples/baby-llama/CMakeFiles/baby-llama.dir/baby-llama.cpp.o
[ 66%] Linking CXX executable ../../bin/baby-llama
[ 66%] Built target baby-llama
[ 67%] Building CXX object examples/train-text-from-scratch/CMakeFiles/train-text-from-scratch.dir/train-text-from-scratch.cpp.o
In file included from /Users/arjen/miniforge3/envs/oi/lib/llama.cpp/examples/train-text-from-scratch/train-text-from-scratch.cpp:3:
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
#define die_fmt(fmt, ...) do { fprintf(stderr, "error: " fmt "\n", ##__VA_ARGS__); exit(1); } while (0)
                                                                   ^
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
75 warnings generated.
[ 69%] Linking CXX executable ../../bin/train-text-from-scratch
[ 69%] Built target train-text-from-scratch
[ 70%] Building CXX object examples/convert-llama2c-to-ggml/CMakeFiles/convert-llama2c-to-ggml.dir/convert-llama2c-to-ggml.cpp.o
In file included from /Users/arjen/miniforge3/envs/oi/lib/llama.cpp/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp:3:
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
#define die_fmt(fmt, ...) do { fprintf(stderr, "error: " fmt "\n", ##__VA_ARGS__); exit(1); } while (0)
                                                                   ^
/Users/arjen/miniforge3/envs/oi/lib/llama.cpp/common/./common.h:24:68: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
2 warnings generated.
[ 71%] Linking CXX executable ../../bin/convert-llama2c-to-ggml
[ 71%] Built target convert-llama2c-to-ggml
[ 73%] Building CXX object examples/simple/CMakeFiles/simple.dir/simple.cpp.o
[ 74%] Linking CXX executable ../../bin/simple
[ 74%] Built target simple
[ 76%] Building CXX object examples/speculative/CMakeFiles/speculative.dir/speculative.cpp.o
[ 77%] Linking CXX executable ../../bin/speculative
[ 77%] Built target speculative
[ 78%] Building CXX object examples/embd-input/CMakeFiles/embdinput.dir/embd-input-lib.cpp.o
[ 80%] Linking CXX static library libembdinput.a
[ 80%] Built target embdinput
[ 81%] Building CXX object examples/embd-input/CMakeFiles/embd-input-test.dir/embd-input-test.cpp.o
[ 83%] Linking CXX executable ../../bin/embd-input-test
[ 83%] Built target embd-input-test
[ 84%] Building CXX object examples/llama-bench/CMakeFiles/llama-bench.dir/llama-bench.cpp.o
[ 85%] Linking CXX executable ../../bin/llama-bench
[ 85%] Built target llama-bench
[ 87%] Building CXX object examples/beam-search/CMakeFiles/beam-search.dir/beam-search.cpp.o
[ 88%] Linking CXX executable ../../bin/beam-search
[ 88%] Built target beam-search
[ 90%] Building CXX object examples/metal/CMakeFiles/metal.dir/metal.cpp.o
[ 91%] Linking CXX executable ../../bin/metal
[ 91%] Built target metal
[ 92%] Building CXX object examples/server/CMakeFiles/server.dir/server.cpp.o
[ 94%] Linking CXX executable ../../bin/server
[ 94%] Built target server
[ 95%] Building CXX object pocs/vdot/CMakeFiles/vdot.dir/vdot.cpp.o
[ 97%] Linking CXX executable ../../bin/vdot
[ 97%] Built target vdot
[ 98%] Building CXX object pocs/vdot/CMakeFiles/q8dot.dir/q8dot.cpp.o
[100%] Linking CXX executable ../../bin/q8dot
[100%] Built target q8dot

@abetlen If I try the same in the llama-cpp-python folder (creating that build dir, entering it and exxecute cmake ..) I'm getting this response:
CMake Error at /opt/homebrew/Cellar/cmake/3.27.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
  /opt/homebrew/Cellar/cmake/3.27.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /opt/homebrew/Cellar/cmake/3.27.4/share/cmake/Modules/FindThreads.cmake:226 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  vendor/llama.cpp/CMakeLists.txt:137 (find_package)

-- Configuring incomplete, errors occurred!

@primemp can you also post the output of  cmake .. from llama.cpp

@abetlen sorry im not sure i'm following. I am trying to launch llama-2 from the oobabooga_macos repo  but its raising the errors I posted previously. Made sure to manually download it from the documentation and installed the dependencies but cant seem to get past through it

@abetlen Thank you for your patience with me. Here's the output of cmake ..
-- The C compiler identification is AppleClang <IP_ADDRESS>00029
-- The CXX compiler identification is AppleClang <IP_ADDRESS>00029
-- 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.37.1 (Apple Git-137.1)")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Accelerate framework found
-- Metal framework found
-- CMAKE_SYSTEM_PROCESSOR: arm64
-- ARM detected
-- Performing Test COMPILER_SUPPORTS_FP16_FORMAT_I3E
-- Performing Test COMPILER_SUPPORTS_FP16_FORMAT_I3E - Failed
-- Configuring done (0.6s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/arjen/miniforge3/envs/oi/lib/llama.cpp/build

@icecoldt369 the reason I asked to bulid llama.cpp standalone is to compare the build logs from llama.cpp and llama-cpp-python to narrow down the error. If llama.cpp fails to build then you may be running into a downstream bug.

@primemp getting somewhere, looks like the threads package is found when building with cmake from the cli but not when the package is built. Two questions

Can you run cmake --version and let me know what that is
When you pip install llama-cpp-python with --verbose is there a line like CMAKE_SYSTEM_PROCESSOR: arm64 in the output?

@abetlen ah yes i suspect this may be the case. running pip install llama-cpp or CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp
ERROR: Could not find a version that satisfies the requirement llama-cpp (from versions: none)
ERROR: No matching distribution found for llama-cpp
Would you be able to point me to tips or further assistance? Thanks

@icecoldt369 I think that's a typo, it should be llama-cpp**-python**
What I meant about building llama.cpp is following these steps and sharing the log
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
mkdir build
cd build
cmake ..
cmake --build . --config Release

@abetlen oh my bad haha. this is the output log:
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
mkdir build
cd build
cmake ..
cmake --build . --config Release
Cloning into 'llama.cpp'...
remote: Enumerating objects: 8862, done.
remote: Counting objects: 100% (8862/8862), done.
remote: Compressing objects: 100% (2696/2696), done.
remote: Total 8862 (delta 6147), reused 8782 (delta 6106), pack-reused 0
Receiving objects: 100% (8862/8862), 8.29 MiB | 7.51 MiB/s, done.
Resolving deltas: 100% (6147/6147), done.
-- The C compiler identification is AppleClang <IP_ADDRESS>30032
-- The CXX compiler identification is AppleClang <IP_ADDRESS>30032
-- 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/local/bin/git (found version "2.42.0")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Accelerate framework found
-- Metal framework found
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- x86 detected
-- Configuring done (1.5s)
-- Generating done (0.9s)
-- Build files have been written to: /Users/tevykuch/V2-Langchain/oobabooga_macos/llama.cpp/build
[  1%] Built target BUILD_INFO
[  2%] Building C object CMakeFiles/ggml.dir/ggml.c.o
/Users/tevykuch/V2-Langchain/oobabooga_macos/llama.cpp/ggml.c:2391:5: warning: implicit conversion increases floating-point precision: 'float' to 'ggml_float' (aka 'double') [-Wdouble-promotion]
GGML_F16_VEC_REDUCE(sumf, sum);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tevykuch/V2-Langchain/oobabooga_macos/llama.cpp/ggml.c:2023:37: note: expanded from macro 'GGML_F16_VEC_REDUCE'
#define GGML_F16_VEC_REDUCE         GGML_F32Cx8_REDUCE
^
/Users/tevykuch/V2-Langchain/oobabooga_macos/llama.cpp/ggml.c:2013:33: note: expanded from macro 'GGML_F32Cx8_REDUCE'
#define GGML_F32Cx8_REDUCE      GGML_F32x8_REDUCE
^
/Users/tevykuch/V2-Langchain/oobabooga_macos/llama.cpp/ggml.c:1959:11: note: expanded from macro 'GGML_F32x8_REDUCE'
res = _mm_cvtss_f32(_mm_hadd_ps(t1, t1));
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tevykuch/V2-Langchain/oobabooga_macos/llama.cpp/ggml.c:3657:9: warning: implicit conversion increases floating-point precision: 'float' to 'ggml_float' (aka 'double') [-Wdouble-promotion]
GGML_F16_VEC_REDUCE(sumf[k], sum[k]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tevykuch/V2-Langchain/oobabooga_macos/llama.cpp/ggml.c:2023:37: note: expanded from macro 'GGML_F16_VEC_REDUCE'
#define GGML_F16_VEC_REDUCE         GGML_F32Cx8_REDUCE
^
/Users/tevykuch/V2-Langchain/oobabooga_macos/llama.cpp/ggml.c:2013:33: note: expanded from macro 'GGML_F32Cx8_REDUCE'
#define GGML_F32Cx8_REDUCE      GGML_F32x8_REDUCE
^
/Users/tevykuch/V2-Langchain/oobabooga_macos/llama.cpp/ggml.c:1959:11: note: expanded from macro 'GGML_F32x8_REDUCE'
res = _mm_cvtss_f32(_mm_hadd_ps(t1, t1));
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
[  4%] Building C object CMakeFiles/ggml.dir/ggml-alloc.c.o
[  5%] Building C object CMakeFiles/ggml.dir/ggml-metal.m.o
/Users/tevykuch/V2-Langchain/oobabooga_macos/llama.cpp/ggml-metal.m:613:5: error: use of undeclared identifier 'MTLComputePassDescriptor'
MTLComputePassDescriptor * edesc = MTLComputePassDescriptor.computePassDescriptor;
^
/Users/tevykuch/V2-Langchain/oobabooga_macos/llama.cpp/ggml-metal.m:613:32: error: use of undeclared identifier 'edesc'
MTLComputePassDescriptor * edesc = MTLComputePassDescriptor.computePassDescriptor;
^
/Users/tevykuch/V2-Langchain/oobabooga_macos/llama.cpp/ggml-metal.m:613:40: error: use of undeclared identifier 'MTLComputePassDescriptor'
MTLComputePassDescriptor * edesc = MTLComputePassDescriptor.computePassDescriptor;
^
/Users/tevykuch/V2-Langchain/oobabooga_macos/llama.cpp/ggml-metal.m:618:5: error: use of undeclared identifier 'edesc'
edesc.dispatchType = has_concur ? MTLDispatchTypeConcurrent : MTLDispatchTypeSerial;
^
/Users/tevykuch/V2-Langchain/oobabooga_macos/llama.cpp/ggml-metal.m:631:61: warning: instance method '-computeCommandEncoderWithDescriptor:' not found (return type defaults to 'id')
[-Wobjc-method-access]
ctx->command_encoders[i] = [ctx->command_buffers[i] computeCommandEncoderWithDescriptor: edesc];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tevykuch/V2-Langchain/oobabooga_macos/llama.cpp/ggml-metal.m:631:98: error: use of undeclared identifier 'edesc'
ctx->command_encoders[i] = [ctx->command_buffers[i] computeCommandEncoderWithDescriptor: edesc];
^
/Users/tevykuch/V2-Langchain/oobabooga_macos/llama.cpp/ggml-metal.m:873:61: error: use of undeclared identifier 'MTLGPUFamilyApple7'
[ctx->device supportsFamily:MTLGPUFamilyApple7] &&
^
1 warning and 6 errors generated.
make[2]: *** [CMakeFiles/ggml.dir/ggml-metal.m.o] Error 1
make[1]: *** [CMakeFiles/ggml.dir/all] Error 2

@icecoldt369 okay looks like your issue is actually a llama.cpp build error, do you mind opening an issue there, if it gets resolved I can merge in the fix and llama-cpp-python should work.

@primemp can you try pip install --verbose git+https://github.com/abetlen/llama-cpp-python.git I made a small change to the build but not sure if that will fix it for you.

@abetlen Did try that code. Output:
(oi) arjen@Laptop-van-Arjen oi % pip install --verbose git+https://github.com/abetlen/llama-cpp-python.git
Using pip 23.2.1 from /Users/arjen/miniforge3/envs/oi/lib/python3.11/site-packages/pip (python 3.11)
Collecting git+https://github.com/abetlen/llama-cpp-python.git
  Cloning https://github.com/abetlen/llama-cpp-python.git to /private/var/folders/r4/9mrbh04j1_gc4h5z0m3f52d80000gn/T/pip-req-build-gqpad37c
  Running command git version
  git version 2.37.1 (Apple Git-137.1)
  Running command git clone --filter=blob:none https://github.com/abetlen/llama-cpp-python.git /private/var/folders/r4/9mrbh04j1_gc4h5z0m3f52d80000gn/T/pip-req-build-gqpad37c
  Cloning into '/private/var/folders/r4/9mrbh04j1_gc4h5z0m3f52d80000gn/T/pip-req-build-gqpad37c'...
  Running command git rev-parse HEAD
  65a2a200506806200aaa2bc27f18e576eaed687c
  Resolved https://github.com/abetlen/llama-cpp-python.git to commit 65a2a200506806200aaa2bc27f18e576eaed687c
  Running command git submodule update --init --recursive -q
  Running command git rev-parse HEAD
  65a2a200506806200aaa2bc27f18e576eaed687c
  Running command pip subprocess to install build dependencies
  Collecting scikit-build-core[pyproject]>=0.5.0
    Obtaining dependency information for scikit-build-core[pyproject]>=0.5.0 from https://files.pythonhosted.org/packages/94/b8/fba31e512f4e1817e3adce4fa1e2dd73dd06b7013fca9671b6b5c19a0bae/scikit_build_core-0.5.0-py3-none-any.whl.metadata
    Using cached scikit_build_core-0.5.0-py3-none-any.whl.metadata (16 kB)
  Collecting packaging>=20.9 (from scikit-build-core[pyproject]>=0.5.0)
    Using cached packaging-23.1-py3-none-any.whl (48 kB)
  Collecting pathspec>=0.10.1 (from scikit-build-core[pyproject]>=0.5.0)
    Obtaining dependency information for pathspec>=0.10.1 from https://files.pythonhosted.org/packages/b4/2a/9b1be29146139ef459188f5e420a66e835dda921208db600b7037093891f/pathspec-0.11.2-py3-none-any.whl.metadata
    Using cached pathspec-0.11.2-py3-none-any.whl.metadata (19 kB)
  Collecting pyproject-metadata>=0.5 (from scikit-build-core[pyproject]>=0.5.0)
    Using cached pyproject_metadata-0.7.1-py3-none-any.whl (7.4 kB)
  Using cached pathspec-0.11.2-py3-none-any.whl (29 kB)
  Using cached scikit_build_core-0.5.0-py3-none-any.whl (129 kB)
  Installing collected packages: pathspec, packaging, scikit-build-core, pyproject-metadata
  Successfully installed packaging-23.1 pathspec-0.11.2 pyproject-metadata-0.7.1 scikit-build-core-0.5.0
  Installing build dependencies ... done
  Running command Getting requirements to build wheel
  Getting requirements to build wheel ... done
  Running command pip subprocess to install backend dependencies
  Collecting ninja>=1.5
    Using cached ninja-1.11.1-py2.py3-none-macosx_10_9_universal2.macosx_10_9_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl (270 kB)
  Installing collected packages: ninja
  Successfully installed ninja-1.11.1
  Installing backend dependencies ... done
  Running command Preparing metadata (pyproject.toml)
  *** scikit-build-core 0.5.0 using CMake 3.27.4 (metadata_wheel)
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: typing-extensions>=4.5.0 in ./lib/python3.11/site-packages (from llama_cpp_python==0.2.4) (4.7.1)
  Link requires a different Python (3.11.4 not in: '>=3.7,<3.11'): https://files.pythonhosted.org/packages/3a/be/650f9c091ef71cb01d735775d554e068752d3ff63d7943b26316dc401749/numpy-1.21.2.zip (from https://pypi.org/simple/numpy/) (requires-python:>=3.7,<3.11)
  Link requires a different Python (3.11.4 not in: '>=3.7,<3.11'): https://files.pythonhosted.org/packages/5f/d6/ad58ded26556eaeaa8c971e08b6466f17c4ac4d786cd3d800e26ce59cc01/numpy-1.21.3.zip (from https://pypi.org/simple/numpy/) (requires-python:>=3.7,<3.11)
  Link requires a different Python (3.11.4 not in: '>=3.7,<3.11'): https://files.pythonhosted.org/packages/fb/48/b0708ebd7718a8933f0d3937513ef8ef2f4f04529f1f66ca86d873043921/numpy-1.21.4.zip (from https://pypi.org/simple/numpy/) (requires-python:>=3.7,<3.11)
  Link requires a different Python (3.11.4 not in: '>=3.7,<3.11'): https://files.pythonhosted.org/packages/c2/a8/a924a09492bdfee8c2ec3094d0a13f2799800b4fdc9c890738aeeb12c72e/numpy-1.21.5.zip (from https://pypi.org/simple/numpy/) (requires-python:>=3.7,<3.11)
  Link requires a different Python (3.11.4 not in: '>=3.7,<3.11'): https://files.pythonhosted.org/packages/45/b7/de7b8e67f2232c26af57c205aaad29fe17754f793404f59c8a730c7a191a/numpy-1.21.6.zip (from https://pypi.org/simple/numpy/) (requires-python:>=3.7,<3.11)
Collecting numpy>=1.20.0 (from llama_cpp_python==0.2.4)
  Obtaining dependency information for numpy>=1.20.0 from https://files.pythonhosted.org/packages/86/a1/b8ef999c32f26a97b5f714887e21f96c12ae99a38583a0a96e65283ac0a1/numpy-1.25.2-cp311-cp311-macosx_11_0_arm64.whl.metadata
  Using cached numpy-1.25.2-cp311-cp311-macosx_11_0_arm64.whl.metadata (5.6 kB)
Collecting diskcache>=5.6.1 (from llama_cpp_python==0.2.4)
  Obtaining dependency information for diskcache>=5.6.1 from https://files.pythonhosted.org/packages/3f/27/4570e78fc0bf5ea0ca45eb1de3818a23787af9b390c0b0a0033a1b8236f9/diskcache-5.6.3-py3-none-any.whl.metadata
  Using cached diskcache-5.6.3-py3-none-any.whl.metadata (20 kB)
Using cached diskcache-5.6.3-py3-none-any.whl (45 kB)
Using cached numpy-1.25.2-cp311-cp311-macosx_11_0_arm64.whl (14.0 MB)
Building wheels for collected packages: llama_cpp_python
  Running command Building wheel for llama_cpp_python (pyproject.toml)
  *** scikit-build-core 0.5.0 using CMake 3.27.4 (wheel)
  *** Configuring CMake...
  2023-09-14 19:23:35,972 - scikit_build_core - WARNING - libdir/ldlibrary: /Users/arjen/miniforge3/envs/oi/lib/libpython3.11.a is not a real file!
  2023-09-14 19:23:35,972 - scikit_build_core - WARNING - Can't find a Python library, got libdir=/Users/arjen/miniforge3/envs/oi/lib, ldlibrary=libpython3.11.a, multiarch=darwin, masd=None
  loading initial cache file /var/folders/r4/9mrbh04j1_gc4h5z0m3f52d80000gn/T/tmph64lixfb/build/CMakeInit.txt
  -- The C compiler identification is AppleClang <IP_ADDRESS>00029
  -- The CXX compiler identification is AppleClang <IP_ADDRESS>00029
  -- 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.37.1 (Apple Git-137.1)")
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
  -- Check if compiler accepts -pthread
  -- Check if compiler accepts -pthread - no
  -- Looking for pthread_create in pthreads
  -- Looking for pthread_create in pthreads - not found
  -- Looking for pthread_create in pthread
  -- Looking for pthread_create in pthread - not found
  CMake Error at /opt/homebrew/Cellar/cmake/3.27.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
    Could NOT find Threads (missing: Threads_FOUND)
  Call Stack (most recent call first):
    /opt/homebrew/Cellar/cmake/3.27.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
    /opt/homebrew/Cellar/cmake/3.27.4/share/cmake/Modules/FindThreads.cmake:226 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
    vendor/llama.cpp/CMakeLists.txt:137 (find_package)

  -- Configuring incomplete, errors occurred!

  *** CMake configuration failed
  error: subprocess-exited-with-error

  × Building wheel for llama_cpp_python (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /Users/arjen/miniforge3/envs/oi/bin/python3.11 /Users/arjen/miniforge3/envs/oi/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /var/folders/r4/9mrbh04j1_gc4h5z0m3f52d80000gn/T/tmp_1yhldej
  cwd: /private/var/folders/r4/9mrbh04j1_gc4h5z0m3f52d80000gn/T/pip-req-build-gqpad37c
  Building wheel for llama_cpp_python (pyproject.toml) ... error
  ERROR: Failed building wheel for llama_cpp_python
Failed to build llama_cpp_python
ERROR: Could not build wheels for llama_cpp_python, which is required to install pyproject.toml-based projects

Hey, thank you for the thread! I'm having this issue to so I'm including here the log for the verbose install from pip, and then the logs from a succesfull compilation of llama.cpp
Here's the failing log with that CMAKE_HAVE_LIBC_PTHREAD error:
❯ pip install --verbose git+https://github.com/abetlen/llama-cpp-python.git
Using pip 23.2.1 from /Users/gabriel/anaconda3/envs/cabildo-extract/lib/python3.11/site-packages/pip (python 3.11)
Collecting git+https://github.com/abetlen/llama-cpp-python.git
  Cloning https://github.com/abetlen/llama-cpp-python.git to /private/var/folders/ts/_0b3z_qn7sd72nfffjkydm8h0000gn/T/pip-req-build-ff7waofa
  Running command git version
  git version 2.32.1 (Apple Git-133)
  Running command git clone --filter=blob:none https://github.com/abetlen/llama-cpp-python.git /private/var/folders/ts/_0b3z_qn7sd72nfffjkydm8h0000gn/T/pip-req-build-ff7waofa
  Cloning into '/private/var/folders/ts/_0b3z_qn7sd72nfffjkydm8h0000gn/T/pip-req-build-ff7waofa'...
  Running command git rev-parse HEAD
  ca4eb952a61efe3cd9a67a7d88b112427895251b
  Resolved https://github.com/abetlen/llama-cpp-python.git to commit ca4eb952a61efe3cd9a67a7d88b112427895251b
  Running command git submodule update --init --recursive -q
  Running command git rev-parse HEAD
  ca4eb952a61efe3cd9a67a7d88b112427895251b
  Running command pip subprocess to install build dependencies
  Collecting scikit-build-core[pyproject]>=0.5.0
    Obtaining dependency information for scikit-build-core[pyproject]>=0.5.0 from https://files.pythonhosted.org/packages/94/b8/fba31e512f4e1817e3adce4fa1e2dd73dd06b7013fca9671b6b5c19a0bae/scikit_build_core-0.5.0-py3-none-any.whl.metadata
    Using cached scikit_build_core-0.5.0-py3-none-any.whl.metadata (16 kB)
  Collecting packaging>=20.9 (from scikit-build-core[pyproject]>=0.5.0)
    Using cached packaging-23.1-py3-none-any.whl (48 kB)
  Collecting pathspec>=0.10.1 (from scikit-build-core[pyproject]>=0.5.0)
    Obtaining dependency information for pathspec>=0.10.1 from https://files.pythonhosted.org/packages/b4/2a/9b1be29146139ef459188f5e420a66e835dda921208db600b7037093891f/pathspec-0.11.2-py3-none-any.whl.metadata
    Using cached pathspec-0.11.2-py3-none-any.whl.metadata (19 kB)
  Collecting pyproject-metadata>=0.5 (from scikit-build-core[pyproject]>=0.5.0)
    Using cached pyproject_metadata-0.7.1-py3-none-any.whl (7.4 kB)
  Using cached pathspec-0.11.2-py3-none-any.whl (29 kB)
  Using cached scikit_build_core-0.5.0-py3-none-any.whl (129 kB)
  Installing collected packages: pathspec, packaging, scikit-build-core, pyproject-metadata
  Successfully installed packaging-23.1 pathspec-0.11.2 pyproject-metadata-0.7.1 scikit-build-core-0.5.0
  Installing build dependencies ... done
  Running command Getting requirements to build wheel
  Getting requirements to build wheel ... done
  Running command pip subprocess to install backend dependencies
  Collecting ninja>=1.5
    Using cached ninja-1.11.1-py2.py3-none-macosx_10_9_universal2.macosx_10_9_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl (270 kB)
  Installing collected packages: ninja
  Successfully installed ninja-1.11.1
  Installing backend dependencies ... done
  Running command Preparing metadata (pyproject.toml)
  *** scikit-build-core 0.5.0 using CMake 3.27.4 (metadata_wheel)
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: typing-extensions>=4.5.0 in /Users/gabriel/anaconda3/envs/cabildo-extract/lib/python3.11/site-packages (from llama_cpp_python==0.2.4) (4.7.1)
Requirement already satisfied: numpy>=1.20.0 in /Users/gabriel/anaconda3/envs/cabildo-extract/lib/python3.11/site-packages (from llama_cpp_python==0.2.4) (1.25.2)
Collecting diskcache>=5.6.1 (from llama_cpp_python==0.2.4)
  Obtaining dependency information for diskcache>=5.6.1 from https://files.pythonhosted.org/packages/3f/27/4570e78fc0bf5ea0ca45eb1de3818a23787af9b390c0b0a0033a1b8236f9/diskcache-5.6.3-py3-none-any.whl.metadata
  Downloading diskcache-5.6.3-py3-none-any.whl.metadata (20 kB)
Downloading diskcache-5.6.3-py3-none-any.whl (45 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 45.5/45.5 kB 716.4 kB/s eta 0:00:00
Building wheels for collected packages: llama_cpp_python
  Running command Building wheel for llama_cpp_python (pyproject.toml)
  *** scikit-build-core 0.5.0 using CMake 3.27.4 (wheel)
  *** Configuring CMake...
  2023-09-14 16:09:55,364 - scikit_build_core - WARNING - libdir/ldlibrary: /Users/gabriel/anaconda3/envs/cabildo-extract/lib/libpython3.11.a is not a real file!
  2023-09-14 16:09:55,364 - scikit_build_core - WARNING - Can't find a Python library, got libdir=/Users/gabriel/anaconda3/envs/cabildo-extract/lib, ldlibrary=libpython3.11.a, multiarch=darwin, masd=None
  loading initial cache file /var/folders/ts/_0b3z_qn7sd72nfffjkydm8h0000gn/T/tmpmipahvnx/build/CMakeInit.txt
  -- The C compiler identification is AppleClang <IP_ADDRESS>60021
  -- The CXX compiler identification is AppleClang <IP_ADDRESS>60021
  -- 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.32.1 (Apple Git-133)")
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
  -- Check if compiler accepts -pthread
  -- Check if compiler accepts -pthread - no
  -- Looking for pthread_create in pthreads
  -- Looking for pthread_create in pthreads - not found
  -- Looking for pthread_create in pthread
  -- Looking for pthread_create in pthread - not found
  CMake Error at /opt/homebrew/Cellar/cmake/3.27.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
    Could NOT find Threads (missing: Threads_FOUND)
  Call Stack (most recent call first):
    /opt/homebrew/Cellar/cmake/3.27.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
    /opt/homebrew/Cellar/cmake/3.27.4/share/cmake/Modules/FindThreads.cmake:226 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
    vendor/llama.cpp/CMakeLists.txt:137 (find_package)

  -- Configuring incomplete, errors occurred!

  *** CMake configuration failed
  error: subprocess-exited-with-error

  × Building wheel for llama_cpp_python (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /Users/gabriel/anaconda3/envs/cabildo-extract/bin/python3.11 /Users/gabriel/anaconda3/envs/cabildo-extract/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /var/folders/ts/_0b3z_qn7sd72nfffjkydm8h0000gn/T/tmpsyf3bajc
  cwd: /private/var/folders/ts/_0b3z_qn7sd72nfffjkydm8h0000gn/T/pip-req-build-ff7waofa
  Building wheel for llama_cpp_python (pyproject.toml) ... error
  ERROR: Failed building wheel for llama_cpp_python
Failed to build llama_cpp_python
ERROR: Could not build wheels for llama_cpp_python, which is required to install pyproject.toml-based projects

And here's the compilation for llama.cpp:
 cmake ..
-- The C compiler identification is AppleClang <IP_ADDRESS>60021
-- The CXX compiler identification is AppleClang <IP_ADDRESS>60021
-- 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