Part 1. GnuShogi
allrighty, got myself all set up with the official toolchain, and set about making gnushogi compile for the iliad, I've been successful, but I've no way to test it at the moment, as my iliad has not yet arrived!
So, what I had to do:
first step, obviously, was to find the source to gnushogi, easy enough as it's a GNU package:
http://www.cs.caltech.edu/~mvanier/h...i-1.3.2.tar.gz
So, naively, I try a ./configure --host=arm-linux, and it starts complaining about not being able to detect the build architecture, ./configure --host=arm-linux --build=i686 fixes that no worries!
so, it needs libXaw, hrm. this could be fun!
Turns out that libXaw needs a bunch of things: Xext, Xextproto, printproto, Xpm, Xmu. Which are found easily enough on
freedekstop.org
Some of them are tricky to comiple. Xext being one of them, you have to edit the configure script at line 20405, so that it doesn't exit when it finds you're cross compiling and can't determine the output of malloc. I think another way to get out of this is to do:
Code:
$ export ac_cv_func_malloc_0_nonnull=yes
which is required for libXmu anyway.
Then once all that's compiled and installed, gnushogi still doesn't compile, as it doesn't tell arm-linux-gcc where the library and header files are, but type in make and wait for it to break, then:
Code:
cd xshogi
arm-linux-gcc -c xshogi.c -Wall -Wno-implicit-int -Wstrict-prototypes -ansi -pedantic -g -O2 -fsigned-char -funroll-loops -I.. -DFIRST_SHOGI_PROGRAM=\"gnushogi\" -DSECOND_SHOGI_PROGRAM=\"gnushogi\" -DFIRST_HOST=\"localhost\" -DSECOND_HOST=\"localhost\" -I/path to/where/you/installed/stuff
cd ..
and tell gcc where the include files are, with the final -I argument. Then try make again, which breaks again! We find that the makefile doesn't tell gcc where the libraries are kept, so similar idea to the above:
Code:
cd xshogi
arm-linux-gcc -o xshogi xshogi.o parser.o -g -O2 -fsigned-char -funroll-loops -I.. -lXaw -lXmu -lXt -lXext -lX11 -lXpm -L/home/pwarren/gnushogi/lib/ -L/usr/local/arm/oe/arm-linux/lib
CD ..
so, add in where you installed stuff to, and and the '-lXpm' argument as well.
Then it should compile properly!
Next is the install, the Makefile tries to strip the binaries when installing, so you have to either:
Code:
alias strip='arm-linux-strip'
or edit the gnushogi/Makefile and xshogi/Makefile. And then you should be able to make install!
So there we have it, and I have compiled xshogi for the iliad, I'll attach a tar.gz wiith the compiled libraries and binaries to this thread.
Not sure what to do for my next trick, but I'll think of something