Last active
November 29, 2015 22:00
-
-
Save binarymax/1650078c82e6c69cc41d to your computer and use it in GitHub Desktop.
Compile Crafty Chess on Mac OSX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compiling crafty chess on MacOS, you get the following error: | |
------------------------------------------------------------- | |
~/apps/crafty/crafty-23.4:$ make darwin | |
/Applications/Xcode.app/Contents/Developer/usr/bin/make target=FreeBSD \ | |
CC=gcc CXX=g++ \ | |
CFLAGS='-Wall -pipe -O3' \ | |
CXFLAGS='-Wall -pipe -O3' \ | |
LDFLAGS= \ | |
LIBS='-lstdc++' \ | |
opt='' \ | |
crafty-make | |
gcc -Wall -pipe -O3 -DFreeBSD -c crafty.c | |
In file included from crafty.c:13: | |
In file included from ./search.c:1: | |
./chess.h:28:12: fatal error: 'malloc.h' file not found | |
# include <malloc.h> | |
^ | |
1 error generated. | |
make[2]: *** [crafty.o] Error 1 | |
make[1]: *** [crafty-make] Error 2 | |
make: *** [darwin] Error 2 | |
------------------------------------------------------------- | |
To fix the problem, you need to: | |
sudo cp /usr/include/malloc/malloc.h /usr/include/ | |
Then crafty will compile! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On OSX 10.11.1 (El Capitan), you cannot write to
/usr/include
by default, even when usingsudo
. So instead I did that and it worked: