MiniCPM-o icon indicating copy to clipboard operation
MiniCPM-o copied to clipboard

[ollama] - Go build fails with undefined reference to `GOMP_parallel'

Open goto-loop opened this issue 6 months ago • 9 comments

起始日期 | Start Date

No response

实现PR | Implementation PR

No response

相关Issues | Reference Issues

No response

摘要 | Summary

When following the instructions for running MiniCPM-V 2.6 with Ollama, the go build . step exits with the following error:

# github.com/ollama/ollama
/usr/lib/go-1.22/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: /home/user/ollama/llm/build/linux/x86_64_static/libllama.a(ggml.c.o): in function `ggml_compute_forward_conv_transpose_1d_f16_f32':
ggml.c:(.text+0x2b31): undefined reference to `GOMP_barrier'
/usr/bin/ld: /home/user/ollama/llm/build/linux/x86_64_static/libllama.a(ggml.c.o): in function `ggml_compute_forward_conv_transpose_1d_f32':
ggml.c:(.text+0x3189): undefined reference to `GOMP_barrier'
/usr/bin/ld: /home/user/ollama/llm/build/linux/x86_64_static/libllama.a(ggml.c.o): in function `ggml_compute_forward_conv_transpose_2d':
ggml.c:(.text+0x36e9): undefined reference to `GOMP_barrier'
/usr/bin/ld: /home/user/ollama/llm/build/linux/x86_64_static/libllama.a(ggml.c.o): in function `ggml_compute_forward_out_prod_q_f32':
ggml.c:(.text+0x400b): undefined reference to `GOMP_barrier'
/usr/bin/ld: /home/user/ollama/llm/build/linux/x86_64_static/libllama.a(ggml.c.o): in function `ggml_compute_forward_flash_attn_back_f32':
ggml.c:(.text+0x5781): undefined reference to `GOMP_barrier'
/usr/bin/ld: /home/user/ollama/llm/build/linux/x86_64_static/libllama.a(ggml.c.o):ggml.c:(.text+0x771e): more undefined references to `GOMP_barrier' follow
/usr/bin/ld: /home/user/ollama/llm/build/linux/x86_64_static/libllama.a(ggml.c.o): in function `ggml_graph_compute._omp_fn.0':
ggml.c:(.text+0x3b87d): undefined reference to `GOMP_single_start'
/usr/bin/ld: ggml.c:(.text+0x3b886): undefined reference to `omp_get_num_threads'
/usr/bin/ld: ggml.c:(.text+0x3b894): undefined reference to `GOMP_barrier'
/usr/bin/ld: ggml.c:(.text+0x3b8a1): undefined reference to `omp_get_thread_num'
/usr/bin/ld: /home/user/ollama/llm/build/linux/x86_64_static/libllama.a(ggml.c.o): in function `ggml_graph_compute':
ggml.c:(.text+0x3ed3d): undefined reference to `GOMP_parallel'
collect2: error: ld returned 1 exit status

I'm running Ubuntu with the following versions:

  • cmake 3.28.3
  • go 1.22.2
  • gcc 13.2.0

基本示例 | Basic Example

缺陷 | Drawbacks

未解决问题 | Unresolved questions

No response

goto-loop avatar Aug 07 '24 11:08 goto-loop