Stockfish 'make' bug in OS X

Discussion of chess software programming and technical issues.

Moderator: Ras

micron
Posts: 155
Joined: Mon Feb 15, 2010 9:33 am
Location: New Zealand

Stockfish 'make' bug in OS X

Post by micron »

Building SF on my Core i5 in OS X 10.6, and wanting to use popcnt, I tried:

Code: Select all

$ make popcnt-profile-build ARCH=osx-x86-64
...
Step 5/6. Building final executable ...
make ARCH=osx-x86-64 COMP=gcc gcc-profile-use
make ARCH=osx-x86-64 COMP=gcc \
	EXTRACXXFLAGS='-fprofile-use' \
	all
g++ -g -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -arch x86_64 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -msse -DUSE_BSFQ   -c -o bitboard.o bitboard.cpp
bitboard.cpp: In function ‘void __static_initialization_and_destruction_0(int, int)’:
bitboard.cpp:534: error: coverage mismatch for function ‘_Z41__static_initialization_and_destruction_0ii’ while reading counter ‘arcs’
bitboard.cpp:534: error: number of counters is 6 instead of 5
make[2]: *** [bitboard.o] Error 1
make[1]: *** [gcc-profile-use] Error 2
make: *** [popcnt-profile-build] Error 2
I was able to get the desired result only by hacking the makefile, so that SF starts up:

Code: Select all

Stockfish 2.0.1 64bit by Tord Romstad, Marco Costalba, Joona Kiiski
Good! CPU has hardware POPCNT.
To avoid hacking the makefile, it seems a new ARCH option is needed 'osx-x86-64-modern', with popcnt = yes.

Robert P.