Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Compiling whisper-rs for iOS #198

Open
BruhTheMomentum opened this issue Feb 3, 2025 · 1 comment
Open

Compiling whisper-rs for iOS #198

BruhTheMomentum opened this issue Feb 3, 2025 · 1 comment

Comments

@BruhTheMomentum
Copy link

Im trying to run a whisper through whisper-rs on iOS. I cannot build the application when using this crate. I have tried to add rustflags to the .cargo/config.toml but it did not help. any ideas?

output:

Undefined symbols for architecture arm64:
"_cblas_sgemm$NEWLAPACK$ILP64", referenced from:
ggml_backend_blas_graph_compute(ggml_backend*, ggml_cgraph*) in libapp.a42
ggml_backend_blas_graph_compute(ggml_backend*, ggml_cgraph*) in libapp.a42
ggml_backend_blas_graph_compute(ggml_backend*, ggml_cgraph*) in libapp.a42
"_vDSP_maxv", referenced from:
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
"_vDSP_sve", referenced from:
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
"_vDSP_vadd", referenced from:
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
"_vDSP_vdiv", referenced from:
_ggml_graph_compute_thread in libapp.a36
"_vDSP_vmul", referenced from:
_ggml_graph_compute_thread in libapp.a36
"_vDSP_vsmul", referenced from:
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
_ggml_graph_compute_thread in libapp.a36
...
"_vDSP_vsub", referenced from:
_ggml_graph_compute_thread in libapp.a36
ld: symbol(s) not found for architecture arm64

@n2o
Copy link
Contributor

n2o commented Feb 4, 2025

That's because you have to forgot to add the required frameworks to your project's "Other Linker Flags"

Image

On iOS and with Metal, you need to add "Accelerate" and "Metal" in your frameworks. This adds an entry into your project.pbxproj-file, for example:

				OTHER_LDFLAGS = (
					"-framework",
					Accelerate,
					"-framework",
					CoreML,
				);

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants