-   Linux - Newbie (
-   -   How to compile a source code (

elishac 12-11-2009 10:21 PM

How to compile a source code

I'm trying to compile a source code, that can be found
I downloaded both source codes, and then I wrote (as it is said in the readme file) :
cd $HOME/Downloads/log
make ../oplayl
I got an error saying g++ doesn't exist, so I wrote
sudo apt-get install g++
and then I wrote make ../oplayl again.
But I get a ton of compilation errors.
Can you help me please ?

~sHyLoCk~ 12-11-2009 10:33 PM



sudo apt-get install build-essential
and retry.

elishac 12-11-2009 10:40 PM

I still get a lot of errors.
The first one is :
assembler messages;
fatal error: can't create ../obj.playml.o : No such file or directory.

bigrigdriver 12-11-2009 11:47 PM

Well, the tarball doesn't include a ./configure option, but it does incllude a makefile. In reading that makefile, I found a reference to make.i. In reading that file, I found CPPFLAGS, which reference /usr/local/X11/include.

Now, the author doesn't say which Linux distro he used to compile the game. In my distro (OpenSuse 10.3), I don't have a /usr/local/X11/include: I have /usr/include/X11.

Therefore, you need to find where your X11 includes are (locate /X11 | less in a terminal) and scroll down until you find your X11 includes. If they are not in /usr/local, you need to edit make.i and replace every instance of /usr/local/X11/include to show the correct path in your distro,

Then try again.

PS: I hope you realize that the last update of that app was in 2002! If may turn out that the app requires software of an older version than you now have. Installing that older software may break you system unless you take precautions to install that software in some alternate location using CPPFLAGS to specify the prefix, libexec, etc. location.

elishac 12-12-2009 02:06 AM

I did what you said, I still get a lot of errors, the first one is the same as above.

knudfl 12-12-2009 07:20 AM

> > logistello.tar.gz
mkdir logistello
cd logistello
mkdir obj oplayl
tar xvf logistello.tar.gz
cd log
make ../oplayl
.. "log" will compile with g++ version 3.2.3,
.. not g++-3.3 so far. ( May be g++-2.95 will do too.)

Luckily I had CentOS 3.9 started on another computer,
and got the binary = "temp" in a minute.

If you want the result, click my name, send an email.
And I will attach the gzipped 'temp', 203 kB, to a return mail.
P.S : ldd temp → . Else : no special dependencies.
Should work on any modern Linux.
Tested on PCLinuxOS 2009 (2010) , Debian Etch.
EDIT : Compiles with g++-3.3 on Debian Etch.

elishac 12-12-2009 10:30 AM

I followed your procedure precisely, but it doesn't work on my computer.
I sent you an email but you didn't send me anything.

knudfl 12-12-2009 10:53 AM

The object made on Debian Etch, using g++-3.3 works on Ubuntu 9.10
using this libstdc++5 package : libstdc++5_3.3.6-18_i386.deb
.. to be installed with ..
sudo dpkg -i libstdc++5_3.3.6-18_i386.deb

And no, I didn't send anything before I saw your mail.
..... :) ..

xenophed 12-12-2009 11:21 AM

try a change
try using automake or write a Makefile look in other projects for examples

elishac 12-13-2009 05:30 AM

I wrote : sudo dpkg -i libstdc++5_3.3.6-18_i386.deb
dpkg:error processing libstdc++5_3.3.6-18_i386.deb(--install):
cannot access archive: No such file or directory
errors were encountered while processing:

knudfl 12-13-2009 12:47 PM

When the terminal opens, your location is

If the file libstdc++5_3.3.6-18_i386.deb is there : OK.

If you have saved it somewhere else, e.g. Desktop/
then 1) cd Desktop/
2) sudo dpkg -i libstdc++5_3.3.6-18_i386.deb

or 3) full path :
sudo dpkg -i Desktop/libstdc++5_3.3.6-18_i386.deb

You can also type ..
sudo dpkg -i /home/'username'/Desktop/libstdc++5_3.3.6-18_i386.deb

I hope, the above will help you.
In Linux, you can always ask, where you are :
Just type 'pwd' <Enter> to get a reply.

elishac 12-14-2009 12:32 AM

I wrote sudo dpkg -i /home/'username'/Desktop/libstdc++5_3.3.6-18_i386.deb
(with my username)
dpkg:error processing /home/'username'/Desktop/libstdc++5_3.3.6-18_i386.deb (--install):
cannot access archive: No such file or directory
errors were encountered while processing:

I wrote : sudo find / -name libstdc++5_3.3.6-18_i386.deb
answer : no result

knudfl 12-14-2009 05:28 AM

So where exactly have you placed the file
libstdc++5_3.3.6-18_i386.deb ?

The command : ls
will show which files are present in a current location.

And please use " bash completion "
i.e. type : sudo dpkg -i libs <TAB>
.. and 'bash completion' will fill out, if present.

Using find in /home/'username'/ :
find ./ -name libstdc++5_3.3.6-18_i386.deb

Not finding it : fetch it again with 'wget' :
.. and you have the package in

stratotak 12-14-2009 12:10 PM

1 Attachment(s)
Just wondering..Are you trying to compile this program as a exercise in learning to compile from source code?? Or you really want a Othello game?? If its the second..Your on Debian right?? If you open Synaptic and search for othello..There are few games that pop up..So If you want a Othello game you dont need to compile it..Unless this is a exercise in compiling from source..If thats the case ..never

elishac 12-15-2009 03:08 AM

Stratotak, the answer is both : I'd like to know how to compile a code, and I'd like to have a good othello game too. I've heard that this one is (or has been, at least, according to wikipedia) the best one in the world. I'm not satisfied with the one that was given with ubuntu (which is the distribution I use, to answer your question), I can beat it by myself.

knudfl, ok, I installed the lib.
then i wrote cd logistello then cd log then make ../oplayl, and I still get a lot of errors.

All times are GMT -5. The time now is 02:23 PM.