Skip to content

Conversation

@andinux
Copy link
Contributor

@andinux andinux commented Nov 10, 2025

Added checks to ensure a valid context exists before proceeding in llm_chat_check_context and llm_chat_create. This prevents misuse by requiring llm_context_create to be called prior to llm_chat_create, improving error handling and robustness.

Fix the following error that occurred when loading the extension:
Error: dlopen(./dist/ai.dylib, 0x000A): symbol not found in flat namespace '_ggml_backend_blas_reg'

Updated the Makefile to link against libggml-blas.a and include -lggml-blas in LDFLAGS for macOS builds. This enables BLAS support, potentially improving performance on macOS platforms.
Added checks to ensure a valid context exists before proceeding in llm_chat_check_context and llm_chat_create. This prevents misuse by requiring llm_context_create to be called prior to llm_chat_create, improving error handling and robustness.
…r for both make and make test

Eliminates the inclusion of libggml-blas.a and its linker flag from the macOS build configuration in the Makefile. This streamlines the build process and avoids unnecessary dependencies for macOS targets.
Usage example:
export the following env var to use them both for make and make test:
LLAMA="-DGGML_NATIVE=OFF -DGGML_METAL=ON -DGGML_ACCELERATE=ON -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=Apple"
WHISPER="-DWHISPER_COREML=ON -DWHISPER_COREML_ALLOW_FALLBACK=ON"
SQLITE3=/opt/homebrew/Cellar/sqlite/3.50.4/bin/sqlite3
@andinux andinux self-assigned this Nov 10, 2025
@andinux andinux added the bug Something isn't working label Nov 10, 2025
@andinux andinux merged commit 7e3b8c1 into main Nov 11, 2025
20 checks passed
@andinux andinux deleted the fix/issue15-chat-crash branch November 11, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants