LostRuins / koboldcpp

Run GGUF models easily with a KoboldAI UI. One File. Zero Install.
https://github.com/lostruins/koboldcpp
GNU Affero General Public License v3.0
4.66k stars 334 forks source link

Cannot install on MacOS due to OPENBLAS #26

Closed synchroazel closed 1 year ago

synchroazel commented 1 year ago

Following your instructions, I am trying to run make LLAMA_OPENBLAS=1 inside the cloned repo, but I get

ld: library not found for -lopenblas
clang: error: linker command failed with exit code 1 (use -v to see invocation)

If instead I just run make I get

Your OS is  and does not appear to be Windows. If you want to use openblas, please link it manually with LLAMA_OPENBLAS=1

I should have openblas installed through homebrew.

I am currently running MacOS Ventura on a M1 Pro MacBook.

LostRuins commented 1 year ago

It's possible your libopenblas was installed to a different path. You can modify the makefile and add additional library directories before the -lopenblas with -L/path/to/lib

synchroazel commented 1 year ago

Thank you for your reply! I have modified the Makefile so that it now contains

ifdef LLAMA_OPENBLAS
    CFLAGS  += -DGGML_USE_OPENBLAS -I/usr/local/include/openblas
    LDFLAGS += -L/opt/homebrew/Cellar/openblas/0.3.23/lib -lopenblas
endif

with /opt/homebrew/Cellar/openblas/0.3.23/lib being the path to which openblas is installed by Homebrew on M1 Macs by default. But when running make LLAMA_OPENBLAS=1 I still get

ld: warning: option -s is obsolete and being ignored
Your OS is  and does not appear to be Windows. If you want to use openblas, please link it manually with LLAMA_OPENBLAS=1

EDIT:

Silly me, It compiled with no problems, though with no feedback. Now running koboldcpp.py works as expected. Thanks!

LostRuins commented 1 year ago

Yeah I should really change that message. Some people think its an error.