Fix: correct download_deps.py path in error messages and add native libs doc (#16557)

## Summary

Fix error messages in `build.sh` and add documentation in
`internal/development.md` for downloading native static libraries
(pdfium, pdf_oxide, office_oxide).

## Changes

- `build.sh`: change error hint from `uv run download_deps.py` to `uv
run ragflow_deps/download_deps.py` (correct path from project root)
- `internal/development.md`: add section 2.1 documenting how to download
native libs and install lld
This commit is contained in:
Jack
2026-07-02 18:41:39 +08:00
committed by GitHub
parent 3e7e5f4f6a
commit 7ae18a45ee
2 changed files with 30 additions and 31 deletions

View File

@@ -27,10 +27,26 @@ docker compose -f docker/docker-compose-base.yml up -d
./build.sh -s --go
```
> **Note**: If you use IDEs like GoLand to run/debug directly (via Run/Debug buttons), or run `go build` / `go run` from command line, run `./build.sh --go` first to download native dependencies. Then set the following CGO environment variables in your run configuration or shell:
### 2.1. Native Static Libraries
Before building, you need three native static libraries (pdfium, pdf_oxide, office_oxide).
They are **not** downloaded by `build.sh` — use the included download script:
```bash
# From the project root, download and extract to ~/ragflow-native-libs/
uv run ragflow_deps/download_deps.py
```
This also requires `lld` on Linux (for Chromium-built pdfium):
```bash
sudo apt install lld-20 && sudo ln -s /usr/bin/ld.lld-20 /usr/bin/ld.lld
```
> **Note**: If you use IDEs like GoLand to run/debug directly (via Run/Debug buttons), or run `go build` / `go run` from command line, set these CGO environment variables:
>
> ```bash
> RAGFLOW_DEPS="${HOME}/ragflow-native-libs"
> RAGFLOW_DEPS="${HOME}/ragflow-native-libs" # created by uv run ragflow_deps/download_deps.py
> PLATFORM="linux_amd64" # or darwin_amd64, linux_arm64, darwin_arm64
>
> export CGO_CFLAGS="-I${RAGFLOW_DEPS}/office_oxide/include/office_oxide_c"