Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old September 15, 2013, 03:04   #1
bobthegreat
Rookie
 
Join Date: Mar 2009
Posts: 12
bobthegreat is on a distinguished road
Compile Error in Ubuntu 13.04

Trying to compile Angband in Ubuntu 13.04, and every time I try to run "make" I get:

Code:
main.c:38:1: warning: ISO C forbids empty initializer braces [-pedantic]
main.c:37:28: error: zero or negative size array ‘modules’
Failed to compile main.c!
make[3]: *** [main.o] Error 1
make[2]: *** [all] Error 1
make[1]: *** [subdirs] Error 1
make: *** [all] Error 1
It's likely this is somehow my fault cause I'm quite noobish with linux, but I haven't been able to find anything about how to solve it. Thanks for the help!

Last edited by bobthegreat; September 15, 2013 at 03:10.
bobthegreat is offline   Reply With Quote
Old September 15, 2013, 13:02   #2
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,930
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by bobthegreat View Post
Trying to compile Angband in Ubuntu 13.04, and every time I try to run "make" I get:

Code:
main.c:38:1: warning: ISO C forbids empty initializer braces [-pedantic]
main.c:37:28: error: zero or negative size array ‘modules’
Failed to compile main.c!
make[3]: *** [main.o] Error 1
make[2]: *** [all] Error 1
make[1]: *** [subdirs] Error 1
make: *** [all] Error 1
It's likely this is somehow my fault cause I'm quite noobish with linux, but I haven't been able to find anything about how to solve it. Thanks for the help!
This happens when you don't install the right development libraries, or when you don't tell configure which frontends to use. If you run ./configure, what are the last few lines of output?
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Old September 15, 2013, 16:49   #3
bobthegreat
Rookie
 
Join Date: Mar 2009
Posts: 12
bobthegreat is on a distinguished road
Ok, what I get is:

Code:
Configuration:

  Install path:                           /usr/local
  binary path:                            /usr/local/games
  config path:                            /usr/local/etc/angband/
  lib path:                               /usr/local/share/angband/
  var path:                               (not used)
  (with private save and score files in ~/.angband/Angband/)

-- Frontends --
- Curses                                  No; missing libraries
- X11                                     No; missing libraries
- SDL                                     Disabled
- Windows                                 Disabled
- Test                                    No
- Stats                                   No

- SDL sound                               Disabled
bobthegreat is offline   Reply With Quote
Old September 15, 2013, 17:06   #4
bobthegreat
Rookie
 
Join Date: Mar 2009
Posts: 12
bobthegreat is on a distinguished road
I installed x11, now everything works! Thanks so much!
bobthegreat is offline   Reply With Quote
Old January 15, 2014, 04:35   #5
discochoir
Rookie
 
Join Date: Jan 2014
Posts: 5
discochoir is on a distinguished road
Having the same problem, Ubuntu 13.10, also noobish.
compiling to the directory its currently in, looks like this:
Code:
LINK angband.o           
main.c:38:1: warning: ISO C forbids empty initializer braces [-Wpedantic]
 {
 ^
main.c:37:28: error: zero or negative size array ‘modules’
 static const struct module modules[] =
                            ^
Failed to compile main.c!
make[3]: *** [main.o] Error 1
make[2]: *** [all] Error 1
make[1]: *** [subdirs] Error 1
make: *** [all] Error 1
the last few lines of the ./configure are:
Code:
Configuration:

  Install path:                           /usr/local
  binary path:                            /usr/local/games
  config path:                            /usr/local/etc/angband/
  lib path:                               /usr/local/share/angband/
  var path:                               (not used)
  (with private save and score files in ~/.angband/Angband/)

-- Frontends --
- Curses                                  No; missing libraries
- GTK 2.x                                 Disabled
- X11                                     No; missing libraries
- SDL                                     Disabled
- Test                                    No
- Stats                                   No

- SDL sound                               No; missing libraries
Not sure what this x11 business is, i have xauth installed and up-to-date though. Thanks ahead.

EDIT:
If this helps, I downloaded from the "official" page. http://rephial.org/
EDIT:
Just for kicks, I checked out Ubuntu Software center. It might be an older version, but Angband3.3 is there. Installs all on its own like magic. Problem solved.
Honest opinion, why is a compiled executable not more commonly distributed? Seems a shame to me, but alas, i've not the knowledge to do anything about it.

Last edited by discochoir; January 15, 2014 at 06:34.
discochoir is offline   Reply With Quote
Old January 15, 2014, 10:40   #6
fph
Knight
 
Join Date: Apr 2009
Location: Berlin / Italy
Posts: 768
fph is on a distinguished road
The problem is that each possible graphical interfaces (X11, GTK, console/curses, etc.) depends on some development libraries being installed, and you don't have enough of them to compile even a single one.

Check the instructions in http://trac.rephial.org/wiki/Compiling. In particular, you'll need the third command in that guide:
Code:
 $ sudo apt-get install autoconf gcc libc6-dev libncurses5-dev libx11-dev \
             libsdl1.2-dev libsdl-ttf2.0-dev libsdl-mixer1.2-dev libsdl-image1.2-dev \
             libgtk2.0-dev libglade2-dev
(write everything excluding the initial $ symbol in a terminal) and then it should work.

(I agree, there could be a better error message).
__________________
Dive fast, die young, leave a high-CHA corpse.
--
You read a scroll labeled 'lol gtfo' of Teleport Level.
fph is offline   Reply With Quote
Old January 15, 2014, 16:36   #7
discochoir
Rookie
 
Join Date: Jan 2014
Posts: 5
discochoir is on a distinguished road
Ah, perfect. Thank you, it's working fine now.
__________________
"And why not? For the mind of man is capable of anything - because everything is in it, all the past as well as all the future."
discochoir 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
3.5-nightly-compile/link error. (Linux) Spacebux Development 20 June 29, 2013 00:05
[O] Error Using Dev-C++ to compile BennyG Variants 8 October 2, 2009 16:51
cygwin 1.7 compile error david3x3x3 Development 0 September 13, 2009 00:03
help with compile error (and "const") will_asher Development 4 August 3, 2009 23:35
Compile error - latest Vanilla Angband SVN PaulBlay Development 3 April 19, 2009 21:20


All times are GMT +1. The time now is 06:42.


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