-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Undefined symbols for architecture arm64: "_MTLCopyAllDevices" #1344
Comments
I'm a random person here, so please take whatever I write with a grain of salt. That said, it seems like |
I have tried your method, and it worked. Thank you for your feedback.
…On Sun, Oct 8, 2023 at 3:58 AM Ilja Bobkevic ***@***.***> wrote:
I'm a random person here, so please take whatever I write with a grain of
salt. That said, it seems like libwhisper.a is linked with a few
frameworks, that are missing in the examples makefile. Check
https://github.com/ggerganov/whisper.cpp/blob/master/Makefile which
frameworks are added for your particular environment.
For these specific symbols add -framework Foundation -framework Metal
-framework MetalKit into LDFLAGS
—
Reply to this email directly, view it on GitHub
<#1344 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGISVKH22XRU66P5OLVYBBTX6GX7XAVCNFSM6AAAAAA5TQT2BKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJRHAYDKOJSG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Apologies for my hastily reply, I try again to compile my own project, and
it reports the same error. It seems that only adding `-framework
Foundation -framework Metal -framework MetalKit` to LDFLAGS can not solve
this problem.
Sorry for my previous mistake.
…On Sun, Oct 8, 2023 at 2:16 PM xmli ***@***.***> wrote:
I have tried your method, and it worked. Thank you for your feedback.
On Sun, Oct 8, 2023 at 3:58 AM Ilja Bobkevic ***@***.***>
wrote:
> I'm a random person here, so please take whatever I write with a grain of
> salt. That said, it seems like libwhisper.a is linked with a few
> frameworks, that are missing in the examples makefile. Check
> https://github.com/ggerganov/whisper.cpp/blob/master/Makefile which
> frameworks are added for your particular environment.
> For these specific symbols add -framework Foundation -framework Metal
> -framework MetalKit into LDFLAGS
>
> —
> Reply to this email directly, view it on GitHub
> <#1344 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AGISVKH22XRU66P5OLVYBBTX6GX7XAVCNFSM6AAAAAA5TQT2BKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJRHAYDKOJSG4>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Encountering the same. For the lack of better way sharing the raw diff:
You might need For reference, my chatgpt discussion to overcome the problem: https://chat.openai.com/share/31b7f205-4c10-4cdf-a8ed-9ccbd6282dea |
…-metal env var setting
Thanks, that worked for me. I'm creating a PR and letting it fixed here in case anyone else needs it at #1530 |
* Fixed Makefile for MacOS ARM 64 based on #1344 + proper ggml-metal env var setting * conditional to fix broken non-macos compilation * spaces -> tab * make : fix whitespaces --------- Co-authored-by: Georgi Gerganov <[email protected]>
i still got link error on Apple M1 Pro 14.1.1 (23B81) :
i set the env to where .a and .h file located : |
* Fixed Makefile for MacOS ARM 64 based on ggerganov#1344 + proper ggml-metal env var setting * conditional to fix broken non-macos compilation * spaces -> tab * make : fix whitespaces --------- Co-authored-by: Georgi Gerganov <[email protected]>
* Fixed Makefile for MacOS ARM 64 based on ggerganov/whisper.cpp#1344 + proper ggml-metal env var setting * conditional to fix broken non-macos compilation * spaces -> tab * make : fix whitespaces --------- Co-authored-by: Georgi Gerganov <[email protected]>
* Fixed Makefile for MacOS ARM 64 based on ggerganov#1344 + proper ggml-metal env var setting * conditional to fix broken non-macos compilation * spaces -> tab * make : fix whitespaces --------- Co-authored-by: Georgi Gerganov <[email protected]>
I am using "Apple M1 Max", to compile the lastest commit 91c0b23, it reports the following error:
---------------command line:
cd bindings/go
make examples
-------------- error message:
if I modify whisper.go line 13 to the following code, the error message will disappear, and will produce libwhisper.a:
#cgo darwin LDFLAGS: -framework Accelerate -framework Foundation -framework Metal
however, when I compile my golang code with whiper.go, it also complains the following error message:
I do not know how to resolve such an error, can you provide any help tips?
The text was updated successfully, but these errors were encountered: