Repository navigation
fix(go): require compatible lld for native builds - #7
Merged
ethan7zhanghx merged 1 commit intoJul 29, 2026
Merged
Conversation
ethan7zhanghx
marked this pull request as ready for review
July 29, 2026 09:19
ethan7zhanghx
added a commit
that referenced
this pull request
Jul 29, 2026
This reverts commit 29dfd29.
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.
What changed
ld.lldis missing, unparseable, or older than 20SHT_CRELrelocations and produce a startup-crashing binary-BinCGO_LDFLAGSWhy
The previous build only checked whether
ld.lldexisted. With Ubuntu LLD 18,./build.sh --gocompleted successfully, but the resultingragflow_servercrashed withSIGSEGVbefore normal startup.The linked PDFium
libc++.acontainsSHT_CRELcompressed relocation sections. The affected cached cgo host object retained zero-displacement calls inoperator new, so the final executable was invalid despite a successful link.The repository development guide already requires Clang/LLD 20. This change makes the build fail early and makes the resolved, versioned linker directory part of the cgo flag string so switching linker installations invalidates the relevant Go cache key.
Impact
Developers using an incompatible linker now receive an actionable build error instead of a binary that crashes at startup.
Validation
bash -n build.shshellcheck build.sh./build.sh --gowith LLD 20.1.2ragflow_server --help./build.sh --test ./internal/agent/tool/..../build.sh --test ./internal/agent/component/...GET :9384/healthreturning HTTP 200