Skip to content

[DOCS] whisper-rs: add build instructions for CUDA support on Arch Linux (GCC 15 incompatibility) #13

@guidovicino

Description

@guidovicino

Thank you for your project! It’s exactly what I was looking for. While installing it on my Arch Linux setup with Hyprland and an NVIDIA card, I ran into a few issues. I’ve explained below how I solved them, in case you’d like to add support for CUDA users.

Feature Description

Document how to build waystt with CUDA for the local Whisper models on Arch/rolling distros, including the required change in Cargo.toml (feature name is cuda).

Problem Statement

For those with an NVIDIA card, there's an option to enable CUDA to use the GPU with Whisper.

Proposed Solution

Cargo.toml – enable the correct feature:

# Local transcription
#whisper-rs = "0.15"
whisper-rs = { version = "0.15", features = ["cuda"] }

Build instructions for CUDA users

# Set CUDA paths (Arch defaults to /opt/cuda)
export CUDAToolkit_ROOT=/opt/cuda
export CUDA_HOME=/opt/cuda
export PATH="$CUDA_HOME/bin:$PATH"
export LD_LIBRARY_PATH="$CUDA_HOME/lib64:$CUDA_HOME/lib64/stubs:${LD_LIBRARY_PATH}"

# Force nvcc to use GCC 14 (needed on Arch with CUDA 12+)
# Install if missing: sudo pacman -S --needed gcc14
export CMAKE_CUDA_HOST_COMPILER=/usr/bin/g++-14
export CUDAHOSTCXX=/usr/bin/g++-14
export CMAKE_CUDA_FLAGS="--compiler-bindir=/usr/bin/g++-14 -Xcompiler=-fPIC"

# Clean and build with CUDA
cargo clean
cargo build --release --features cuda    # or: --features gpu

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions