Compilation issues.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tiburon Silverflame
    Swordsman
    • Feb 2010
    • 405

    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?
  • SaThaRiel
    Adept
    • Nov 2009
    • 174

    #2
    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.
    Proud candidate for the Angband Darwin Award!

    Comment

    • Tiburon Silverflame
      Swordsman
      • Feb 2010
      • 405

      #3
      OK, well, the sudo apt-get seemed to work...now I just gotta find where it put it.

      Comment

      • d_m
        Angband Devteam member
        • Aug 2008
        • 1517

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

        Comment

        • Magnate
          Angband Devteam member
          • May 2007
          • 5110

          #5
          Originally posted by Tiburon Silverflame
          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.
          "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

          Comment

          • Tiburon Silverflame
            Swordsman
            • Feb 2010
            • 405

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

            Comment

            • Napsterbater
              Adept
              • Jun 2009
              • 177

              #7
              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, 22:59.
              This thread, it needs more rage. -- Napstopher Walken

              Comment

              • d_m
                Angband Devteam member
                • Aug 2008
                • 1517

                #8
                Originally posted by Tiburon Silverflame
                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

                Comment

                • Tiburon Silverflame
                  Swordsman
                  • Feb 2010
                  • 405

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

                  Comment

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