whisper.cpp
whisper.cpp copied to clipboard
Go bindings fail to compile on Windows because of incorrect Make target name
Makefile for Go bindings has a hardcoded libwhisper.a, however on Windows this object (and target) is named whisper.a
make -C third_party/whisper.cpp/bindings/go whisper
make[1]: Entering directory '/d/a/skyeye/skyeye/third_party/whisper.cpp/bindings/go'
Mkdir build
Mkdir models
Build whisper
make[2]: Entering directory '/d/a/skyeye/skyeye/third_party/whisper.cpp'
which: no ccache in (/ucrt64/bin:/usr/local/bin:/usr/bin:/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
I ccache not found. Consider installing it for faster compilation.
I whisper.cpp build info:
I UNAME_S: MINGW64_NT-10.0-20348
I UNAME_P: unknown
I UNAME_M: x86_64
I CFLAGS: -Iggml/include -Iggml/src -Iinclude -Isrc -Iexamples -D_XOPEN_SOURCE=600 -DNDEBUG -D_WIN32_WINNT=0x602 -DGGML_USE_OPENMP -std=c11 -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Werror=implicit-function-declaration -march=native -mtune=native -Xassembler -muse-unaligned-vector-move -fopenmp -Wdouble-promotion
I CXXFLAGS: -std=c++11 -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wmissing-declarations -Wmissing-noreturn -Xassembler -muse-unaligned-vector-move -fopenmp -march=native -mtune=native -Wno-array-bounds -Wno-format-truncation -Wextra-semi -Iggml/include -Iggml/src -Iinclude -Isrc -Iexamples -D_XOPEN_SOURCE=600 -DNDEBUG -D_WIN32_WINNT=0x602 -DGGML_USE_OPENMP
I NVCCFLAGS: -std=c++11 -O3
I LDFLAGS:
I CC: cc.exe (Rev2, Built by MSYS2 project) 14.2.0
I CXX: c++.exe (Rev2, Built by MSYS2 project) 14.2.0
make[2]: *** No rule to make target 'libwhisper.a'. Stop.
make[2]: Leaving directory '/d/a/skyeye/skyeye/third_party/whisper.cpp'
make[1]: *** [Makefile:33: whisper] Error 2
make[1]: Leaving directory '/d/a/skyeye/skyeye/third_party/whisper.cpp/bindings/go'
make: *** [Makefile:125: third_party/whisper.cpp/whisper.a] Error 2
Workaround: https://github.com/ggerganov/whisper.cpp/commit/810260fb2bae3ae7f5be54a95bc8c66b6d19a474
It's kind of fragile, it'll probably break if the Makefile target changes again. I ended up having to rename the file back to libwhisper.a afterwards to make it play nice with ld on MSYS2 🙃
I have also got this issue. I am on Linux (Ubuntu 24.04.1 LTS noble).
Mkdir build
Mkdir models
Build whisper
make[1]: Entering directory '/home/me/whisper.cpp'
I ccache not found. Consider installing it for faster compilation.
I whisper.cpp build info:
I UNAME_S: Linux
I UNAME_P: x86_64
I UNAME_M: x86_64
I CFLAGS: -Iggml/include -Iggml/src -Iinclude -Isrc -Iexamples -D_XOPEN_SOURCE=600 -D_GNU_SOURCE -DNDEBUG -DGGML_USE_OPENMP -std=c11 -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Werror=implicit-function-declaration -pthread -march=native -mtune=native -fopenmp -Wdouble-promotion
I CXXFLAGS: -std=c++11 -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wmissing-declarations -Wmissing-noreturn -pthread -fopenmp -march=native -mtune=native -Wno-array-bounds -Wno-format-truncation -Wextra-semi -Iggml/include -Iggml/src -Iinclude -Isrc -Iexamples -D_XOPEN_SOURCE=600 -D_GNU_SOURCE -DNDEBUG -DGGML_USE_OPENMP
I NVCCFLAGS: -std=c++11 -O3
I LDFLAGS:
I CC: cc (Ubuntu 13.2.0-23ubuntu4) 13.2.0
I CXX: c++ (Ubuntu 13.2.0-23ubuntu4) 13.2.0
make[1]: *** No rule to make target 'libwhisper.a'. Stop.
make[1]: Leaving directory '/home/me/whisper.cpp'
make: *** [Makefile:33: whisper] Error 2
same error on macOS Sonoma on Sillicon
go % make test
Mkdir build
Mkdir models
Build whisper
make[1]: *** No rule to make target `libwhisper.a'. Stop.
make: *** [whisper] Error 2