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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
12-11-2009, 09:21 PM
|
#1
|
Member
Registered: Nov 2009
Posts: 522
Rep:
|
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 ?
|
|
|
12-11-2009, 09:33 PM
|
#2
|
Senior Member
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Rep: 
|
Try:
Quote:
sudo apt-get install build-essential
|
and retry.
|
|
|
12-11-2009, 09:40 PM
|
#3
|
Member
Registered: Nov 2009
Posts: 522
Original Poster
Rep:
|
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.
|
|
|
12-11-2009, 10:47 PM
|
#4
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
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.
|
|
|
12-12-2009, 01:06 AM
|
#5
|
Member
Registered: Nov 2009
Posts: 522
Original Poster
Rep:
|
I did what you said, I still get a lot of errors, the first one is the same as above.
|
|
|
12-12-2009, 06:20 AM
|
#6
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
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.
|
|
|
12-12-2009, 09:30 AM
|
#7
|
Member
Registered: Nov 2009
Posts: 522
Original Poster
Rep:
|
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.
|
|
|
12-12-2009, 09:53 AM
|
#8
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
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.
.....  ..
.....
|
|
|
12-12-2009, 10:21 AM
|
#9
|
LQ Newbie
Registered: Dec 2009
Location: under a bridge
Distribution: PClinuxOS 2009
Posts: 12
Rep:
|
try a change
try using automake or write a Makefile look in other projects for examples
|
|
0 members found this post helpful.
|
12-13-2009, 04:30 AM
|
#10
|
Member
Registered: Nov 2009
Posts: 522
Original Poster
Rep:
|
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
|
|
|
12-13-2009, 11:47 AM
|
#11
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
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.
|
|
|
12-13-2009, 11:32 PM
|
#12
|
Member
Registered: Nov 2009
Posts: 522
Original Poster
Rep:
|
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
|
|
|
12-14-2009, 04:28 AM
|
#13
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
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
.....
|
|
|
12-14-2009, 11:10 AM
|
#14
|
Member
Registered: Sep 2005
Distribution: Today Debian . Tomorrow ..??
Posts: 386
Rep:
|
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.
Last edited by stratotak; 12-14-2009 at 11:57 AM.
|
|
|
12-15-2009, 02:08 AM
|
#15
|
Member
Registered: Nov 2009
Posts: 522
Original Poster
Rep:
|
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 12:21 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|