fix(build): unblock Tauri build on Linux with AMD ROCm#466
Open
kinncj wants to merge 1 commit into
Open
Conversation
Two independent issues prevented `./build-gpu.sh` from completing on
Linux when an AMD ROCm GPU is detected:
1. llama-helper had no ROCm feature, and the GPU detection scripts
passed whisper-rs's `hipblas` feature name straight through to
llama-helper, which only knew about `metal`/`cuda`/`vulkan`.
- Bump llama-cpp-2 0.1.128 -> 0.1.146 (introduces `rocm` feature).
- Add `rocm = ["llama-cpp-2/rocm"]` to llama-helper.
- In build-gpu.sh / dev-gpu.sh, map whisper-rs's `hipblas` to
llama-cpp-2's `rocm` (same backend, different name) alongside
the existing coreml -> metal mapping for macOS Apple Silicon.
2. tauri-macros 2.6.1 generates both `__cmd__<fn>` and
`__tauri_command_name_<fn>` markers per #[tauri::command], and
`tauri::generate_handler!` looks up the latter. The re-exports in
summary/mod.rs and summary/summary_engine/mod.rs only re-exposed
the legacy `__cmd__*` names, so registering commands via
`summary::<fn>` from lib.rs failed with E0433.
- Add the `__tauri_command_name_*` re-exports alongside the
existing `__cmd__*` ones in both modules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
llama-helper(bumpsllama-cpp-20.1.128 → 0.1.146 to pick up therocmfeature; mapshipblas → rocminbuild-gpu.sh/dev-gpu.shalongside the existingcoreml → metalmapping).__tauri_command_name_*markers in thesummarymodules sotauri::generate_handler!resolves commands registered viasummary::<fn>fromlib.rsunder currenttauri-macros(2.6.1).Repro of the original failure
On Linux with an AMD ROCm GPU,
./build-gpu.shfirst fails at the llama-helper step:After that fix, the next build fails with:
— because
summary/mod.rsonly re-exports the legacy__cmd__*symbols.tauri-macros2.6.1 emits both__cmd__<fn>and__tauri_command_name_<fn>, andgenerate_handler!looks up the latter.Test plan
./build-gpu.shwith auto-detectedhipblas→ llama-helper builds with ROCm.TAURI_GPU_FEATURE=vulkan ./build-gpu.sh→ full build producestarget/release/bundle/{deb,appimage}/meetily_0.3.0_amd64.*.coreml → metalmapping unchanged.Out of scope (not addressed here)
libclang22 as the system default,whisper-rs-sysbindgen produces opaque structs (whisper_full_paramscollapses to just_address). Building locally requiredLIBCLANG_PATH=/usr/lib/llvm21/lib. That looks like an upstreamwhisper-rs 0.13.2/whisper-rs-sys 0.11.1incompatibility with modern libclang and is left for a separate change (probably awhisper-rsbump).whisper-rs's vendoredwhisper.cppcannot compile with--features hipblas(uses the olderhipblasGemmExsignature). Vulkan is the working AMD path with thiswhisper-rsversion; awhisper-rsbump would also resolve that.