Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old February 26, 2010, 14:10   #1
Tiburon Silverflame
Swordsman
 
Join Date: Feb 2010
Posts: 405
Tiburon Silverflame is on a distinguished road
Compilation issues.

I decided to shift the game to a different computer/OS. My desktop runs Ubuntu 9.10; download the source, unzip, run the 3 commands, bingo! Game runs. Copy over my save file to the right spot (took a bit to find that)...rename it...it loads! Cool.

OK, so now step 2. Let's do this on my netbook, which is where I'd really prefer it. The netbook runs the current Ubuntu netbook remix.

Copy the zip file.
Unzip.
Run ./configure -- OK.
Run make. All the components compile fine, until....

main.c:38: warning: ISO C forbids empty initializer braces
main.c:37: error: zero or negative size array ‘modules’
make[3]: *** [main.o] Error 1
make[2]: *** [all] Error 1
make[1]: *** [subdirs] Error 1
make: *** [all] Error 1

Oops...

Can't upload my full config.log; it's too big. But here's what's being written into confdefs.h:

#define PACKAGE_NAME "Angband"
#define PACKAGE_TARNAME "angband"
#define PACKAGE_VERSION "3.1.2v2"
#define PACKAGE_STRING "Angband 3.1.2v2"
#define PACKAGE_BUGREPORT "bugs@rephial.org"
#define PACKAGE "angband"
#define VERSION "3.1.2v2"
#define HAVE_DIRENT_H 1
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_FCNTL_H 1
#define HAVE_STDINT_H 1
#define HAVE__BOOL 1
#define HAVE_STDBOOL_H 1
#define RETSIGTYPE void
#define HAVE_MKDIR 1
#define HAVE_SETRESGID 1
#define HAVE_SETEGID 1
#define HAVE_STAT 1
#define USE_PRIVATE_PATHS 1
#define DEFAULT_CONFIG_PATH "/usr/local/etc/angband/"
#define DEFAULT_LIB_PATH "/usr/local/share/angband/"
#define DEFAULT_DATA_PATH "/usr/local/var/games/angband/"
#define X_DISPLAY_MISSING 1

One big difference in the desktop's config log: it has USE_X11 1. The netbook doesn't run XWin, to remain small. The problem appears to be that NONE of the #ifdef's are being satisfied, thus creating the empty module.

So what now?
Tiburon Silverflame is offline   Reply With Quote
Old February 26, 2010, 14:21   #2
SaThaRiel
Adept
 
SaThaRiel's Avatar
 
Join Date: Nov 2009
Posts: 173
SaThaRiel is on a distinguished road
Hm, what about an
Code:
sudo apt-get update
sudo apt-get install angband
AFAIK Angband is included into Ubuntu.
If you want to compile it from yourself i suggest that you do a
Code:
./configure --help
and check if you can exclude some - if not most - of the options like SDL and the like.
SaThaRiel is offline   Reply With Quote
Old February 26, 2010, 17:55   #3
Tiburon Silverflame
Swordsman
 
Join Date: Feb 2010
Posts: 405
Tiburon Silverflame is on a distinguished road
OK, well, the sudo apt-get seemed to work...now I just gotta find where it put it.
Tiburon Silverflame is offline   Reply With Quote
Old February 26, 2010, 17:57   #4
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 37
Posts: 1,516
d_m is on a distinguished road
It sounds like you need to install libncurses5-dev (or something like that) so that you can build the GCU mode (which is what I assume you want to play). Try that.
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old February 26, 2010, 19:13   #5
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,054
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate Send a message via Skype™ to Magnate
Quote:
Originally Posted by Tiburon Silverflame View Post
OK, well, the sudo apt-get seemed to work...now I just gotta find where it put it.
No you don't. The whole point of apt is that it doesn't matter where things are put, you can just use them. Look for it on the games menu, or just type 'angband' and see what happens.
Magnate is offline   Reply With Quote
Old February 26, 2010, 22:20   #6
Tiburon Silverflame
Swordsman
 
Join Date: Feb 2010
Posts: 405
Tiburon Silverflame is on a distinguished road
Magnate: this is the Netbook Remix, so it has a special desktop shell. I looked for it in the Games section, but didn't see it...or in any of the others it has set up. But, yeah, I can try angband from command line.

d_m: IIRC, watching things as the apt-get angband install, it did include a few other libraries, and one of em did resemble "lib-curses" so that points me in a very useful direction, thanks.
Tiburon Silverflame is offline   Reply With Quote
Old February 26, 2010, 22:41   #7
Napsterbater
Adept
 
Join Date: Jun 2009
Posts: 177
Napsterbater is on a distinguished road
Ubuntu Netbook remix does in fact install X Windows. It simply modifies the default GNOME desktop environment with an interface designed for netbooks. Try following the instructions at http://rephial.org/wiki/Compiling

That should allow you to build angband. If you want SDL make sure you use the --enable-sdl option or the GTK frontend with --enable-gtk

But if you just want to play angband, there's no point in compiling. Just sudo apt-get install angband and then type angband to play. If it doesn't show up in your games menu, just make your own shortcut.

My recommendation though is to run the nightlies. Do:

svn co svn://rephial.org/angband/trunk angband

and then compile it like the link above. cd to the directory every few days and do a svn update. If you get a new revision number then make and make install again.

The devel version installs into /usr/local/games/angband and it won't be in your PATH, so either add it to your path or put a shell script to run angband into your ~/bin directory. Or just make a shortcut on the desktop.

Last edited by Napsterbater; February 26, 2010 at 22:59.
Napsterbater is offline   Reply With Quote
Old February 26, 2010, 23:15   #8
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 37
Posts: 1,516
d_m is on a distinguished road
Quote:
Originally Posted by Tiburon Silverflame View Post
d_m: IIRC, watching things as the apt-get angband install, it did include a few other libraries, and one of em did resemble "lib-curses" so that points me in a very useful direction, thanks.
The thing to remember on Ubuntu/Debian is that most packages have the "basic" library, e.g. libncurses5, and the "development package" which you can compile software against (it includes header files, etc). You probably got the "basic" libraries but probably still need the development ones.

Incidentally, this is probably also why you can't compile the X11 version.
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old March 1, 2010, 21:34   #9
Tiburon Silverflame
Swordsman
 
Join Date: Feb 2010
Posts: 405
Tiburon Silverflame is on a distinguished road
The sudo apt-get worked; the only problem is, it's 3.0.9. I noticed immediately that I prefer the newer version. I like the auto-display of the spells available, without needing the extra keystroke.

What I'm gonna do, some time this week, is wipe out the Netbook Remix, and install a full 9.10 version. Netbook Remix has some good aspects, but a lotta things I don't like, in that desktop. Meanwhile, I'll just build up my new character on my XP laptop...just making sure to save after something particularly good happens, to avoid losing it to a crash.
Tiburon Silverflame 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
DaJAngband Issues Prismatic Variants 12 February 15, 2010 16:08
general squelch issues PowerDiver Vanilla 9 January 9, 2009 16:13
Compiling Issues Gregian Vanilla 13 July 2, 2008 15:35
Shopkeeper issues in V3.09a Vanadis Vanilla 3 March 29, 2008 01:07
Compilation issues: can't find -lSM Daven_26d1 Vanilla 10 July 22, 2007 08:52


All times are GMT +1. The time now is 20:13.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.