help for a linux develop environment

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

elcabesa
Posts: 855
Joined: Sun May 23, 2010 1:32 pm

help for a linux develop environment

Post by elcabesa »

hi, I use Linux at home for everything but chess development and I'd like to change the state of the things.

I mainly use kubuntu and as you can image kde.
1) what development environment can you suggest? I was thinking about Eclipse, so I can reuse it for windows too.
2) what compilers are available for linux? I'd like to test my engine with more than one compiler and have it work in a deterministic way, giving always the same result independent from the compiler
3) what chess testing environment are available in linux? i'd like to test the engine with cutechess, but I also would like to test it against pgn/epd file.

thank you all for your help
User avatar
pocopito
Posts: 238
Joined: Tue Jul 12, 2011 1:31 pm

Re: help for a linux develop environment

Post by pocopito »

Hi Marco

One of the "issues" with linux is that sometimes you have too much options :)

If you feel comfi using eclipse just keep on it. On the other hand, if you are in the mood for testing new tools qt-creator can be a good idea (don't get tricked by the "qt" in its name, it can perfectly handle C/C++ projects).

About the compiler... it seems for no reason I've given for granted you're working on C/C++. In that case the first option is gcc. clang is an interesting compiler too. You also have some tools available like cppcheck, a code analyzer for C/C++.

Just one suggestion: if you've never used it, start using git for version control. Besides, in places like github and bitbucket you can create remote repositories for free (for example, Stockfis code is placed in https://github.com/mcostalba/Stockfish).
Git has lots of features, but for a simple project with a single user, you just need a couple of commands to do 99% of the stuff.

Best

E Diaz
Two first meanings of the dutch word "leren":
1. leren [vc] (learn, larn, acquire) acquire or gain knowledge or skills.
2. leren [v] (teach, learn, instruct) impart skills or knowledge to.
elcabesa
Posts: 855
Joined: Sun May 23, 2010 1:32 pm

Re: help for a linux develop environment

Post by elcabesa »

I'd like to use c++ and some c++11 feature like portable thread library.

I'd give a check to qt-creator since I like qt too :)

I already use git and have an account with code.google, i relly need a version management and branch manager :)

what about game and automatic testing of an engine? in windows I was used to use cutechess and arena
syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: help for a linux develop environment

Post by syzygy »

elcabesa wrote:in windows I was used to use cutechess and arena
You can compile cutechess for Linux.

For development I use vim/gvim, gcc and gdb.
elcabesa
Posts: 855
Joined: Sun May 23, 2010 1:32 pm

Re: help for a linux develop environment

Post by elcabesa »

what about testing epd files with and engine? I would like to not reinvent the wheel
User avatar
pocopito
Posts: 238
Joined: Tue Jul 12, 2011 1:31 pm

Re: help for a linux develop environment

Post by pocopito »

For engine testing I guess cutechess-cli is a nice tool. It can be bit hard to use if you are not used to to scripts, but the doc gives some clear examples.

I guess that Arena works fine on linux under wine. In that case I guess you should compile a windows version of your engine under linux... but I'm not pretty sure about this point.

Another good option for engine testing is xboard.
Two first meanings of the dutch word "leren":
1. leren [vc] (learn, larn, acquire) acquire or gain knowledge or skills.
2. leren [v] (teach, learn, instruct) impart skills or knowledge to.
elcabesa
Posts: 855
Joined: Sun May 23, 2010 1:32 pm

Re: help for a linux develop environment

Post by elcabesa »

I already use cutechess for engine vs egnie match on windows and I'm used to his script interface :)

i just find now that xboard do the epd testing :)
geko
Posts: 36
Joined: Fri Sep 06, 2013 11:20 am
Location: Italy
Full name: Giuseppe Cannella

Re: help for a linux develop environment

Post by geko »

Ciao Marco,
i use linux Mint with Mate for many years, codeblocks, gcc 4.8.1, gdb, valgrind, gprof, cutechess-cli bayeselo, clop, polyglot, svn, Arena with wine, something Xboard and bash shell for testing.

in windows i use mingw 4.8.1

I recompile source for windows and osx with a single Makefile, osx is on virtualbox

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

Re: help for a linux develop environment

Post by jdart »

My development environment on Linux is emacs + gcc. I don't use a GUI.

If you want to try different compilers, you can try clang, or download the Intel compiler and tools for Linux, which are free for non-commercial use (see http://software.intel.com/en-us/non-com ... evelopment). Their C++ Studio product suite includes a very good execution profiler (note though: requires Intel hardware, preferably Sandy Bridge or later, for most functions to work).

--Jon
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: help for a linux develop environment

Post by bob »

elcabesa wrote:hi, I use Linux at home for everything but chess development and I'd like to change the state of the things.

I mainly use kubuntu and as you can image kde.
1) what development environment can you suggest? I was thinking about Eclipse, so I can reuse it for windows too.
2) what compilers are available for linux? I'd like to test my engine with more than one compiler and have it work in a deterministic way, giving always the same result independent from the compiler
3) what chess testing environment are available in linux? i'd like to test the engine with cutechess, but I also would like to test it against pgn/epd file.

thank you all for your help
For linux there are two good choices. GCC has been around for ever, is being actively developed using the open-source model, and works just fine on linux. Intel's C compiler is free for non-commercial use on linux (you have to look to find it on intel's web site, but it is there). It will produce a faster executable than gcc if you are running on an intel platform, if you use AMD you might get slower code.

The "IDE" I use is a terminal window + vi + make, and occasionally using gcc (or idb for intel)... I'm not a big fan of integrated environments myself, which lets me work on my office box from home without trying to tunnel x11 stuff out to my home boxes...