Enable BUILD_SHARED_LIBS for BoringSSL DLL generation#69
Merged
bernardladenthin merged 4 commits intomasterfrom Apr 4, 2026
Merged
Enable BUILD_SHARED_LIBS for BoringSSL DLL generation#69bernardladenthin merged 4 commits intomasterfrom
bernardladenthin merged 4 commits intomasterfrom
Conversation
- Set BUILD_SHARED_LIBS=ON before FetchContent_MakeAvailable(llama.cpp) - Forces BoringSSL to build as shared library (DLL/SO/DYLIB) - Generates runtime libraries instead of static import libs - Restore BUILD_SHARED_LIBS=OFF after build completes This ensures libssl and libcrypto DLLs are actually created and can be packaged into JAR resources for runtime dependency resolution. https://claude.ai/code/session_01FEBhTt2x3NakgzgxF2zxwJ
- Remove global BUILD_SHARED_LIBS=ON (was breaking all platforms) - Add cmake/copy_dll_files.cmake script for DLL/SO/DYLIB discovery - Script searches llama.cpp build directory for shared libraries - Platform-aware: looks for .dll (Windows), .so (Linux), .dylib (macOS) - Gracefully handles static builds (no DLLs to copy) - POST_BUILD runs script to copy any discovered libraries to JAR resources This approach is more flexible: - If BoringSSL/other libs generate DLLs → copied to JAR - If everything is static → no error, works normally - Future changes to llama.cpp linkage mode won't break the build https://claude.ai/code/session_01FEBhTt2x3NakgzgxF2zxwJ
- copy_dll_files.cmake now accepts variables via -D flags instead of find_package - Eliminates Java dependency issue in POST_BUILD context - Pass SOURCE_DIR, BINARY_DIR, OS_NAME, OS_ARCH, GGML_CUDA via command line - Script validates all required variables at startup - Better error messages with [DLL Discovery] prefix https://claude.ai/code/session_01FEBhTt2x3NakgzgxF2zxwJ
Document known issue where outdated C++ runtime library (msvcp140.dll) bundled with some JDK versions causes EXCEPTION_ACCESS_VIOLATION crashes. Provide solution to remove outdated DLLs from JDK directory so system C++ runtime is used instead. https://claude.ai/code/session_01FEBhTt2x3NakgzgxF2zxwJ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This ensures libssl and libcrypto DLLs are actually created and can be packaged into JAR resources for runtime dependency resolution.
https://claude.ai/code/session_01FEBhTt2x3NakgzgxF2zxwJ