-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Link errors using Golang bindings with WHISPER_CUBLAS=1 #1553
Comments
The same kind of issue with OPENBLAS, too:
results in:
|
If this affects anyone else then I found a workaround by building the shared library instead:
|
for reference, I had the same issue here and I was not able to build I've traced it back by trying to find the symbols that it complains about:
And instead present in the stubs directory:
See also: NVIDIA/nvidia-docker#508 |
I am building against whisper.cpp in my Go program using a CI worker that doesn't have a graphics card. So naturally, my cuda-toolkit relies on stub libraries. After banging my head on this for a while (and not being able to get libwhisper.a to link up properly), I was able to link against libwhisper.so by adding the following to my CGO_LDFLAGS:
(I also had to make a change in whisper.cpp's Makefile to link against the stubs, as indicated in #1973) Hopefully this is helpful to someone else. |
I've been working on a Go service that lives inside a Docker container and I have a working setup for this: building the whisper.cpp library and integrating it into my application worked fine.
I've been trying to extend this to use CUDA so I changed my make command to
WHISPER_CUBLAS=1 make whisper -j
and now the whisper.cpp lib still builds successfully but - when building the Go application that uses it - I get a long list of linker errors around undefined CUDA references.I've tried adding extra paths to CGO_LDFLAGS (checked that these are correct for the NVIDIA container) but no change. Is linking against the CUDA libs something that could work with CGO? Is there something I need to change with the way that the whisper.cpp library is being linked?
Here is my current Dockerfile:
Linker Errors
The text was updated successfully, but these errors were encountered: