Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old November 10, 2008, 00:18   #1
trickypig
Rookie
 
Join Date: Nov 2008
Posts: 2
trickypig is on a distinguished road
Compiling in Linux

I downloaded Angband from the CVS trunk, but I'm unable to compile it.

I am trying to run it on my own personal computer running Ubuntu.

I downloaded the source to "/home/trickypig/Projects/angband/trunk/"
so, the src folder location is: "/home/trickypig/Projects/angband/
trunk/src/" and so forth...

from within the "trunk" folder, I ran "./configure" and everything
comes up clean, with the last few lines being:

Quote:
Configuration:

Install path: /usr/local
lib/ path: /usr/local/share/angband/

-- Frontends --
- Curses Yes
- GTK 2.x Disabled
- X11 Yes
- SDL Disabled

- SDL sound Yes
Then, I try running "make" from within the "trunk" folder, but I get
the following error messages:

Quote:
make[3]: Makefile: No such file or directory
make[3]: *** No rule to make target `Makefile'. Stop.
make[2]: *** [depend] Error 2
make[1]: *** [depend] Error 2
make: *** [depend] Error 2
Any idea what is going on?

My original plan was to have both the code and the compiled
executables in the "/home/trickypig/Projects/angband/trunk/"
folder in my home directory, but I have a feeling
that the compiler may be confused by that.

Should I be putting it somewhere else? If so, where should I put the
source code?

Thanks
trickypig is offline   Reply With Quote
Old November 10, 2008, 01:24   #2
s0be
Apprentice
 
Join Date: Jan 2008
Posts: 96
s0be is on a distinguished road
My only guess is something else is failing, and the Makefile error is covering for it. I've compiled it a few dozen times in a similar fashion and never had problems.
s0be is offline   Reply With Quote
Old November 10, 2008, 01:53   #3
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
Try going into src and doing a make there, rather than from the trunk.
PowerDiver is offline   Reply With Quote
Old November 10, 2008, 02:57   #4
trickypig
Rookie
 
Join Date: Nov 2008
Posts: 2
trickypig is on a distinguished road
Quote:
Originally Posted by PowerDiver View Post
Try going into src and doing a make there, rather than from the trunk.
right, I had tried that, and here's what happens;

when I run make from within the "src" directory, it runs through each .c file and compiles it ("CC file.c")
then does "LINK angband"
I don't see any error messages or anything.

when I try to run "./angband" I get the following:
Quote:
./angband: Failed to open sound config (/usr/local/share/angband/xtra/sound/sound.cfg):
No such file or directory
./angband: Failed to load sound config
./angband: cannot access the '/usr/local/share/angband/file/news.txt' file!

The 'lib' directory is probably missing or broken.
Perhaps the archive was not exracted correctly.
See the 'readme.txt' file for more information.
SO, the issue seems to be that Autoconfig thinks I'm running from "/usr/local/shared/angband" instead of from "/home/trickypig/Projects/angband/trunk".

I re-ran "./configure" using the options "--prefix=$HOME/Projects/angband/trunk" and "--with-libpath=$HOME/Projects/angband/trunk/lib".
Config worked fine.

make from the trunk directory produced the same errors.

make from the "src" directory worked fine.

now when I run "./angband", the game starts up. So, I guess that solves my problem.

I'm not missing anything by not being able to make from the base directory am I?

Thanks for the help.
trickypig is offline   Reply With Quote
Old November 10, 2008, 06:34   #5
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
Quote:
Originally Posted by trickypig View Post
right, I had tried that, and here's what happens;

when I run make from within the "src" directory, it runs through each .c file and compiles it ("CC file.c")
then does "LINK angband"
I don't see any error messages or anything.
After you make the executable, you need to install it.
The default location it needs to be is in the trunk directory.
Configure stuff may possibly make it work in /usr/local/whatever, but I wouldn't count on it.

make install may or may not work

You can always copy the executable directly.

I set up my sgid stuff manually, and make a change, then make, then cp ..
Presumably make install would also work, but I started in a time when it didn't and have not checked recently.
PowerDiver is offline   Reply With Quote
Old November 11, 2008, 02:29   #6
s0be
Apprentice
 
Join Date: Jan 2008
Posts: 96
s0be is on a distinguished road
You can also edit the config file before making and run angband without installing it. The relevant lines are:

Code:
#ifndef DEFAULT_PATH
# define DEFAULT_PATH "./lib/"
#endif /* DEFAULT_PATH */
s0be is offline   Reply With Quote
Old November 16, 2008, 16:26   #7
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 38
Posts: 1,516
d_m is on a distinguished road
I actually just emailed the dev list about this issue... commit 1024 on October 10th changed a Makefile which breaks "make" (for me, also on linux).

It's possible to fix by either adding *another* Makefile (in lib/xtra/icon) or reverting the file.
d_m is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling NPP for Linux? Bandobras Variants 9 July 3, 2009 11:52
[Daj]Compiling DajAngband on Linux? Poop Loops Variants 9 May 18, 2008 22:32
Compiling on Linux... HowTo? MKula Vanilla 22 March 12, 2008 18:40
Linux compiling under SuSE 9.3 TJA Vanilla 21 August 16, 2007 08:49
Trouble compiling angband 3.0.9 on linux RastaRuedi Vanilla 2 August 1, 2007 18:28


All times are GMT +1. The time now is 02:52.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.