-
Notifications
You must be signed in to change notification settings - Fork 40
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
CMake error: Android: No CMAKE_SYSROOT was selected. #141
Comments
Hi @udexon - thank you for reporting. I just checked the problem and see several issues. First of all you selected a strange package "lib-caffe-bvlc-opencl-cpu-universal" for compilation - I don't remember what is that (@psyhtest ?) and it looks like it doesn't support Android. So I marked it as only for Linux/MacOS or Windows. Second, I am not sure if Caffe master continues supporting Android and the latest NDK - I tried to compile it for Android with latest NDK r18b and it fails. That's why you can still use our stable package "lib-caffe-bvlc-master-cpu-universal-20171013" with NDK r13b - that works. You need to do the following to test it. First of all, update CK repos (to fetch my latest update) and clean your environment so that you can use new NDK:
Then get NDK r13b and install it somewhere. Then detect it by CK as follows:
Now you can install stable Caffe for CPU as follows:
It should force various stable sub-dependencies and you can select Boost 1.64 (I tested it and it works with that version) Then you should be able to compile and run your classification example:
As for using newer NDK, unfortunately, Caffe conflicts with new libraries - it's the problem of Caffe, not CK, and sometimes we fix that by providing CK patches to the package or asking Caffe colleagues to fix problems ... And I don't know how it will work with the latest one without GCC there - I suspect lots of incompatibilities ... Please tell me if it works - we can then close this ticket! Thanks a lot for your feedback. |
Thank you for the prompt reply!! I was merely trying out the example on https://github.com/dividiti/ck-caffe/wiki/Installation under Android section: I will try your suggestions. What I intended to do is to use OpenCL on Android -- I suppose you are aware that Google does not officially support this. I have read about it on ARM Compute Library (github and ARM's own website). The only other post I read about successful case of OpenCL Android is leela-zero/leela-zero#1679. Also, there is a bazel sample which I tested partially: https://github.com/supernovaremnant/bazel-android-opencl The trouble with bazel is that the spec changed too fast -- I had to use bazel-0.14 for the old repo to work. I suppose ck and bazel are quite similar. So I mention this for your reference. I hope you find it useful. Please let me know if there is any area that you need help on. Our team is really interested in working with others to find solutions for Android OpenCL. We also work with Forth community comp.lang.forth (Newsgroup) on this matter. I am sure you realize the potential benefits of being able to run OpenCL on Android with Mali GPU? This has been a long running issue for several years. We were hoping that Android OpenCL would be a boost for cryptocurrency mining -- which I am sure you are aware that it is a huge business. |
Do you have specific OpenCL programs in mind that you wish to port to Android? How would you distribute them, via Google Play? |
There are several things need to be done before we can roll out our project as an Android app. Firstly, we aim to enable OpenCL programming in an Android app like GForth (github, Play Sotre) (If you are not familiar Forth, please visit comp.lang.forth, FORTH PROGRAMMING LANGUAGE 21st CENTURY.) Secondly, we need to port existing cryptocurrency code to Forth. This may take a few more months at least. Of course, there is interest from investors as we speak -- which hopefully will speed things up if more funds are available. I think Forth community has many age tested (50 years old!!) wisdoms that modern project like yours can benefit from -- especially in the area of graph theory. There are plenty of 60 years old ++ programmers and engineers in the forums I posted. |
Thanks a lot! It is working now. Just need to make sure I choose the correct target platform now. Thanks again for the amazing. Do let me know if I can contribute in any way. |
You are welcome, @udexon ! Though CK and Basel can be used to build packages, CK is more a workflow framework with high-level Python APIs to automate, reproduce and share experiments - package building is just one (though essential) part of it ;) ... By the way, if you have issues or feedback about CK, feel free to use our CK discussion group: https://groups.google.com/forum/#!forum/collective-knowledge I now don't work so much with OpenCL - I see that @psyhtest is following up on that - he is our OpenCL guru ;) ! As for other contributions: we more-or-less finished our proof-of-concept stage for CK this year and now raising funding to improve documentation (APIs, "how to" guides, contributor guides), provide more automatic tests, and share more components ... We plan to discuss it at the above CK mailing list! Once again thanks a lot for your positive feedback! |
@udexon I used to lead the Mali OpenCL compiler team, so I would be pleased if OpenCL was used more on Android.
Oh, I know Forth. My classmate taught himself Forth some 25 years ago! (His OS choice was similarly unconventional: he played with OS/2 Warp when Windows 95 was all the rage.:))
How do you plan to execute Forth code on Android: are there cross-compilers available? Also, OpenCL is a C/C++ API. Using it from Forth might not be trivial. I mean, everything is possible with funds :) but you may be looking at several person-years of work in addition to your crypto code porting effort. Is it really worth it? |
@psyhtest Here's a short article of mine, I hope you find it interesting: https://www.linkedin.com/pulse/multitiered-stack-machine-nsm-using-5gl-fifth-graph-ng-ph-d-/ It will be a long answer to address your comments -- which I am glad to. But I do not want to be rude to take up space here. I suggest you contact me via LinkedIn (as shown above). There is also some confidential information which I do not mind sharing with technical peers like yourself, but perhaps not here. |
@udexon Thanks. I now have more questions (e.g. what's the connection between stack machines, graphs, cryptomining) but sadly no time to pursue this further at this time... |
@psyhtest My latest post on comp.lang.forth may answer some of your questions. You are welcome to alert / contact me via LinkedIn or post a question in my github repos -- should you want to find out latest updates. |
mlcommons/ck#97
This error occurs at 2 computers I have tested. Both are x86_64 Ubuntu 18.04.
Any idea how to solve it?
Thank you very much.
The text was updated successfully, but these errors were encountered: