64-bit development in Linux

Discussion of chess software programming and technical issues.

Moderator: Ras

Volker Pittlik
Posts: 628
Joined: Wed Mar 08, 2006 9:10 pm
Location: Murten / Morat, Switzerland
Full name: Volker Pittlik

Re: 64-bit development in Linux

Post by Volker Pittlik »

Greg Strong wrote:...
Someone please tell me where to find a 64-bit Linux OS with C compiler. Really shouldn't be that hard, should it?
Even without testing I guess C compilers are available for almost all distributions. Fedora has it for sure as well as Debian, Ubuntu, SuSe and DSL. It is sometimes not absolutely easy to find the needed package, but if you ask at a Linux forum, read the FAQs there or simply google you will find a solution for sure.

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

Re: 64-bit development in Linux

Post by bob »

Greg Strong wrote:I want to be able to continue development of my chess program in Linux as well as Windows, but I'm finding it almost impossible to even get a 64-bit Linux OS with development tools running. The 64-bit Fedora doesn't see to have any C compiler at all, and doesn't know how to add it with the package manager ?!? (I thought C compilation was a given for any Unix OS...) The 64-bit Debian doesn't even boot on an an Intel core 2 :shock: A search for Linux 64-bit distributions doesn't turn up anything useful (that's free) with over an hour of searching ... Seriously?!?

Someone please tell me where to find a 64-bit Linux OS with C compiler. Really shouldn't be that hard, should it?
You are doing something wrong. I use fedora. You just have to be sure to say "install everything" or if you do a custom install, make sure you get all the development tools you need (gcc, gdb, etc.)

I am running Fedora 9 on my core-2 duo laptop with no problems. I do use the Intel compiler which produces a bit faster executable. It's free for non-commercial use on linux.
frankp
Posts: 233
Joined: Sun Mar 12, 2006 3:11 pm

Re: 64-bit development in Linux

Post by frankp »

Greg Strong wrote: Someone please tell me where to find a 64-bit Linux OS with C compiler. Really shouldn't be that hard, should it?
Go to
http://distrowatch.com/
to see what is available.

I currently use (only) Debian Etch 64bit on several desktops and a laptop.

Previously, suse, fedora, red hat, mandrake (mandriva), Ubuntu, Kubuntu............ all 64 bit with gcc.

There are even live 64 bit CDs - although these may not have gcc.

You may find that the one CD distros do not come with gcc; and so you may have to install them after first boot.

Frank
User avatar
Greg Strong
Posts: 388
Joined: Sun Dec 21, 2008 6:57 pm
Location: Washington, DC

Re: 64-bit development in Linux

Post by Greg Strong »

Thanks, everyone. I'm not sure why Debian wasn't booting for me - must have been a bad CD burn. I downloaded it again, and it installed fine, and the aptitude command you provided worked perfectly to install GCC.

Now I'm going to try to get the Intel C++ compiler up and running, but at least I have GCC for the time being.

Any other recommendations for software? Do you use Eclipse or any other IDE? Also, is there anything for Linux that is like Arena (something that will put my engine up against a list of others from a specific set of positions)?

Thanks to everyone for the help!
bhlangonijr
Posts: 482
Joined: Thu Oct 16, 2008 4:23 am
Location: Milky Way

Re: 64-bit development in Linux

Post by bhlangonijr »

I think you should try Eclipse CDT:

http://www.eclipse.org/cdt/

it's a great IDE having versioning, build tools, code completion, etc. By the way, Intel Compiler installation pack comes with its Eclipse Plugin.

I use xboard and shell scripts to create engine tournaments. I couldn't find any good chess GUI like Arena or Chessbase for Linux. Anyway, I find xboard very good.

Xboard doesn't support UCI engines so you may want to use polyglot to get your UCI engine working with xboard.

A sample of xboard tournament script:
(read xboard's manual to understand the options)

tournament_xxx.sh

Code: Select all

/opt/xboard-4.2.7/./xboard 	-size average \
			   	-fd   /bin  \
       				-fcp  "./polyglot /opt/workspace/fruit2.1/polyglot.ini"      \
       				-sd   /bin  \
       				-scp  "./polyglot /opt/DeepShredder11/polyglot.ini"      \
       				-saveGameFile games/DeepShredder11_fruit_2.1_torneio01.pgn \
       				-tc 10:00 -inc 0 -mg 2  \
       				-reuseFirst       false \
       				-reuseSecond      false \
       				-popupExitMessage false \
       				-popupMoveErrors  false \
       				-autoCallFlag     true \
				-showThinking 	  true  \
				-ponderNextMove   false


/opt/xboard-4.2.7/./xboard 	-size average \
			   	-fd   /bin  \
       				-fcp  "./polyglot /opt/Rybka_3/rybka3.ini"      \
       				-sd   /bin  \
       				-scp  "./polyglot /opt/DeepShredder11/polyglot.ini"      \
       				-saveGameFile games/rybka3_DeepShredder11_torneio01.pgn \
       				-tc 10:00 -inc 0 -mg 2  \
       				-reuseFirst       false \
       				-reuseSecond      false \
       				-popupExitMessage false \
       				-popupMoveErrors  false \
       				-autoCallFlag     true \
				-showThinking 	  true  \
				-ponderNextMove   false
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: 64-bit development in Linux

Post by ilari »

Greg Strong wrote:Any other recommendations for software? Do you use Eclipse or any other IDE?
I'm a die-hard KDevelop user. Great for C and C++ projects. Anjuta and Geany are also nice. They should all be in the Debian repositories, and can be installed with aptitude.
Also, is there anything for Linux that is like Arena (something that will put my engine up against a list of others from a specific set of positions)?
You can use Arena in Linux with Wine. It works just fine, but only with Windows executables of the chess engines.
jhlywa
Posts: 3
Joined: Sun Dec 03, 2006 10:45 pm
Location: Virginia, USA

Re: 64-bit development in Linux

Post by jhlywa »

Greg Strong wrote:Any other recommendations for software? Do you use Eclipse or any other IDE?
I edit with vim, compile with make, debug with gdb, and profile with gprof. Obviously nothing fancy, just tools that I feel most comfortable/efficient using.

Recently I've been using valgrind to help profile memory related errors. It's quite nice, has saved me a ton of time, and doesn't require a separate linker flag (unlike efence ... which is handy as well).

Under Debian you can use aptitude to search for various packages by name/description by issuing 'aptitude search whatever'. Sometimes, and I'm too lazy to find out why, aptitude doesn't return all matching results. So if you don't find what you're looking for with aptitude, try 'apt-cache search whatever'. Does anyone know why this is the case?
trojanfoe

Re: 64-bit development in Linux

Post by trojanfoe »

I've been using Ubuntu for a while but recently at work we are looking at porting our application suite to Linux and I have tried Fedora (as it's tied to the commercial Red Hat Enterprise distribution). I find Ubuntu superior though - the package management just seems to work better and I couldn't even get Fedora 10 to even install straight-off on my work lappy - it seems to lack testing by what I have read on the fedora-forums.

As far as searching for packages under Ubuntu I always use the somewhat clunky aptitude curses application and do searches by regular expression; it's a bit hit-and-miss but I haven't had a problem yet.

I would also recommend eclipse-cdt as a development environment - it's very powerful. If you are dual-booting I would imaging you might have problems with a common source repository; i.e. after you've developed under Windows and checked-in your changes, how do you get access to the repository from Linux? You could have a smallish shared filesystem for this but I wouldn't stake my life on NTFS under Linux (though it works, write-mode has been experimental for while) so perhaps FAT32 or something? For me this problem is solved as I have a seperate Linux file server with software RAID-5 for data security and that hosts my Mercurial repo's just fine. Of course having a whole other machine for such perposes isn't feasible for everyone.

Good luck with your Linux development - it's worth effort in my opinion.

Cheers,
Andy
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: 64-bit development in Linux

Post by ilari »

trojanfoe wrote:You could have a smallish shared filesystem for this but I wouldn't stake my life on NTFS under Linux (though it works, write-mode has been experimental for while) so perhaps FAT32 or something?
NTFS write mode on Linux is not experimental any more, it's stable enough to be enabled by default in Ubuntu.

But I agree with you that it's best to use a version control system (I use Git) to manage the source code. You don't need your own file server, there are plenty of free online repositories where the code can be hosted.
frankp
Posts: 233
Joined: Sun Mar 12, 2006 3:11 pm

Re: 64-bit development in Linux

Post by frankp »

Greg Strong wrote: Any other recommendations for software? Do you use Eclipse or any other IDE? !
VIM

Enough said ;-)