Aaron Becker wrote:The error message suggests that the build is actually using an older compiler that doesn't understand c++11. You might need to edit make.sh to explicitly use g++-4.8 or something along those lines.
I see. How would I do that?
Zulil wrote:What's the output from
on a command line?
I get
Code: Select all
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.4-1ubuntu1~12.04' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.4 (Ubuntu/Linaro 4.6.4-1ubuntu1~12.04)
I do not know why it shows gcc version 4.6.4 because I have the 4.8.1.
Lucas wrote:Seems people have already answered. You need a C++11 capable version of GCC. Version 4.8.1 is fine, and it's the one I'm using. Ubuntu comes with GCC (C compiler only) but you have to install the package g++ separately for the C++ compiler (and C++ standard libraries).
If you have a slightly old version of GCC, it should work by replacing 'c++11' bu 'c++0x' in the 'make.sh' file. If it's really old, then it will not work.
Well I have gcc 4.8.1 as shown by the command "gcc -v" which returns
Code: Select all
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.1-2ubuntu1~12.04' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.1 (Ubuntu 4.8.1-2ubuntu1~12.04)
I have also installed the g++4.8 separately and its multilib files, via the Ubuntu Software Center.
So I don't see any reason why I would get such errors.
Nonetheless I have tried your suggestion of replacing 'c++11' by 'c++0x' in the 'make.sh' file. I could create the executable. When executing it, I'd get a core dump error, I suspect it has to do with the sse4 so I removed that part in the make.sh file. Now I can execute discocheck. I can even set the UCI_Analyse mode and a fen position. However when I type "go" or "go infinite", I get the "Segmentation fault (core dumped)" error...
My cpu is a core 2 duo E6300 at 1.86 Ghz (from 2006). Is there any hope I can run discocheck?