Hello friends,
I'm able to compile & run the latest "stockfish chess engine" sources using GCC 4.8 or later on Redhat EL 7.X. The latest source code (alongwith README) is available at
https://github.com/mcostalba/Stockfish/tree/master
The commands to compile & build are: (goto "src" directory)
Code:
gmake build ARCH=x86-64
gmake install
However my requirement is to compile & run the same on Redhat EL 6.7 Server where the latest GCC version available is 4.4.7 (& glibc 2.12) as I can NOT upgrade GCC version without actually migrating to RHEL 7.X
Is it possible to modify the latest source to get it compliled & run on old version of gcc/glibc? if yes, would anyone be able to modify the sources (perhaps just Makefile?) for me please?
I tried changing "C ++ 11" to "C ++ 0x" in the "Makefile" but no luck. Please see the error I'm getting when I try to compile latest SF source with GCC 4.4.7:
Code:
[root@test-server src]# ldd --version
ldd (GNU libc) 2.12
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
[root@test-server src]# gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@test-server src]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.7 (Santiago)
[root@test-server src]# uname -r
2.6.32-573.12.1.el6.x86_64
[root@test-server src]# gmake build ARCH=x86-64
gmake ARCH=x86-64 COMP=gcc config-sanity
gmake[1]: Entering directory `/root/Stockfish-master/src'
Config:
debug: 'no'
optimize: 'yes'
arch: 'x86_64'
bits: '64'
prefetch: 'yes'
popcnt: 'no'
sse: 'yes'
pext: 'no'
Flags:
CXX: g++
CXXFLAGS: -Wall -Wcast-qual -fno-exceptions -fno-rtti -std=c++11 -pedantic -Wextra -Wshadow -m64 -DNDEBUG -O3 -DIS_64BIT -msse -flto
LDFLAGS: -Wl,--no-as-needed -lpthread -Wall -Wcast-qual -fno-exceptions -fno-rtti -std=c++11 -pedantic -Wextra -Wshadow -m64 -DNDEBUG -O3 -DIS_64BIT -msse -flto
Testing config sanity. If this fails, try 'make help' ...
gmake[1]: Leaving directory `/root/Stockfish-master/src'
gmake ARCH=x86-64 COMP=gcc all
gmake[1]: Entering directory `/root/Stockfish-master/src'
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -std=c++11 -pedantic -Wextra -Wshadow -m64 -DNDEBUG -O3 -DIS_64BIT -msse -flto -c -o benchmark.o benchmark.cpp
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-flto"
gmake[1]: * [benchmark.o] Error 1
gmake[1]: Leaving directory `/root/Stockfish-master/src'
gmake: * [build] Error 2
[root@test-server src]#
Many thanks in advance!