diff --git a/Makefile b/Makefile index 3ea440f7a..6874bb99c 100644 --- a/Makefile +++ b/Makefile @@ -141,6 +141,9 @@ endif ifeq ($(UNAME_S),OpenBSD) CFLAGS += -pthread CXXFLAGS += -pthread +ifdef LLAMA_VULKAN +LDFLAGS += -L/usr/local/lib +endif endif ifeq ($(UNAME_S),Haiku) CFLAGS += -pthread diff --git a/README.md b/README.md index 28b48d94f..6ea03f3f8 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,17 @@ when you can't use the precompiled binary directly, we provide an automated buil - To make your build sharable and capable of working on other devices, you must use `LLAMA_PORTABLE=1` - After all binaries are built, you can run the python script with the command `python koboldcpp.py --model [ggml_model.gguf]` (and add `--gpulayers (number of layer)` if you wish to offload layers to GPU). +### Compiling on OpenBSD +- Clone the repo with `git clone https://github.com/LostRuins/koboldcpp.git` +- the project uses Gnu Makefile format, so you will need gmake: `pkg_add gmake` +- compiling vulkan support + - you will require libvulkan, this is included in the vulkan-loader package, which is a dependency of the vulkan-tools package: `pkg_add vulkan-tools` or `pkg_add vulkan-loader` + - you will require glslc, this is incliuded in the shaderc package: `pkg_add shaderc` + - if your gmake terminates with "fatal error: 'ggml-vulkan-shaders.hpp' file not found" the problem is probably that glslc is not installed. See above. + - OpenBSD's default datasize limit may prevent compiliation `ulimit -d 8388608` should work + - compile using `gmake LLAMA_VULKAN=1` +- After all binaries are built, you can run the python script with the command `python3 koboldcpp.py --model [ggml_model.gguf]` + ### Compiling on Android (Termux Installation) - [First, Install and run Termux from F-Droid](https://f-droid.org/en/packages/com.termux/) ## Termux Quick Setup Script (Easy Setup)