Skip to content

Commit bba9980

Browse files
Frank Guoclaude
andcommitted
fix: link OpenMP on Linux for llama.cpp parallelism
llama.cpp uses OpenMP (GOMP_barrier, GOMP_parallel) on Linux. Without -lgomp the linker fails with undefined references. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e90cb52 commit bba9980

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

cmd/rekal/cli/nomic/nomic_cgo.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ package nomic
88
#cgo LDFLAGS: -L${SRCDIR}/../../../../.deps/llama.cpp/build/ggml/src -lggml -lggml-base -lggml-cpu
99
#cgo LDFLAGS: -L${SRCDIR}/../../../../.deps/llama.cpp/build/common -lcommon
1010
#cgo LDFLAGS: -lstdc++ -lm
11+
#cgo linux LDFLAGS: -lgomp
1112
#cgo darwin LDFLAGS: -L${SRCDIR}/../../../../.deps/llama.cpp/build/ggml/src/ggml-metal -lggml-metal
1213
#cgo darwin LDFLAGS: -L${SRCDIR}/../../../../.deps/llama.cpp/build/ggml/src/ggml-blas -lggml-blas
1314
#cgo darwin LDFLAGS: -framework Foundation -framework Metal -framework MetalKit -framework Accelerate

0 commit comments

Comments
 (0)