#71870 closed defect (fixed)

llama.cpp: builds fail for 10.13 and earlier, due to errant use of OpenMP

Reported by: mascguy (Christopher Nielsen) Owned by: i0ntempest
Priority: Normal Milestone:
Component: ports Version: 2.10.5
Keywords: Cc:
Port: llama.cpp

Description

While it's not clear whether this is an upstream issue per se - ideally the CMake build should auto-disable OpenMP support if not available - it appears that isn't the case. Instead, the build continues forward, and fails at link time due to missing symbols:

Undefined symbols for architecture x86_64:
  "___kmpc_barrier", referenced from:
      _ggml_barrier in ggml-cpu.c.o
      _.omp_outlined. in ggml-cpu.c.o
  "___kmpc_end_single", referenced from:
      _.omp_outlined. in ggml-cpu.c.o
  "___kmpc_fork_call", referenced from:
      _ggml_graph_compute in ggml-cpu.c.o
  "___kmpc_global_thread_num", referenced from:
      _ggml_barrier in ggml-cpu.c.o
      _ggml_graph_compute in ggml-cpu.c.o
  "___kmpc_push_num_threads", referenced from:
      _ggml_graph_compute in ggml-cpu.c.o
  "___kmpc_single", referenced from:
      _.omp_outlined. in ggml-cpu.c.o
  "_omp_get_num_threads", referenced from:
      _.omp_outlined. in ggml-cpu.c.o
  "_omp_get_thread_num", referenced from:
      _.omp_outlined. in ggml-cpu.c.o

But explicitly disabling it with the addition of the following configure arg, fixes the issue:

    -DGGML_OPENMP=OFF

Change History (2)

comment:2 Changed 11 months ago by Christopher Nielsen <mascguy@…>

Resolution: fixed
Status: assignedclosed

In 1304a7d9aec264b9dd3331f27f7301428c0217b5/macports-ports (master):

llama.cpp: update to 4508; fix builds on 10.15 and earlier

  • Explicitly disable OpenMP

Fixes: #71870

  • Upstream patch for errno-related build failure on 10.15:

Fixes: #71880

squash

Note: See TracTickets for help on using tickets.