Closed djdekker closed 7 years ago
Can you try:
DC=gdc make
If the error is still here, can you tell me which version of gdc do you use?
On my core i7 cpu, gdc compiles fine (under Linux) with gdc v2.068.
The error is still there. :(
$ gdc --version
gdc (Raspbian 4.9.2-10) 4.9.2
$ ldc2 --version
LDC - the LLVM D compiler (0.14.0):
based on DMD v2.065 and LLVM 3.5.0
Default target: arm-unknown-linux-gnueabihf
Host CPU: (unknown)
I have just bought a raspberry pi 3 (and will receive it on tuesday) , so I will see what is wrong by myself.
You can try to replace the line 750 by
return (cast (ulong) ranks[o * 4 + f]) << r;
I probably use a construct that was not available on older version of the language.
I changed line 750 to return (cast (ulong) ranks[o * 4 + f]) << r;
. The result is:
$ gdc -W -Wno-uninitialized -Wall -Wpedantic -Wextra -O3 -frelease -fno-bounds-check -o amoeba amoeba.d util.d board.d eval.d kpk.d move.d search.d uci.d weight.d
util.d:49: error: function core.bitop.bsf (uint v) is not callable using argument types (ulong)
util.d:133: error: no property 'fracSecs' for type 'const(SysTime)', did you mean 'fracSec'?
board.d:134: error: function core.bitop.bsf (uint v) is not callable using argument types (const(ulong))
board.d:750: error: cannot implicitly convert expression (o * 4LU + cast(ulong)f) of type ulong to uint
Or using ldc2:
$ ldc2 -O3 -release -singleobj -w -dw -of amoeba amoeba.d util.d board.d eval.d kpk.d move.d search.d uci.d weight.d
util.d(133): Error: no property 'fracSecs' for type 'const(SysTime)', did you mean 'fracSec'?
board.d(750): Error: cannot implicitly convert expression (o * 4LU + cast(ulong)f) of type ulong to uint
Most of the errors are due to too old versions of the language. Wait a little, I will see what I can do next week.
The ldc package in raspbian does not work at all, even if I modify my program for the compilation to be successfull, the resulting program will immediately crash. It appears this obsolete version of ldc is broken and can not even compile a simple hello world. I was able to build more recent versions of ldc2 (both 0.17.4 and 1.2.0) using the 3 year old llvm 3.5 provided by raspbian. I got a working executable, but not very fast. For gdc, I did not even try the version present with raspbian. However I am afraid the compilation of a more recent gdc may take some time. I hope to get a working compiler tomorrow, so that I can do some tests. I will then release the best executable I can (targeting arm cortex-7).
I failed to compile gdc. As I do not want to spent to much time on this, I stop here. A working binary for raspberry (3, maybe 2) is available here: https://github.com/abulmo/amoeba/releases/download/v2.4/amoeba-2.4-rpi.bz2
I'm trying to compile Amoeba on Raspberry Pi 3 (running Raspbian Linux) using gdc. This is the command I'm using to compile:
amoeba-master/src $ gdc -o amoeba *.d
And this is the output -- only these three messages and no binary: