How to compile very old Angband versions?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lea2501
    Apprentice
    • Dec 2019
    • 61

    How to compile very old Angband versions?

    Hi! i wanted to try out the first Angband versions, i downloaded the source code for 2.4.frog-know (i think its the first public version) from http://rephial.org/release/2.4.fk and typing:

    Code:
    $ make
    i get:

    Code:
    gcc -g -fwritable-strings -DLIBDIR=\"/home/lea/games/roguelikes/angband/2.4.fk/angband/lib\"  -c /home/lea/games/roguelikes/angband/2.4.fk/angband/src/main.c -o /home/lea/games/roguelikes/angband/2.4.fk/angband/obj/main.o
    gcc: error: unrecognized command-line option ‘-fwritable-strings’; did you mean ‘-Wwrite-strings’?
    make: *** [Makefile:43: /home/lea/games/roguelikes/angband/2.4.fk/angband/obj/main.o] Error 1
    Maybe someone knows how to make it compile in newer linux distros, im trying in a up-to-date arch linux.
  • Julian
    Adept
    • Apr 2021
    • 122

    #2
    Originally posted by lea2501
    Hi! i wanted to try out the first Angband versions, i downloaded the source code for 2.4.frog-know (i think its the first public version) from http://rephial.org/release/2.4.fk and typing:

    Code:
    $ make
    i get:

    Code:
    gcc -g -fwritable-strings -DLIBDIR=\"/home/lea/games/roguelikes/angband/2.4.fk/angband/lib\"  -c /home/lea/games/roguelikes/angband/2.4.fk/angband/src/main.c -o /home/lea/games/roguelikes/angband/2.4.fk/angband/obj/main.o
    gcc: error: unrecognized command-line option ‘-fwritable-strings’; did you mean ‘-Wwrite-strings’?
    make: *** [Makefile:43: /home/lea/games/roguelikes/angband/2.4.fk/angband/obj/main.o] Error 1
    Maybe someone knows how to make it compile in newer linux distros, im trying in a up-to-date arch linux.
    That’s gonna be tricky to fix without some serious code surgery. Writing to constant strings hasn’t been legal C for a long, long, time. (Probably because it’s a huge source of potential problems.)

    You’d likely have better luck with Ben’s versions.

    Comment

    • JanusDuo
      Rookie
      • May 2021
      • 2

      #3
      Same here

      I am also wanting to compile old versions of Angband. I started playing on Fangband (not FaAngband) back in the 90s and eventually found the official Angband community in the 2.8.x days and played until around when Ben stepped down. I haven't played much since but recently got my first ever laptop and am having a really fun time installing and playing all my old favorite games. While hunting down the old Fangband binary I found rephial.org which did not exist last time I checked up on the community. I did find DOS binaries for all the old PCAngband stuff. I am fascinated that so many features in Fangband did not make it in to the official game until the Ben era (and even then destroying items wasn't implemented until the middle of his tenure) but reading about it isn't the same as playing it and I want to run a few characters on as many of the stable releases from prior to the beginning of Ben's era. I am particularly insterested in the 2.5/Charles Swiger era which I completely skipped over. I'm happy to use Linux (I am running Arch but I wouldn't mind spinning up another distro for this) or DOS (Dosbox). I tried to compile Angband 2.7.8 for Linux (which is actually Ben Harrison's second stable version to "ship") but I ran into compile errors with this as well.

      Code:
       [janusduo@ArchBox src]$ sudo make install
      [sudo] password for janusduo:
      gcc -O -Dregister= -c io.c
      io.c:12:10: fatal error: bsd/sgtty.h: No such file or directory
         12 | #include <bsd/sgtty.h>
            |          ^~~~~~~~~~~~~
      compilation terminated.
      make: *** [Makefile:151: io.o] Error 1
      I found a copy of a file named sgtty.h in another place in my filesystem and tried pointing to that but what followed was a bunch more errors. I tried picking through them and didn't really get anywhere so I reverted io.c for now. I did go through config.h and set the install directory and anything that seemed to need my attention before compilation but I'm really just guessing here.

      Are there any post PCAngband and pre-Ben Harrison binaries for DOS( or Linux) kicking around? I haven't been able to find any. I downloaded the Angband 2.7.8 linux binary from https://web.archive.org/web/20061028...Angband/Linux/ but when I tried to run it I go a "cannot execute binary exec format" error. This leads me to suspect that I will need to somehow compile source myself if I want it to run on Linux so maybe DOS binaries are a better bet. Does anyone know how to compile the 2.5-2.6.2 or at least pre 2.7.4 (which is the earliest DOS binary after PCAngband that I've been able to find online.)

      Comment

      • Julian
        Adept
        • Apr 2021
        • 122

        #4
        Or, I suppose, getting an old version of gcc installed, which may be easier.

        You may also be in for a hard time of finding compatible curses/ncurses libraries; I don’t know how much their interfaces have changed over the decades.

        Comment

        • Mike
          Rookie
          • Mar 2021
          • 21

          #5
          gcc 3

          The feature was removed in gcc 4, so you'll need gcc 3.x.


          If you only want to play it though and don't intend to modify it, with the only problem being that there aren't any Linux/amd64 binaries around, then you may find it easier to run an old binary under an emulator (wine for example, or something more exotic depending on what you used BITD - advantage = you get the full retro experience. disadvantage, same

          Comment

          • Julian
            Adept
            • Apr 2021
            • 122

            #6
            Originally posted by JanusDuo
            I am also wanting to compile old versions of Angband. I started playing on Fangband (not FaAngband) back in the 90s and eventually found the official Angband community in the 2.8.x days and played until around when Ben stepped down. I haven't played much since but recently got my first ever laptop and am having a really fun time installing and playing all my old favorite games. While hunting down the old Fangband binary I found rephial.org which did not exist last time I checked up on the community. I did find DOS binaries for all the old PCAngband stuff. I am fascinated that so many features in Fangband did not make it in to the official game until the Ben era (and even then destroying items wasn't implemented until the middle of his tenure)
            Variants weren’t really a thing until Ben’s tenure; his code cleanup and exiling of game data to text files made it much, much, easier to make a variant.

            I tried to compile Angband 2.7.8 for Linux (which is actually Ben Harrison's second stable version to "ship") but I ran into compile errors with this as well.

            Code:
             [janusduo@ArchBox src]$ sudo make install
            [sudo] password for janusduo:
            gcc -O -Dregister= -c io.c
            io.c:12:10: fatal error: bsd/sgtty.h: No such file or directory
               12 | #include <bsd/sgtty.h>
                  |          ^~~~~~~~~~~~~
            compilation terminated.
            make: *** [Makefile:151: io.o] Error 1
            You may be in luck. IIRC, there were several makefiles and a bunch of compile-time options to deal with the plethora of Unixen. I’m guessing that it’s trying to build for a BSD instead of Linux, and there’s probably a better set of options in the Makefile, and you just need to comment out the ones it’s using and uncomment one of the others.

            Comment

            • JanusDuo
              Rookie
              • May 2021
              • 2

              #7
              Originally posted by Mike
              The feature was removed in gcc 4, so you'll need gcc 3.x.
              Oh, thank you for that info! I'll try using one of the gcc 3.x versions next time I get back to working on this. This is exactly the sort of advice I was hoping to find here. I used to lurk in an Angband channel on an IRC server back in the day. Stormfront or something? I wonder if there is an IRC chat or a Discord that Angband folks like to use these days. This was the nearest I found with a quick DuckGo. I'll do some more searching later.

              Originally posted by Julian
              Variants weren’t really a thing until Ben’s tenure; his code cleanup and exiling of game data to text files made it much, much, easier to make a variant.
              Oh yeah, for sure. I was reading on the Rephial page of Angband 2.5.0-beta that FAngband was the first, and I think it forked off of an early PC version of 2.4.frog-knows. It amazes me that instead of that becoming the next official version the later official versions simply re-implemented all of its features into what had become the official Angband version.

              Originally posted by Julian
              You may be in luck. IIRC, there were several makefiles and a bunch of compile-time options to deal with the plethora of Unixen. I’m guessing that it’s trying to build for a BSD instead of Linux, and there’s probably a better set of options in the Makefile, and you just need to comment out the ones it’s using and uncomment one of the others.
              Yeah, that makes quite a bit of sense. I'll chase down that possibility when I get back to it. I have a very busy two weeks ahead of me so unless I happen to have time to kill that I don't expect I probably won't get into it for a while.

              Thanks to you both so much for the feedback! I really love Angband, it was my first d20-inspired video game RPG and is still my favorite. ToME <2.3.5 ended up being my favorite variant, although before I got into that I spent a lot of time with Zangband. Around that same time I met Eric Bock on the IRC and played his Zceband variant a bunch too which has a lot of cool stuff like demons from Doom, rocket and shard attacks, as well as explosive barrels and stuff like that.

              Has anybody ever seen an Angband variant with a Doom style "Build Engine" GUI? I never knew at the time how similar Doom was to a Roguelike under the hood, being a 2D overhead game which is then displayed in 3D. Ah well, there is always that game "One More Dungeon" which is basically a modern take on this idea. I just think it would be more fun for me if it was Angband content and possibly turn-based.

              Comment

              • fph
                Veteran
                • Apr 2009
                • 1030

                #8
                Originally posted by JanusDuo
                Has anybody ever seen an Angband variant with a Doom style "Build Engine" GUI? I never knew at the time how similar Doom was to a Roguelike under the hood, being a 2D overhead game which is then displayed in 3D. Ah well, there is always that game "One More Dungeon" which is basically a modern take on this idea. I just think it would be more fun for me if it was Angband content and possibly turn-based.
                This reminds me a lot of https://en.wikipedia.org/wiki/Falcon's_Eye , although it's just isometric, not true 3D.

                Anyhow, welcome! It seems we have similar tastes in terms of variants.
                --
                Dive fast, die young, leave a high-CHA corpse.

                Comment

                • Nick
                  Vanilla maintainer
                  • Apr 2007
                  • 9638

                  #9
                  Originally posted by JanusDuo
                  I wonder if there is an IRC chat or a Discord that Angband folks like to use these days.
                  There's #angband and #angband-dev on freenode.net, but they're both pretty quiet these days. There is also an angband channel on the roguelikes discord server, which is quite active. Also there's angband.live, which is a webserver with Angband and multiple variants playable from a browser, and which also has chat.
                  One for the Dark Lord on his dark throne
                  In the Land of Mordor where the Shadows lie.

                  Comment

                  • johannna
                    Rookie
                    • May 2021
                    • 3

                    #10
                    I have tried the same thing

                    Old versions of gcc are finicky in the extreme. Use the --traditional flag to get past some of the issues.

                    Comment

                    • lea2501
                      Apprentice
                      • Dec 2019
                      • 61

                      #11
                      I was able to compile version 2.9.3 in linux with this commands

                      Code:
                      $ curl -OL "https://github.com/angband/angband/archive/refs/tags/v2.9.3.tar.gz
                      $ tar -xzvf v2.9.3.tar.gz
                      $ cd angband-2.9.3/
                      $ ./configure --with-no-install
                      $ make
                      However, when i start the game with

                      Code:
                      ./src/angband -uUser -mgcu -- -n1
                      it fails to start showing a message saying

                      Code:
                      Savefile does not exist. -more-
                      Any idea of where i need to create it?

                      Comment

                      • fph
                        Veteran
                        • Apr 2009
                        • 1030

                        #12
                        Have you tried omitting -uUser ?
                        --
                        Dive fast, die young, leave a high-CHA corpse.

                        Comment

                        • Bill Peterson
                          Adept
                          • Jul 2007
                          • 190

                          #13
                          Originally posted by fph
                          This reminds me a lot of https://en.wikipedia.org/wiki/Falcon's_Eye , although it's just isometric, not true 3D.

                          Anyhow, welcome! It seems we have similar tastes in terms of variants.
                          There is an Angband variant with the isometric look of Falcon's Eye, AngbandTk. It's included with 3 other variants in OmnibandTk. The Angband version that's implemented is 2.9.3

                          I was surprised that OmnibandTk isn't in this sites variants tab, but I did find a copy using Google, at https://www.dropbox.com/s/delqrrxgun...andtk.zip?dl=0

                          I can't personally vouch for this copy, it's 18MB while my copy is 20MB.

                          Comment

                          • Julian
                            Adept
                            • Apr 2021
                            • 122

                            #14
                            Originally posted by lea2501
                            I was able to compile version 2.9.3 in linux with this commands

                            Code:
                            $ curl -OL "https://github.com/angband/angband/archive/refs/tags/v2.9.3.tar.gz
                            $ tar -xzvf v2.9.3.tar.gz
                            $ cd angband-2.9.3/
                            $ ./configure --with-no-install
                            $ make
                            However, when i start the game with

                            Code:
                            ./src/angband -uUser -mgcu -- -n1
                            it fails to start showing a message saying

                            Code:
                            Savefile does not exist. -more-
                            Any idea of where i need to create it?
                            No, but it’s probably defined in the code somewhere.

                            Try this in the source directory:

                            grep DIR *.[ch] Makefile*

                            (I think it would look for the lib directory in the current directory if nothing else was defined, but I could be wrong.)

                            Comment

                            • lea2501
                              Apprentice
                              • Dec 2019
                              • 61

                              #15
                              Originally posted by Julian
                              No, but it’s probably defined in the code somewhere.

                              Try this in the source directory:

                              grep DIR *.[ch] Makefile*

                              (I think it would look for the lib directory in the current directory if nothing else was defined, but I could be wrong.)
                              I tried that but i could not find the savegame file its searching...

                              Code:
                              lea@devuan:~/games/roguelikes/angband/angband-2.9.3/src$ grep DIR *.[ch] Makefile* | grep ANGBAND_DIR_SAVE
                              externs.h:extern cptr ANGBAND_DIR_SAVE;
                              files.c:                path_build(savefile, 1024, ANGBAND_DIR_SAVE, temp);
                              init2.c:        string_free(ANGBAND_DIR_SAVE);
                              init2.c:        ANGBAND_DIR_SAVE = string_make("");
                              init2.c:        ANGBAND_DIR_SAVE = string_make(path);
                              init2.c:        string_free(ANGBAND_DIR_SAVE);
                              main.c:                 string_free(ANGBAND_DIR_SAVE);
                              main.c:                 ANGBAND_DIR_SAVE = string_make(s+1);
                              main-emx.c:                char **ANGBAND_DIR_SAVE,
                              main-emx.c:                      (char**)&ANGBAND_DIR_SAVE,
                              main-gtk.c:             path_build(buf, 1024, ANGBAND_DIR_SAVE, "*");
                              main-win.c:                             ofn.lpstrInitialDir = ANGBAND_DIR_SAVE;
                              main-win.c:     validate_dir(ANGBAND_DIR_SAVE);
                              variable.c:cptr ANGBAND_DIR_SAVE;
                              lea@devuan:~/games/roguelikes/angband/angband-2.9.3/src$ grep DIR *.[ch] Makefile* | grep savefile
                              files.c:                path_build(savefile, 1024, ANGBAND_DIR_SAVE, temp);
                              I also searched in lib but i don't see anything that help me sadly

                              Code:
                              lea@devuan:~/games/roguelikes/angband/angband-2.9.3$ ls -lahF lib/
                              total 80K
                              drwxr-xr-x 13 lea lea 4.0K Oct 27 23:49 ./
                              drwxr-xr-x  4 lea lea 4.0K Oct 27 23:49 ../
                              drwxr-xr-x  2 lea lea 4.0K Oct 27 23:52 apex/
                              drwxr-xr-x  2 lea lea 4.0K Oct 27 23:49 bone/
                              drwxr-xr-x  2 lea lea 4.0K Oct 27 23:52 data/
                              drwxr-xr-x  2 lea lea 4.0K Oct 27 23:49 edit/
                              drwxr-xr-x  2 lea lea 4.0K Oct 27 23:49 file/
                              drwxr-xr-x  2 lea lea 4.0K Oct 27 23:49 help/
                              drwxr-xr-x  2 lea lea 4.0K Oct 27 23:49 info/
                              -rw-r--r--  1 lea lea 8.2K Oct 27 23:49 Makefile
                              -rw-r--r--  1 lea lea  140 Sep 29  2012 Makefile.am
                              -rw-r--r--  1 lea lea 8.1K Sep 29  2012 Makefile.in
                              drwxr-xr-x  2 lea lea 4.0K Oct 27 23:49 pref/
                              drwxr-xr-x  2 lea lea 4.0K Oct 27 23:49 save/
                              drwxr-xr-x  2 lea lea 4.0K Oct 27 23:49 user/
                              drwxr-xr-x  2 lea lea 4.0K Oct 27 23:49 xtra/
                              lea@devuan:~/games/roguelikes/angband/angband-2.9.3$ ls -lahF lib/save/
                              total 28K
                              drwxr-xr-x  2 lea lea 4.0K Oct 27 23:49 ./
                              drwxr-xr-x 13 lea lea 4.0K Oct 27 23:49 ../
                              -rw-r--r--  1 lea lea    0 Sep 29  2012 delete.me
                              -rw-r--r--  1 lea lea 5.3K Oct 27 23:49 Makefile
                              -rw-r--r--  1 lea lea  356 Sep 29  2012 Makefile.am
                              -rw-r--r--  1 lea lea 5.3K Sep 29  2012 Makefile.in

                              Comment

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