failed to compile main.c

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sousedstvi
    Rookie
    • Jan 2020
    • 4

    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
    Vanilla maintainer
    • Apr 2007
    • 9647

    #2
    Have you first run ./autogen.sh and then ./configure (with relevant options)?
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • sousedstvi
      Rookie
      • Jan 2020
      • 4

      #3
      Hi! Yes, I ran $sh autogen.sh and $./configure --prefix=$HOME
      Last edited by sousedstvi; January 19, 2020, 04:28.

      Comment

      • sousedstvi
        Rookie
        • Jan 2020
        • 4

        #4
        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?

        Comment

        • Pete Mack
          Prophet
          • Apr 2007
          • 6883

          #5
          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.

          Comment

          • sousedstvi
            Rookie
            • Jan 2020
            • 4

            #6
            [solved]

            Ok. Thanks that was it. I installed libx11-dev and dependencies.
            Last edited by sousedstvi; January 19, 2020, 05:44.

            Comment

            • fph
              Veteran
              • Apr 2009
              • 1030

              #7
              Originally posted by Pete Mack
              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).
              --
              Dive fast, die young, leave a high-CHA corpse.

              Comment

              Working...
              😀
              😂
              🥰
              😘
              🤢
              😎
              😞
              😡
              👍
              👎