Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old March 8, 2008, 18:37   #1
MKula
Apprentice
 
Join Date: Feb 2008
Location: Montreal
Posts: 62
MKula is on a distinguished road
Exclamation Compiling on Linux... HowTo?

Is there an up-to-date (or at least reasonably so) guide to compiling v3.0.x Angband? I'm an old hat with Angband, but reasonably new to Linux (I'd been using Windows until about a few months ago), so I'm not really sure how to compile properly/correctly.

Currently, I have Ubuntu 7.10 Gutsy. Basically, I'd like to be able to compile directly from a downloaded tarball, however documentation on that doesn't seem to be readily available.

Any pointers, anyone?
MKula is offline   Reply With Quote
Old March 8, 2008, 21:37   #2
pav
Administrator
 
pav's Avatar
 
Join Date: Apr 2007
Location: Prague, Czech republic
Age: 37
Posts: 777
pav is on a distinguished road
Send a message via ICQ to pav
Hmm, let me see.

1) Untar the download
2) ./configure
3) make
4) make install
5) ./angband

works?
__________________
See the elves and everything! http://angband.oook.cz
pav is offline   Reply With Quote
Old March 8, 2008, 22:11   #3
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,849
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by MKula View Post
Is there an up-to-date (or at least reasonably so) guide to compiling v3.0.x Angband? I'm an old hat with Angband, but reasonably new to Linux (I'd been using Windows until about a few months ago), so I'm not really sure how to compile properly/correctly.

Currently, I have Ubuntu 7.10 Gutsy. Basically, I'd like to be able to compile directly from a downloaded tarball, however documentation on that doesn't seem to be readily available.

Any pointers, anyone?
http://rephial.org/wiki/Compiling -- it's even mentioned in the readme.
takkaria is offline   Reply With Quote
Old March 9, 2008, 00:51   #4
MKula
Apprentice
 
Join Date: Feb 2008
Location: Montreal
Posts: 62
MKula is on a distinguished road
Quote:
Originally Posted by pav View Post
Hmm, let me see.

1) Untar the download
2) ./configure
3) make
4) make install
5) ./angband

works?
Ha ha. I probably should have put "troubleshooting" somewhere in the title.
Here's the problem. When I try:

./configure --enable-x11

I get the following error:

checking for gcc... gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.

I get the exact same thing when I try just "./configure", etc. When I check the config.log file, the part that looks interesting is:

gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
configure:2094: $? = 0
configure:2101: gcc -V >&5
gcc: '-V' option must have argument
configure:2104: $? = 1
configure:2127: checking for C compiler default output file name
configure:2154: gcc conftest.c >&5
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:2157: $? = 1
configure:2195: result:
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "Angband"
| #define PACKAGE_TARNAME "angband"
| #define PACKAGE_VERSION "3.0.9"
| #define PACKAGE_STRING "Angband 3.0.9"
| #define PACKAGE_BUGREPORT "bugs@rephial.org"
| #define PACKAGE "angband"
| #define VERSION "3.0.9"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2202: error: C compiler cannot create executables
See `config.log' for more details.

This doesn't appear (at first glance) to be a problem with the source; to me it looks like I'm missing some sort of compiler library or dependency that I don't know about, but I have no idea what it could be.

Any help, anyone?
MKula is offline   Reply With Quote
Old March 9, 2008, 00:55   #5
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 52
Posts: 7,057
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by takkaria View Post
http://rephial.org/wiki/Compiling -- it's even mentioned in the readme.
Hey, that's a nice page. One might even think that a maintainer who claimed to be "using the Vanilla build system" might have read it. Or even added a link to it to their download page.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old March 9, 2008, 01:03   #6
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 52
Posts: 7,057
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by MKula View Post
This doesn't appear (at first glance) to be a problem with the source; to me it looks like I'm missing some sort of compiler library or dependency that I don't know about, but I have no idea what it could be.

Any help, anyone?
My usual approach here (and I'm using kubuntu Gutsy) is to open up adept and download everything that looks like a gcc library. I appear to have gcc, gcc-base (possibly not necessary?) and libgcc1 - if you have a 64-bit machine you may need some other stuff too.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old March 9, 2008, 02:15   #7
roustk
Adept
 
Join Date: Dec 2007
Posts: 167
roustk is on a distinguished road
Quote:
Originally Posted by MKula View Post
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
Googling for the error message, an early hit is this thread.

It sounds like gcc in missing a dependency, but g++ has it right. So, supposedly this works:
Code:
$ apt-get install libc6-dev g++ gcc
Good luck.
Kevin
roustk is offline   Reply With Quote
Old March 9, 2008, 04:07   #8
MKula
Apprentice
 
Join Date: Feb 2008
Location: Montreal
Posts: 62
MKula is on a distinguished road
Thanks for your help guys! I've made progress!
Turns out you were all correct and I didn't have some some gcc libraries that were needed. Also, I needed to update my autoconf and automake, since I didn't have the correct versions of those either.
The good news: './configure' works now!
The bad news: that's it. 'make' doesn't work.

If I run 'make install' (having run './configure --enable x11') I get the following:
CC main-gcu.c
main-gcu.c:63:22: error: ncurses.h: No such file or directory
main-gcu.c:132: error: expected specifier-qualifier-list before ‘WINDOW’
main-gcu.c: In function ‘Term_xtra_gcu_alive’:
<snip about 50-100 lines>
main-gcu.c:738: error: ‘LINES’ undeclared (first use in this function)
main-gcu.c:738: error: ‘COLS’ undeclared (first use in this function)
main-gcu.c:822: error: ‘stdscr’ undeclared (first use in this function)
make[2]: *** [main-gcu.o] Error 1
make[1]: *** [build] Error 2
make: *** [build] Error 2

Sooo.... what? Apparently main-gcu.c is no good? What's the next step? It's also worth mentioning that even though I ran './configure --enable x11', after all is said and done, the frontends look like:
-- Frontends --
- Curses Yes
- GTK 2.x Disabled
- X11 No; missing libraries
- SDL Disabled

So, even though I explicitly enabled x11, apparently I can't use it because I'm missing libraries? Is that normal?
Your help has been awesome so far; any further advice would be much appreciated! Thanks guys

EDIT: PS Thanks for that link takkaria... I actually feel kind of silly for not realizing it was there, in such an obvious place, since I checked that readme!
MKula is offline   Reply With Quote
Old March 9, 2008, 05:23   #9
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 52
Posts: 7,057
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by MKula View Post
Sooo.... what? Apparently main-gcu.c is no good? What's the next step?
I'd guess getting the ncurses library - I have libncurses5 and libncurses5-dev.

Quote:
So, even though I explicitly enabled x11, apparently I can't use it because I'm missing libraries? Is that normal?
Well, it's normal if you don't have the libraries... the ones I have that look possibly relevant are libx11 -6, libx11 -data and libx11 -dev.

Someone who knows some actual information may provide some actual help.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old March 9, 2008, 12:02   #10
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,849
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by MKula View Post
Thanks for your help guys! I've made progress!
Turns out you were all correct and I didn't have some some gcc libraries that were needed. Also, I needed to update my autoconf and automake, since I didn't have the correct versions of those either.
You don't need automake anymore, I think, the docs were out of date. Anyway, thanks for starting this thread; I've now added a list of packages to the compiling page so other people don't have to go through what you have.
takkaria 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 ToME TJA Variants 6 October 31, 2007 12:32
howto h,j,k,l kroiz Vanilla 3 October 29, 2007 12:33
Windows Compiling and Makefiles APWhite Vanilla 11 August 22, 2007 21:22
Linux compiling under SuSE 9.3 TJA Vanilla 21 August 16, 2007 07:49
Trouble compiling angband 3.0.9 on linux RastaRuedi Vanilla 2 August 1, 2007 17:28


All times are GMT +1. The time now is 18:11.


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