OpenBSD changes for vulkan backend (#2026)

* OpenBSD also needs alloca.h

* Changes to compile vulkan backend with OpenBSD

* Update README.md

tweak details for OpenBSD vulkan backend

* Update README.md
This commit is contained in:
JustCommitRandomness 2026-03-08 12:41:36 +00:00 committed by GitHub
parent 270d4ad2c1
commit 9ddd74111f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View file

@ -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

View file

@ -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)