V-Sekai / godot-whisper

An GDExtension addon for the Godot Engine that enables realtime audio transcription, supports OpenCL for most platforms, Metal for Apple devices, and runs on a separate thread.
MIT License
68 stars 7 forks source link

linux.template_release.x86_64.so fails to load on Linux #82

Open JohnTator opened 1 week ago

JohnTator commented 1 week ago

The Linux implementation of this does not function. "Can't open dynamic library: linux.template_release.x86_64.so" "Error: undefined symbol: clBuildProgram." returns in the editor when loading plugin on Linux.

Linux Kernel 6.8 Linux Mint 22

Sammyueru commented 1 week ago

Getting the same error on Pop OS (Linux)

fire commented 1 week ago

The problem seems to be that getting OpenCL to work is complex, and we're still getting ready to move to https://github.com/iree-gd/iree.gd with the Vulkan computation.

ZhenyaPav commented 1 week ago

The problem seems to be that getting OpenCL to work is complex, and we're still getting ready to move to https://github.com/iree-gd/iree.gd with the Vulkan computation.

Thank you for your answer. Do you have any timeline on when this will be ready?

fire commented 1 week ago

To solve this problem for Linux with the existing whisper, we'll have to make a build for each Linux operating system variety or pick an old base for GitHub actions. It sounds hard. Do you have any ideas?

ZhenyaPav commented 1 week ago

Is it possible to distribute the source code instead of a built library, with instructions how to build it? The other option would be to package all dependencies in the library. I'm not familiar with this addon, so can't suggest much else.

fire commented 1 week ago

As far as I know, the entire library source has already been distributed.

fire commented 1 week ago

I can try making specific Popos and Linux Mint versions via docker.

bplunkert commented 4 days ago

I don't mind doing a build myself, are there some instructions one can use to work around this problem by building from source?

Edit with answer for others: I was able to get a successful build by following the dependency build steps in the github workflow. Then after that, I followed the normal build steps.

# Build OpenCL dependency
git clone -b v2023.12.14 --recurse-submodules https://github.com/KhronosGroup/OpenCL-SDK.git
cd OpenCL-SDK
mkdir build && cd build
cmake -DOPENCL_SDK_BUILD_SAMPLES=OFF -DOPENCL_ICD_LOADER_BUILD=ON ..
make -j$(nproc)
sudo make install

# Build godot-whisper
scons platform=linux target=template_release generate_bindings=no arch=x86_64 precision=single
rm -rf samples/godot_whisper/addons
cp -rf bin/addons samples/godot_whisper/addons