building CLOP with gcc 4.7 (Ubuntu 12.10)

Discussion of chess software programming and technical issues.

Moderator: Ras

jdart
Posts: 4420
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

building CLOP with gcc 4.7 (Ubuntu 12.10)

Post by jdart »

I am having some difficulty building the CLOP-0.0.9 source tree (pulled in early Dec). I am doing the first step of the build, which is "make" from the compgcc directory.

First I get this:

Code: Select all

swig -c++ -python  -I../../plot/src -I../../math/src -I../../rclib/src/util -I../../rclib/src/conui -I../../rclib/src/io -I../../_gene\
ral -I../../clop/src -I../../clop/src/real -I../../clop/src/artificial -I../../clop/src/math -DPTHREADS -DGUI=nogui -Drestrict=__restr\
ict__ -DKBHIT_UNIX -DCLOCK_FTIME -MM ../swig/clop_swig.i >../swig/clop_swig_wrap.d
compiling with ccache g++: ../../plot/compgcc/bin/CDiscretizedLine.o
compiling with ccache g++: ../../plot/compgcc/bin/CPGF.o
compiling with ccache g++: ../../plot/compgcc/bin/CPlot.o
compiling with ccache g++: ../../plot/compgcc/bin/CSplineFit.o
compiling with ccache g++: ../../plot/compgcc/bin/CContour.o
compiling with ccache g++: ../../rclib/compgcc/bin/CTimeIO.o
compiling with ccache g++: ../../rclib/compgcc/bin/ReadLineToString.o
compiling with ccache g++: ../../rclib/compgcc/bin/chtime.o
compiling with ccache g++: ../../rclib/compgcc/bin/clktimer.o
compiling with ccache g++: ../../rclib/compgcc/bin/consolui.o
compiling with ccache g++: ../../rclib/compgcc/bin/justtext.o
compiling with ccache g++: ../../rclib/compgcc/bin/mykbhit.o
compiling with ccache g++: ../../rclib/compgcc/bin/mybeep.o
compiling with ccache g++: ../../rclib/compgcc/bin/readstr.o
../../rclib/src/util/readstr.cpp: In function âint ReadString(std::istream&, char*, int)â:
../../rclib/src/util/readstr.cpp:47:19: warning: conversion to âcharâ from âintâ may alter its value [-Wconversion]
compiling with ccache g++: ../../rclib/compgcc/bin/userflag.o
compiling with ccache g++: ../../rclib/compgcc/bin/version.o
compiling with ccache g++: ../../clop/compgcc/bin/C2SPSA.o
../../clop/src/C2SPSA.cpp: In member function âvirtual void C2SPSA::OnOutcome(int)â:
../../clop/src/C2SPSA.cpp:80:16: warning: unused variable âa_kâ [-Wunused-variable]
compiling with ccache g++: ../../clop/compgcc/bin/CArtificialExperiment.o
compiling with ccache g++: ../../clop/compgcc/bin/CArtificialProblem.o
compiling with ccache g++: ../../clop/compgcc/bin/CBAST.o
compiling with ccache g++: ../../clop/compgcc/bin/CCheckPointData.o
compiling with ccache g++: ../../clop/compgcc/bin/CCPLConsole.o
In file included from ../../clop/src/artificial/CCPLConsole.h:14:0,
                 from ../../clop/src/artificial/CCPLConsole.cpp:10:
../../rclib/src/util/userflag.h:27:9: error: âsize_tâ does not name a type
make: *** [../../clop/compgcc/bin/CCPLConsole.o] Error 1
-UUU:----F1  errors         Bot L84    (Fundamental)-----------------------------------------------------------------------------------

and I fixed that by adding

#include <cstring>

to the userflag.h file.

Then I get:

Code: Select all

ccache g++ -Wall -O0 -fno-strict-aliasing -I/usr/include/python2.6 -I/usr/include/python2.5  -g -pthread -fpic  -I../../plot/src -I../../math/src -I../../rclib/src/util -I../../rclib/src/conui -I../../rclib/src/io -I../../_general -I../../clop/src -I../../clop/src/real -I../../clop/src/artificial -I../../clop/src/math -DPTHREADS -DGUI=nogui -Drestrict=__restrict__ -DKBHIT_UNIX -DCLOCK_FTIME -c -o ../swig/clop_swig_wrap.o ../swig/clop_swig_wrap.cxx
../swig/clop_swig_wrap.cxx:149:20: fatal error: Python.h: No such file or directory
compilation terminated.
I do have python-dev installed, and Python.h is in /usr/include/python2.7.

--Jon
Tom Likens
Posts: 303
Joined: Sat Apr 28, 2012 6:18 pm
Location: Austin, TX

Re: building CLOP with gcc 4.7 (Ubuntu 12.10)

Post by Tom Likens »

jdart wrote:I am having some difficulty building the CLOP-0.0.9 source tree (pulled in early Dec). I am doing the first step of the build, which is "make" from the compgcc directory.
Remi has this line in the README file, which may help:

Code: Select all

Required Ubuntu packages:
sudo apt-get install ccache g++ swig python-dev libgsl0-dev libboost-dev libboost-thread-dev libboost-filesystem-dev libboost-date-time-dev gnuplot libqt4-dev
This definitely worked on 12.04 LTS (which you probably already know).

regards,
--tom
Tom Likens
Posts: 303
Joined: Sat Apr 28, 2012 6:18 pm
Location: Austin, TX

Re: building CLOP with gcc 4.7 (Ubuntu 12.10)

Post by Tom Likens »

jdart wrote:Then I get:

Code: Select all

ccache g++ -Wall -O0 -fno-strict-aliasing -I/usr/include/python2.6 -I/usr/include/python2.5  -g -pthread -fpic  -I../../plot/src -I../../math/src -I../../rclib/src/util -I../../rclib/src/conui -I../../rclib/src/io -I../../_general -I../../clop/src -I../../clop/src/real -I../../clop/src/artificial -I../../clop/src/math -DPTHREADS -DGUI=nogui -Drestrict=__restrict__ -DKBHIT_UNIX -DCLOCK_FTIME -c -o ../swig/clop_swig_wrap.o ../swig/clop_swig_wrap.cxx
../swig/clop_swig_wrap.cxx:149:20: fatal error: Python.h: No such file or directory
compilation terminated.
I do have python-dev installed, and Python.h is in /usr/include/python2.7.

--Jon
Jon,

I think you need to install python3.2-dev or python3-dev for 12.10.

regards,
--tom
jdart
Posts: 4420
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: building CLOP with gcc 4.7 (Ubuntu 12.10)

Post by jdart »

I think you need to install python3.2-dev or python3-dev for 12.10.
I don't think so. The problem appears to be, the compile is explicitly looking for python 2.5 or 2.6 (not 2.7, which is installed).

I fixed it by defining:

export INCLUDES=-I/usr/include/python2.7

--Jon