Ah, try "-fPIE -pie"jdart wrote:It is built from the branch I mentioned, except -fPIE has been added to the flags.
building for Android
Moderators: hgm, Rebel, chrisw
-
- Posts: 819
- Joined: Fri Dec 01, 2006 10:46 pm
- Location: Mountain View, CA, USA
- Full name: Aart Bik
Re: building for Android
-
- Posts: 4367
- Joined: Fri Mar 10, 2006 5:23 am
- Location: http://www.arasanchess.org
Re: building for Android
Ok, I added that, and updated the executable on arasanchess.org.
--Jon
--Jon
Re: building for Android
Sofar no luck:
Code: Select all
10:18:09 folkert@belle:~/t/trunk-temop trunk(1) 130 ‡ /usr/src/android-ndk-r14b/ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=/usr/src/android-ndk-r14b/sources/third_party/vulkan/src/build-android/jni/Android.mk
[arm64-v8a] Compile++ : VkLayer_core_validation <= core_validation.cpp
/usr/src/android-ndk-r14b/sources/third_party/vulkan/src/build-android/jni/../../layers/core_validation.cpp:31:10: fatal error: 'algorithm' file not found
#include <algorithm>
^
1 error generated.
make: *** [obj/local/arm64-v8a/objs/VkLayer_core_validation/__/__/layers/core_validation.o] Error 1
10:18:16 folkert@belle:~/t/trunk-temop trunk(1) 2s 2 ‡
-
- Posts: 22
- Joined: Fri Mar 23, 2012 8:35 pm
- Location: Toronto Canada
Re: building for Android
Do you have a URL for the executable on arasanchess.org ? I looked there and could not see an Android download... (apologies if I just missed it completely!)
-
- Posts: 4367
- Joined: Fri Mar 10, 2006 5:23 am
- Location: http://www.arasanchess.org
Re: building for Android
It is not officially released yet, so not on the Web pages.
Direct link is:
https://www.arasanchess.org/arasanx-android-arm
--Jon
Direct link is:
https://www.arasanchess.org/arasanx-android-arm
--Jon
-
- Posts: 22
- Joined: Fri Mar 23, 2012 8:35 pm
- Location: Toronto Canada
Re: building for Android
Thanks! As soon as I posted the question I saw that link up thread... of course. I am a real newbie here - that doesn't seem to be .apk Am I making a bad assumption that it is an Android executable? How is that file used?
-
- Posts: 819
- Joined: Fri Dec 01, 2006 10:46 pm
- Location: Mountain View, CA, USA
- Full name: Aart Bik
Re: building for Android
This one is proper pie, but traps on an illegal instruction on any first input.jdart wrote:Ok, I added that, and updated the executable on arasanchess.org.
Code: Select all
# ./arasanx-android-arm
Arasan v20.0.0-54-g2be3283 Copyright 1994-2017 by Jon Dart. All Rights Reserved.
uci
Illegal instruction
-
- Posts: 22
- Joined: Fri Mar 23, 2012 8:35 pm
- Location: Toronto Canada
Re: building for Android
Thanks Aart. Duh. Of course... I missed the context. I enjoy using Arasan and Chess for Android - thanks to you both!
-
- Posts: 4367
- Joined: Fri Mar 10, 2006 5:23 am
- Location: http://www.arasanchess.org
Re: building for Android
What is the hardware you are using?
--Jon
--Jon
-
- Posts: 1056
- Joined: Fri Mar 10, 2006 6:07 am
- Location: Basque Country (Spain)
Re: building for Android
Unfortunately the sd-card is always mounted with "noexec" which means that you can't execute anything from here.jdart wrote:I am going to try a PIC executable because at least I can get that to build.
But the actual error I am getting now is "Permission denied". I copied the file to sdcard/My Documents and it appears that strips off the execute permissions. And the phone is not rooted so I can't change them.
It appears adb can set permissions so maybe I need to install that.
--Jon
Therefore you have to copy the executable to the local filesystem, e.g. to /data/local. In case the device is not rooted you can simply use cat: cat /sdcard/myengine > /data/local/tmp/myengine.
Then you have to set the executable permission on the executable. Chmod on android usually does not support the "u+x" syntax. Therefore you have to call chmod 555 /data/local/tmp/myengine.
Now:
cd /data/local/tmp
and
./myengine