Hi all,
Jim Ablett managed to compile Dirty for Android. Thanks a lot Jim.
It may run under Aart Bik's Chess for Android GUI
http://www.aartbik.com/MISC/android.html
and can be downloaded at :
http://www.dirtychess.com/release/beta/ ... ndroid.rar
We have not checked it out (no android device available) so any feedback is very welcome.
Dirty for Android
Moderators: hgm, Rebel, chrisw
-
- Posts: 557
- Joined: Sun Feb 18, 2007 11:07 pm
- Location: Almeria. SPAIN
Dirty for Android
Saludos, Andres
-
- Posts: 819
- Joined: Fri Dec 01, 2006 10:46 pm
- Location: Mountain View, CA, USA
- Full name: Aart Bik
Re: Dirty for Android
Hi Andres,Andres Valverde wrote:We have not checked it out (no android device available) so any feedback is very welcome.
I did a quick test, and the binary runs fine on an Android device. However, Chess for Android only supports the UCI protocol, not winboard (sorry), so currently it won't run in this GUI. Perhaps this may motivate you to add the UCI protocol to your engine?
Regards,
Aart
-
- Posts: 2129
- Joined: Thu May 29, 2008 10:43 am
Re: Dirty for Android
from protocol.cppabik wrote:Hi Andres,Andres Valverde wrote:We have not checked it out (no android device available) so any feedback is very welcome.
I did a quick test, and the binary runs fine on an Android device. However, Chess for Android only supports the UCI protocol, not winboard (sorry), so currently it won't run in this GUI. Perhaps this may motivate you to add the UCI protocol to your engine?
Regards,
Aart
Fruit 2.1 (2005) Fabien Letouzey:
// start position
if (fen != NULL) { // "fen" present
if (moves != NULL) { // "moves" present
ASSERT(moves>fen);
moves[-1] = '\0'; // dirty, but so is UCI
}
!! ??
Now you have it from the horse's mouth:
UCI is dirty!
Therefore Dirty should be UCI!
?
-
- Posts: 557
- Joined: Sun Feb 18, 2007 11:07 pm
- Location: Almeria. SPAIN
Re: Dirty for Android
Thanks Aart!abik wrote:Hi Andres,Andres Valverde wrote:We have not checked it out (no android device available) so any feedback is very welcome.
I did a quick test, and the binary runs fine on an Android device. However, Chess for Android only supports the UCI protocol, not winboard (sorry), so currently it won't run in this GUI. Perhaps this may motivate you to add the UCI protocol to your engine?
Regards,
Aart
We'll have to wait for your GUI supporting WB engines
Saludos, Andres
-
- Posts: 557
- Joined: Sun Feb 18, 2007 11:07 pm
- Location: Almeria. SPAIN
Re: Dirty for Android
We guess it's Dirty enough yetkranium wrote:
Therefore Dirty should be UCI!
?
Saludos, Andres
-
- Posts: 27795
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Dirty for Android
What tools do you use to build these Android apps?
Someone is trying to build a Xiangqi app with my engine in it, using Cygwin g++ plus Adobe tools. But he has big problems with it. In emulation we crash due to a run-time error (a bad pointer), and debugging it leads to ' impossible' output: when we print p, Z[p], Z[0], and Z[0*p] it prints 0, a nonsense value that causes segfaulting when used as a pointer (as in Z[p][sqr]; Z are the Zobrist keys), and then two valid pounter values. So Z[0] and Z[p] do not produce the same result even when p=0.
So there must be a compiler or emulator error somewhere, but we have no idea where. "g++ -S" does not produce any assembly code we can check for correctness.
Someone is trying to build a Xiangqi app with my engine in it, using Cygwin g++ plus Adobe tools. But he has big problems with it. In emulation we crash due to a run-time error (a bad pointer), and debugging it leads to ' impossible' output: when we print p, Z[p], Z[0], and Z[0*p] it prints 0, a nonsense value that causes segfaulting when used as a pointer (as in Z[p][sqr]; Z are the Zobrist keys), and then two valid pounter values. So Z[0] and Z[p] do not produce the same result even when p=0.
So there must be a compiler or emulator error somewhere, but we have no idea where. "g++ -S" does not produce any assembly code we can check for correctness.
-
- Posts: 1383
- Joined: Fri Jul 14, 2006 7:56 am
- Location: London, England
- Full name: Jim Ablett
Re: Dirty for Android
Hi Harm,hgm wrote:What tools do you use to build these Android apps?
Someone is trying to build a Xiangqi app with my engine in it, using Cygwin g++ plus Adobe tools. But he has big problems with it. In emulation we crash due to a run-time error (a bad pointer), and debugging it leads to ' impossible' output: when we print p, Z[p], Z[0], and Z[0*p] it prints 0, a nonsense value that causes segfaulting when used as a pointer (as in Z[p][sqr]; Z are the Zobrist keys), and then two valid pounter values. So Z[0] and Z[p] do not produce the same result even when p=0.
So there must be a compiler or emulator error somewhere, but we have no idea where. "g++ -S" does not produce any assembly code we can check for correctness.
CodeSourcery is all you need to cross-compile Arm executables for Android on Windows or Linux platform (Download the EABI version)
http://www.codesourcery.com/sgpp/lite/a ... plate=lite
You need to statically link the executable and in the case of pthreads you need to statically link the whole library. Here is an command line example (compiling Redqueen engine):
Code: Select all
arm-none-eabi-g++.exe -o redqueen *.cpp -fomit-frame-pointer -fno-rtti -fexceptions -fstrict-aliasing -march=armv5te -O3 -Wno-deprecated -pipe -funroll-all-loops -funsafe-math-optimizations -ffast-math -static -s -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -lc -lm -ldl
http://www.acmesystems.it/foxg20/doku.p ... al:eclipse
Jim.
-
- Posts: 819
- Joined: Fri Dec 01, 2006 10:46 pm
- Location: Mountain View, CA, USA
- Full name: Aart Bik
Re: Dirty for Android
Most people use the CodeSoucery toolchain for arm, and generate a static binary. Alternatively, the compiler toolchain of the Google NDK can be used, which allows dynamic linking (in fact, even in the former case, dynamic linking is possible, but this requires some bookkeeping to make it work).hgm wrote:What tools do you use to build these Android apps?
-
- Posts: 1383
- Joined: Fri Jul 14, 2006 7:56 am
- Location: London, England
- Full name: Jim Ablett
Re: Dirty for Android
There is also Yagarto toolchain which looks pretty similar to CodeSourcery, but doesn't seem to support pthreads.
http://www.yagarto.de/
Jim.
http://www.yagarto.de/
Jim.
-
- Posts: 2055
- Joined: Mon Mar 13, 2006 2:31 am
- Location: North Carolina, USA
Re: Dirty for Android
Hi Jim,Jim Ablett wrote:Hi Harm,hgm wrote:What tools do you use to build these Android apps?
Someone is trying to build a Xiangqi app with my engine in it, using Cygwin g++ plus Adobe tools. But he has big problems with it. In emulation we crash due to a run-time error (a bad pointer), and debugging it leads to ' impossible' output: when we print p, Z[p], Z[0], and Z[0*p] it prints 0, a nonsense value that causes segfaulting when used as a pointer (as in Z[p][sqr]; Z are the Zobrist keys), and then two valid pounter values. So Z[0] and Z[p] do not produce the same result even when p=0.
So there must be a compiler or emulator error somewhere, but we have no idea where. "g++ -S" does not produce any assembly code we can check for correctness.
CodeSourcery is all you need to cross-compile Arm executables for Android on Windows or Linux platform (Download the EABI version)
http://www.codesourcery.com/sgpp/lite/a ... plate=lite
You need to statically link the executable and in the case of pthreads you need to statically link the whole library. Here is an command line example (compiling Redqueen engine):Here is a nice tutorial for using within the Eclipse gui >Code: Select all
arm-none-eabi-g++.exe -o redqueen *.cpp -fomit-frame-pointer -fno-rtti -fexceptions -fstrict-aliasing -march=armv5te -O3 -Wno-deprecated -pipe -funroll-all-loops -funsafe-math-optimizations -ffast-math -static -s -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -lc -lm -ldl
http://www.acmesystems.it/foxg20/doku.p ... al:eclipse
Jim.
I downloaded the lite version of the compiler and after some source mods got it to compile Ares. There is still a problem. It doesn't link and it says " .... can not find -ldl".
A quick read of the getting started manual says I have to use the -T option to define a linking script. The tables show scripts for specific processors, but none are what I have. This doesn't make much sense anyway, because there must be a generic option to support multiple Android devices.
What have I missed that will make this work?
Charles