Skip to content

Commit 56b38c0

Browse files
committed
docs: fix stale root-relative build commands in README after reactor move
The "Setup required" native-build steps told users to run cmake -B build at the repo root, but CMakeLists.txt now lives in llama/ (the root is just the reactor aggregator), so it would fail. Prefix the block with `cd llama` and update the install-path example to /java-llama.cpp/llama/src/... . Also fix the Android Gradle snippet to check llama/target and run mvn compile in the llama/ module. (Reported by an automated PR review; verified against the new layout.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rt1paYztGJ2AKUuBuAGDXE
1 parent 2387f34 commit 56b38c0

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,12 @@ This consists of two steps: 1) Compiling the libraries and 2) putting them in th
272272

273273
First, have a look at [llama.cpp](https://github.com/ggerganov/llama.cpp/blob/master/docs/build.md) to know which build arguments to use (e.g. for CUDA support).
274274
Any build option of llama.cpp works equivalently for this project.
275-
You then have to run the following commands in the directory of this repository (java-llama.cpp):
275+
You then have to run the following commands in the `llama/` module directory (the native core lives
276+
there; the repository root is just the Maven reactor aggregator):
276277

277278
```shell
278-
mvn compile # don't forget this line
279+
cd llama # the native core module
280+
mvn compile # don't forget this line
279281
cmake -B build # add any other arguments for your backend, e.g. -DGGML_CUDA=ON
280282
cmake --build build --config Release
281283
```
@@ -286,7 +288,7 @@ cmake --build build --config Release
286288
All compiled libraries will be put in a resources directory matching your platform, which will appear in the cmake output. For example something like:
287289

288290
```shell
289-
-- Installing files to /java-llama.cpp/src/main/resources/net/ladenthin/llama/Linux/x86_64
291+
-- Installing files to /java-llama.cpp/llama/src/main/resources/net/ladenthin/llama/Linux/x86_64
290292
```
291293

292294
#### Library Location
@@ -871,11 +873,12 @@ git submodule add https://github.com/bernardladenthin/java-llama.cpp
871873
android {
872874
val jllamaLib = file("java-llama.cpp")
873875
874-
// Execute "mvn compile" if folder target/ doesn't exist at ./java-llama.cpp/
875-
if (!file("$jllamaLib/target").exists()) {
876+
// Execute "mvn compile" in the llama/ core module if its target/ doesn't exist
877+
// (the repository root is the Maven reactor aggregator; the native core lives in llama/).
878+
if (!file("$jllamaLib/llama/target").exists()) {
876879
exec {
877880
commandLine = listOf("mvn", "compile")
878-
workingDir = file("java-llama.cpp/")
881+
workingDir = file("java-llama.cpp/llama/")
879882
}
880883
}
881884

0 commit comments

Comments
 (0)