[MacPorts] #72379: whisper requires C11

MacPorts noreply at macports.org
Tue Apr 22 02:04:29 UTC 2025


#72379: whisper requires C11
---------------------------+-----------------------
  Reporter:  barracuda156  |      Owner:  exprez135
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.10.5
Resolution:                |   Keywords:
      Port:  whisper       |
---------------------------+-----------------------

Comment (by barracuda156):

 Replying to [comment:4 exprez135]:
 > I've just attached a patch to the whisper Portfile. It's also on a
 branch on GitHub: https://github.com/exprez135/macports-ports/tree/fix-
 whisper. Are you able to test this to ensure that the build succeeds or is
 prevented gracefully?

 I got it built with a few standard fixes (will make a commit and share
 with you), but destroot does not work, since some other files do not exist
 (I commented out all metal-related stuff):
 {{{
 xinstall:
 /opt/local/var/macports/build/_opt_local_ppcports_audio_whisper/whisper/work/build/bin
 /whisper-cli ->
 /opt/local/var/macports/build/_opt_local_ppcports_audio_whisper/whisper/work/destroot/opt/local/bin/whisper
 xinstall: mkdir
 /opt/local/var/macports/build/_opt_local_ppcports_audio_whisper/whisper/work/destroot/opt/local/share/whisper
 xinstall: mkdir
 /opt/local/var/macports/build/_opt_local_ppcports_audio_whisper/whisper/work/destroot/opt/local/share/whisper/ggml
 Error: Failed to destroot whisper: xinstall: Cannot stat:
 /opt/local/var/macports/build/_opt_local_ppcports_audio_whisper/whisper/work/build/bin
 /ggml-common.h, No such file or directory
 }}}

 `bin` has the following upon completion of the build:
 {{{
 whisper-server
 bench
 main
 quantize
 whisper-bench
 whisper-cli
 }}}
 There are no header files there.


 P. S. On a side note, there is a bug in the source here:
 {{{
 /_opt_local_ppcports_audio_whisper/whisper/work/whisper.cpp-1.7.5/ggml/src
 /ggml-cpu
 -I/opt/local/var/macports/build/_opt_local_ppcports_audio_whisper/whisper/work/whisper.cpp-1.7.5/ggml/src/../include
 -F//System/Library/Frameworks -pipe -Os -DNDEBUG
 -isystem/opt/local/include/LegacySupport -I/opt/local/include
 -D_GLIBCXX_USE_CXX11_ABI=0 -std=gnu++17 -arch ppc -mmacosx-version-
 min=10.6 -fPIC -Wmissing-declarations -Wmissing-noreturn -Wall -Wextra
 -Wpedantic -Wcast-qual -Wno-unused-function -Wno-array-bounds -Wextra-semi
 -fopenmp -MD -MT ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/unary-ops.cpp.o
 -MF CMakeFiles/ggml-cpu.dir/ggml-cpu/unary-ops.cpp.o.d -o CMakeFiles/ggml-
 cpu.dir/ggml-cpu/unary-ops.cpp.o -c
 /opt/local/var/macports/build/_opt_local_ppcports_audio_whisper/whisper/work/whisper.cpp-1.7.5/ggml/src
 /ggml-cpu/unary-ops.cpp
 /opt/local/var/macports/build/_opt_local_ppcports_audio_whisper/whisper/work/whisper.cpp-1.7.5/ggml/src
 /ggml-cpu/binary-ops.cpp: In instantiation of 'void apply_binary_op(const
 ggml_compute_params*, ggml_tensor*) [with float (* op)(float, float) =
 op_add; src0_t = float; src1_t = float; dst_t = float]':
 /opt/local/var/macports/build/_opt_local_ppcports_audio_whisper/whisper/work/whisper.cpp-1.7.5/ggml/src
 /ggml-cpu/binary-ops.cpp:125:49:   required from 'void binary_op(const
 ggml_compute_params*, ggml_tensor*) [with float (* op)(float, float) =
 op_add]'
   125 |         apply_binary_op<op, float, float, float>(params, dst);
       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
 /opt/local/var/macports/build/_opt_local_ppcports_audio_whisper/whisper/work/whisper.cpp-1.7.5/ggml/src
 /ggml-cpu/binary-ops.cpp:145:22:   required from here
   145 |     binary_op<op_add>(params, dst);
       |     ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
 /opt/local/var/macports/build/_opt_local_ppcports_audio_whisper/whisper/work/whisper.cpp-1.7.5/ggml/src
 /ggml-cpu/binary-ops.cpp:79:23: error: invalid conversion from 'void
 (*)(float*, vDSP_Stride, float*, vDSP_Stride, float*, vDSP_Stride,
 vDSP_Length)' {aka 'void (*)(float*, long int, float*, long int, float*,
 long int, long unsigned int)'} to 'vDSP_fn_t' {aka 'void (*)(const float*,
 long int, const float*, long int, float*, long int, long unsigned int)'}
 [-fpermissive]
    79 |             vDSP_op = vDSP_vdiv;
       |                       ^~~~~~~~~
       |                       |
       |                       void (*)(float*, vDSP_Stride, float*,
 vDSP_Stride, float*, vDSP_Stride, vDSP_Length) {aka void (*)(float*, long
 int, float*, long int, float*, long int, long unsigned int)}
 /opt/local/var/macports/build/_opt_local_ppcports_audio_whisper/whisper/work/whisper.cpp-1.7.5/ggml/src
 /ggml-cpu/binary-ops.cpp: In instantiation of 'void apply_binary_op(const
 ggml_compute_params*, ggml_tensor*) [with float (* op)(float, float) =
 op_add; src0_t = short unsigned int; src1_t = short unsigned int; dst_t =
 short unsigned int]':
 /opt/local/var/macports/build/_opt_local_ppcports_audio_whisper/whisper/work/whisper.cpp-1.7.5/ggml/src
 /ggml-cpu/binary-ops.cpp:127:67:   required from 'void binary_op(const
 ggml_compute_params*, ggml_tensor*) [with float (* op)(float, float) =
 op_add]'
   127 |         apply_binary_op<op, ggml_fp16_t, ggml_fp16_t,
 ggml_fp16_t>(params, dst);
       |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
 /opt/local/var/macports/build/_opt_local_ppcports_audio_whisper/whisper/work/whisper.cpp-1.7.5/ggml/src
 /ggml-cpu/binary-ops.cpp:145:22:   required from here
   145 |     binary_op<op_add>(params, dst);
       |     ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
 /opt/local/var/macports/build/_opt_local_ppcports_audio_whisper/whisper/work/whisper.cpp-1.7.5/ggml/src
 /ggml-cpu/binary-ops.cpp:79:23: error: invalid conversion from 'void
 (*)(float*, vDSP_Stride, float*, vDSP_Stride, float*, vDSP_Stride,
 vDSP_Length)' {aka 'void (*)(float*, long int, float*, long int, float*,
 long int, long unsigned int)'} to 'vDSP_fn_t' {aka 'void (*)(const float*,
 long int, const float*, long int, float*, long int, long unsigned int)'}
 [-fpermissive]
    79 |             vDSP_op = vDSP_vdiv;
       |                       ^~~~~~~~~
       |                       |
 . . .
 }}}

 (But apparently upstream does not have issues allowed on GitHub, and I
 won't bother looking to report it further.)
 For gcc adding `-fpermissive` works.

-- 
Ticket URL: <https://trac.macports.org/ticket/72379#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list