whisper.cpp
whisper.cpp copied to clipboard
Golang Bindings Error
I would like to start by saying a big thank you for all the work that you put into maintaining and developing this project. My issue is with regards to the golang bindings. As I try to initialise the model, I get the following error.
../go/pkg/mod/github.com/ggerganov/whisper.cpp/bindings/[email protected]/params.go:11:10: fatal error: 'whisper.h' file not found #include <whisper.h>
Does anyone has any idea why this might happen?
The same thing happens when I try to run the whisper_test file.
Running tool: /opt/homebrew/bin/go test -timeout 30s -coverprofile=/var/folders/y0/dbsx2zd55lz31wt__nmdgm840000gn/T/vscode-goJry90s/go-code-cover github.com/ggerganov/whisper.cpp/bindings/go
github.com/ggerganov/whisper.cpp/bindings/go
/var/folders/y0/dbsx2zd55lz31wt__nmdgm840000gn/T/go-build3341714362/b084/params.cover.go:11:10: fatal error: 'whisper.h' file not found #include <whisper.h> ^~~~~~~~~~~ 1 error generated. FAIL github.com/ggerganov/whisper.cpp/bindings/go [build failed] FAIL
When I run the tests from the make file everything works fine, whilst when I run the package test, it fails with the error above
I believe this has been resolved at some point. Feel free to reopen if problem persists
mbaxamb3333 This typically means you need to tell the go compiler where your whisper.cpp files are located. Try setting these environment variables
export CGO_CFLAGS=-I/path/to/whisper.cpp/ export CGO_LDFLAGS=-L/path/to//whisper.cpp/
On Thu, 16 Feb 2023 at 04:38, Georgi Gerganov @.***> wrote:
I believe this has been resolved at some point. Feel free to reopen if problem persists
— Reply to this email directly, view it on GitHub https://github.com/ggerganov/whisper.cpp/issues/418#issuecomment-1431835186, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALQR6YJHPDHVD4JYZ6MEL3WXUPDPANCNFSM6AAAAAAT5Q73H4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Sincerely
Jay
@jaybinks Do we not have to tell compiler to look into the include/ subdirectory in whisper.cpp
@ggerganov
INCLUDE_PATH and LIBRARY_PATH in bindings/go/Makefile refer to the parent folder, but the whisper.h file and ggml.h files are in whisper.cpp/include/ and whisper.cpp/ggml/include folders respectively.
Isn't that why the missing .h file error pops up. Do we need to update the Makefile? Or copy the .h files to parent dir.
fatal error: 'whisper.h' file not found #include <whisper.h>
What am I missing here?
Yes, likely caused by the recent #2256. Feel free to open a PR with fixes