Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go bindings fail to compile on Windows because of incorrect Make target name #2582

Open
dharmab opened this issue Nov 22, 2024 · 1 comment

Comments

@dharmab
Copy link

dharmab commented Nov 22, 2024

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

Problematic line

@dharmab
Copy link
Author

dharmab commented Nov 23, 2024

Workaround: 810260f

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 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant