Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Development (http://angband.oook.cz/forum/forumdisplay.php?f=10)
-   -   failed to compile main.c (http://angband.oook.cz/forum/showthread.php?t=9776)

sousedstvi January 19, 2020 02:59

failed to compile main.c
 
Hello!
I played Angband years ago when I worked with @d_m in Philly. Now I'm interested in getting back in the game, so to speak.

I got this far compiling, but don't know what to do with these errors.


Code:

christopher@fern:~/angband/angband-4.2.0$ make
Entering directory src.
cat: ../version: No such file or directory
cat: ../version: No such file or directory
cat: ../version: No such file or directory
cat: ../version: No such file or directory
Successfully generated dependencies.
cat: ../version: No such file or directory
main.c:53:1: warning: ISO C forbids empty initializer braces [-Wpedantic]
 {
 ^
main.c:52:28: error: zero or negative size array ‘modules’
 static const struct module modules[] =
                            ^~~~~~~
Failed to compile main.c!
../mk/buildsys.mk:242: recipe for target 'main.o' failed
make[3]: *** [main.o] Error 1
../mk/buildsys.mk:110: recipe for target 'all' failed
make[2]: *** [all] Error 2
mk/buildsys.mk:115: recipe for target 'subdirs' failed
make[1]: *** [subdirs] Error 2
mk/buildsys.mk:110: recipe for target 'all' failed
make: *** [all] Error 2


Nick January 19, 2020 03:03

Have you first run ./autogen.sh and then ./configure (with relevant options)?

sousedstvi January 19, 2020 03:21

Hi! Yes, I ran $sh autogen.sh and $./configure --prefix=$HOME

sousedstvi January 19, 2020 03:40

output of ./configure is
Code:

Configuration:

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

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

- SDL2 sound                              Disabled
- SDL sound                              Disabled

do I have to have those Curses and X11 libraries?

Pete Mack January 19, 2020 04:11

You need at least ONE front-end. I am surprised curses isn't present on your machine. You will have to get (or configure) one of those choices.

sousedstvi January 19, 2020 04:37

[solved]
 
Ok. Thanks that was it. I installed libx11-dev and dependencies.

fph January 19, 2020 17:13

Quote:

Originally Posted by Pete Mack (Post 142465)
You need at least ONE front-end. I am surprised curses isn't present on your machine. You will have to get (or configure) one of those choices.

Probably what is missing is not the library, but the -dev package (include files).


All times are GMT +1. The time now is 01:03.

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