-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[User] Android build fails with "ld.lld: error: undefined symbol: clGetPlatformIDs" #3525
Comments
What's the output from Edit: I think I reproduced your problem. Try this:
And run |
It works! Thank you. |
I get the same error but even after running these commands, it still persists. @staviq any ideas on what else could be the issue? Everything else from the original bug report is the same. Just trying to go through the tutorial and getting this error on the ~/llama.cpp $ pkg install libopenblas
No mirror or mirror group selected. You might want to select one by running 'termux-change-repo'
Checking availability of current mirror:
[*] https://packages-cf.termux.dev/apt/termux-main/: ok
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libopenblas is already the newest version (0.3.25).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
~/llama.cpp $ pkg install clblast
No mirror or mirror group selected. You might want to select one by running 'termux-change-repo'
Checking availability of current mirror:
[*] https://packages-cf.termux.dev/apt/termux-main/: ok
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
clblast is already the newest version (1.6.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
@miketdn Try running this as well: |
@nmeln Thanks for the suggestion but I get |
pkg i pkg-config |
@miketdn Yes, I used an incorrect name, look at @romanovj reply for a correct command. Another thing is at least on my device (Qualcomm SM8150 Snapdragon 855+) I'm getting gibberish and very slow output when compiling with clblast support. If you find that to be the case as well, I would recommend just cloning the llama.cpp repo and running Here are my settings for example (I set gpu offload to zero):
|
@ggerganov Could these commands be added to the README ? |
Still doesn't work after running |
do you have ocl-icd?
maybe you need to add to LDFLAGS |
@romanovj Yes, I'm following this section of the README (https://github.com/ggerganov/llama.cpp#building-the-project-using-termux-f-droid). I ran these two initially: They were all installed successfully. I think there must be something wrong with my phone/OS or with the instructions because I re-tried on a new phone, new installation and still get the exact same errors. I've also tried all the suggestions noted here, no luck unfortunately. I originally tried on a Pixel 6 running GrapheneOS. Now tried on a brand new Pixel 8 running GrapheneOS. |
Try running I run the
And have compiled clblast and copied the required header file and Then exited and restarted Termux. Additionally I copied openblas headers to llama.cpp folder (make sure you are in the right dir) |
I have build with these commands on fresh termux
|
Thank you @romanovj ! I ran this line: And tried it again ( |
Now after following the rest of the steps and trying to run a ./main script, I get the following error:
Wasn't able to find any other bug reports on this. Might create a new Issue ticket |
@miketdn I've encountered the same problem which seems to be a result of Android filesystem permissions. Non-rooted Termux cannot read most of the files under
|
@lainedfles That fixed it for me! Thank you for sharing! I had put off trying to get it to work, I couldn't figure it out |
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Expected Behavior
I am trying to use this tutorial to compile llama.cpp.
Current Behavior
Compilation failed.
Environment and Context
Please provide detailed information about your computer setup. This is important in case the issue is not reproducible except for under certain specific conditions.
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Vendor ID: Qualcomm
Model name: Kryo-V2
Model: 4
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
Stepping: 0xa
CPU(s) scaling MHz: 100%
CPU max MHz: 1900.8000
CPU min MHz: 300.0000
BogoMIPS: 38.00
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32
Model name: Falkor-V1/Kryo
Model: 1
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
Stepping: 0xa
CPU(s) scaling MHz: 96%
CPU max MHz: 2457.6001
CPU min MHz: 300.0000
BogoMIPS: 38.00
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32
Caches (sum of all):
L1d: 384 KiB (8 instances)
L1i: 384 KiB (8 instances)
L2: 3 MiB (2 instances)
Linux localhost 4.4.207-perf-g4f4b497d7bf8 #1 SMP PREEMPT Wed Dec 25 02:26:18 CST 2019 aarch64 Android
GNU Make 4.4.1
Built for aarch64-unknown-linux-android
Copyright (C) 1988-2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
clang version 17.0.2
Target: aarch64-unknown-linux-android24
Thread model: posix
InstalledDir: /data/data/com.termux/files/usr/bin
Steps to Reproduce
Follow the tutorial step by step.
Failure Logs
The text was updated successfully, but these errors were encountered: