LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Compiling Crafty in Slackware64 13 (https://www.linuxquestions.org/questions/slackware-14/compiling-crafty-in-slackware64-13-a-769772/)

arubin 11-17-2009 04:58 PM

Compiling Crafty in Slackware64 13
 
Has anyone managed to compile the chess engine crafty? This is what I get when I try:

Quote:

alan@LavanKossot:~/packages/crafty-23.0$ make linux-amd64
make target=LINUX \
CC=gcc CXX=g++ \
CFLAGS=' -Wall -pipe \
-fbranch-probabilities -fomit-frame-pointer -O3 -march=k8' \
CXFLAGS= \
LDFLAGS=' -lpthread -lnuma -lstdc++' \
opt=' -DINLINE64 -DCPUS=8 -DNUMA -DLIBNUMA' \
crafty-make
make[1]: Entering directory `/home/alan/packages/crafty-23.0'
make[2]: Entering directory `/home/alan/packages/crafty-23.0'
gcc -Wall -pipe \
-fbranch-probabilities -fomit-frame-pointer -O3 -march=k8 -DINLINE64 -DCPUS=8 -DNUMA -DLIBNUMA -DLINUX -c crafty.c
In file included from crafty.c:44:
main.c:9:20: error: numa.h: No such file or directory
In file included from crafty.c:44:
main.c: In function 'main':
main.c:3833: warning: implicit declaration of function 'numa_available'
main.c:3836: warning: implicit declaration of function 'numa_node_to_cpus'
main.c:3838: warning: implicit declaration of function 'numa_max_node'
make[2]: *** [crafty.o] Error 1
make[2]: Leaving directory `/home/alan/packages/crafty-23.0'
make[1]: *** [crafty-make] Error 2
make[1]: Leaving directory `/home/alan/packages/crafty-23.0'
make: *** [linux-amd64] Error 2
alan@LavanKossot:~/packages/crafty-23.0$

gnashley 11-18-2009 02:37 AM

You need libnuma for AMD64 arch:
http://ftp.de.debian.org/debian/pool....3.orig.tar.gz
http://ftp.de.debian.org/debian/pool....0.3-1.diff.gz

You may also find helpful fixes in the debain patch for crafty itself as crafty has pretty sloppy sources:
http://ftp.de.debian.org/debian/pool...2.10-4.diff.gz

arubin 11-18-2009 12:46 PM

Well I installed the libnuma but it still won't compile.

I do not know what I am supposed to do with the patch files.

Quote:

make target=LINUX \
CC=gcc CXX=g++ \
CFLAGS=' -Wall -pipe \
-fbranch-probabilities -fomit-frame-pointer -O3 -march=k8' \
CXFLAGS= \
LDFLAGS=' -lpthread -lnuma -lstdc++' \
opt=' -DINLINE64 -DCPUS=8 -DNUMA -DLIBNUMA' \
crafty-make
make[1]: Entering directory `/home/alan/packages/crafty-23.0'
make[2]: Entering directory `/home/alan/packages/crafty-23.0'
gcc -Wall -pipe \
-fbranch-probabilities -fomit-frame-pointer -O3 -march=k8 -DINLINE64 -DCPUS=8 -DNUMA -DLIBNUMA -DLINUX -c crafty.c
In file included from crafty.c:44:
main.c: In function 'main':
main.c:3836: warning: passing argument 2 of 'numa_node_to_cpus' from incompatible pointer type
main.c:3836: error: too many arguments to function 'numa_node_to_cpus'
make[2]: *** [crafty.o] Error 1
make[2]: Leaving directory `/home/alan/packages/crafty-23.0'
make[1]: *** [crafty-make] Error 2
make[1]: Leaving directory `/home/alan/packages/crafty-23.0'
make: *** [linux-amd64] Error 2

gnashley 11-19-2009 12:54 AM

Did you install numa manually -I mean using 'make install'? If so, you'd need to run ldconfig afterwards to register the new libs in ld.so.cache.

Nille_kungen 11-19-2009 01:44 AM

I see that you use crafty-23.0 and not the latest crafty-23.1.
About libnuma there's an numactl-2.0.4-rc1 but i don't know if that version works any better.

ftp://oss.sgi.com/www/projects/libnuma/download/
http://www.craftychess.com/

Now i haven't tried compiling but i would start with the latest version.

arubin 11-19-2009 03:11 AM

No I used src2pkg and installed the tgz.

I have now got crafty-22.1 compiled. 23.0 and 23.1 both give the same error.


All times are GMT -5. The time now is 04:36 AM.