LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-11-2009, 09:21 PM   #1
elishac
Member
 
Registered: Nov 2009
Posts: 522

Rep: Reputation: 33
How to compile a source code


Hello,

I'm trying to compile a source code, that can be found
here.
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 ?
 
Old 12-11-2009, 09:33 PM   #2
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
Try:

Quote:
sudo apt-get install build-essential
and retry.
 
Old 12-11-2009, 09:40 PM   #3
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
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.
 
Old 12-11-2009, 10:47 PM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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.

Last edited by bigrigdriver; 12-11-2009 at 10:50 PM.
 
Old 12-12-2009, 01:06 AM   #5
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
I did what you said, I still get a lot of errors, the first one is the same as above.
 
Old 12-12-2009, 06:20 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Logistello

http://www.cs.ualberta.ca/~mburo/logistello.tar.gz
> > 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 → libstdc++.so.5 . 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.
.....

Last edited by knudfl; 12-12-2009 at 09:07 AM.
 
Old 12-12-2009, 09:30 AM   #7
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
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.
 
Old 12-12-2009, 09:53 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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
http://ftp.de.debian.org/debian/pool....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.
..... ..
.....
 
Old 12-12-2009, 10:21 AM   #9
xenophed
LQ Newbie
 
Registered: Dec 2009
Location: under a bridge
Distribution: PClinuxOS 2009
Posts: 12
Blog Entries: 1

Rep: Reputation: 0
try a change

try using automake or write a Makefile look in other projects for examples
 
0 members found this post helpful.
Old 12-13-2009, 04:30 AM   #10
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
I wrote : sudo dpkg -i libstdc++5_3.3.6-18_i386.deb
answer:
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:
libstdc++5_3.3.6-18_i386.deb
 
Old 12-13-2009, 11:47 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
When the terminal opens, your location is
/home/"username"/

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.
.....

Last edited by knudfl; 12-13-2009 at 11:49 AM.
 
Old 12-13-2009, 11:32 PM   #12
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
I wrote sudo dpkg -i /home/'username'/Desktop/libstdc++5_3.3.6-18_i386.deb
(with my username)
answer:
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:
/home/'username'/Desktop/libstdc++5_3.3.6-18_i386.deb

I wrote : sudo find / -name libstdc++5_3.3.6-18_i386.deb
answer : no result
 
Old 12-14-2009, 04:28 AM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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' :
wget http://ftp.de.debian.org/debian/pool....6-18_i386.deb
.. and you have the package in
/home/'username'/libstdc++5_3.3.6-18_i386.deb
.....
 
Old 12-14-2009, 11:10 AM   #14
stratotak
Member
 
Registered: Sep 2005
Distribution: Today Debian . Tomorrow ..??
Posts: 386

Rep: Reputation: 39
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 mind...lol.
Attached Thumbnails
Click image for larger version

Name:	Screenshot.jpg
Views:	21
Size:	188.3 KB
ID:	2184  

Last edited by stratotak; 12-14-2009 at 11:57 AM.
 
Old 12-15-2009, 02:08 AM   #15
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
compile jarred source code kpachopoulos Programming 1 06-02-2007 07:09 AM
Why can't FreeBSD compile anything from source code? mortal *BSD 5 03-21-2005 07:49 PM
how i compile a source code? nazib Linux - General 5 02-27-2005 09:13 AM
how to compile redhat 9.0 source code. wood Linux - General 5 09-16-2003 10:05 AM
How to compile source code... Grim Reaper Linux - Newbie 3 04-26-2002 11:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration