Review: UnAngband

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TJA
    Adept
    • Aug 2007
    • 117

    Review: UnAngband

    PART I.
    Compilation

    Code:
    unzip unangband-062-wip5b-src.zip
    cd unangband-062-src
    cd src
    Edit Makefile.std

    Confige Makefile.std to say:
    NORMAL_CFLAGS = -Wall -pipe -O2 -D"USE_GCU" -D"USE_NCURSES"
    LIBS = -lncurses


    Code:
    make -f Makefile.std
    make -f Makefile.std install
    cd ..
    Make produces a strange error again:
    util.o(.text+0x213): In function `path_temp':
    util.c: warning: the use of `tmpnam' is dangerous, better use `mkstemp'

    Also a strange error:

    xtra1.c: In function `calc_bonuses':
    xtra1.c:3694: warning: comparison is always false due to limited range of data type

    Code:
    ./unangband
    Works, but needs knowledge of what to change.

    Like in Portralis, i needed to fiddle around to find the right seetings - at first i got bad results because no output modules (use via "-m") could be found.
    But then, i got it

    First impression: Questions could just be answered with <Return>, which is great IMHO
    Last edited by TJA; August 20, 2007, 18:18.
  • Bandobras
    Knight
    • Apr 2007
    • 726

    #2
    Originally posted by TJA
    Confige Makefile.std to say:
    NORMAL_CFLAGS = -Wall -pipe -O2 -D"USE_GCU" -D"USE_NCURSES"
    LIBS = -lncurses
    What was the problem with the original Makefile.std? It works for me...

    Originally posted by TJA
    Make produces a strange error again:
    util.o(.text+0x213): In function `path_temp':
    util.c: warning: the use of `tmpnam' is dangerous, better use `mkstemp'

    Also a strange error:

    xtra1.c: In function `calc_bonuses':
    xtra1.c:3694: warning: comparison is always false due to limited range of data type
    These are not errors, but warnings, as you can read...

    Originally posted by TJA
    Like in Portralis, i needed to fiddle around to find the right seetings - at first i got bad results because no output modules (use via "-m") could be found.
    What was the problem, exactly?

    Comment

    • TJA
      Adept
      • Aug 2007
      • 117

      #3
      Originally posted by Bandobras
      What was the problem with the original Makefile.std? It works for me...
      At first, could not find termcap:

      gcc -Wall -pipe -O2 -D"USE_X11" -D"USE_GCU" -D"USE_NCURSES" -o unangband birth.o cave.o cmd1.o cmd2.o cmd3.o cmd4.o cmd5.o cmd6.o info.o dungeon.o files.o generate.o init1.o init2.o load.o melee1.o melee2.o monster1.o monster2.o object1.o object2.o randart.o save.o spells1.o spells2.o store.o tables.o util.o variable.o wizard1.o wizard2.o xtra1.o xtra2.o borgdumb.o z-form.o z-rand.o z-term.o z-util.o z-virt.o main-cap.o main-gcu.o main-x11.o main-xaw.o main.o maid-x11.o -lX11 -lncurses -ltermcap -L/usr/X11R6/lib
      /usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../../i586-suse-linux/bin/ld: cannot find -ltermcap
      collect2: ld returned 1 exit status

      Removing -ltermcap was enough to get it compiled and installed - i just wanted to delete X11 as well ....


      Originally posted by Bandobras
      These are not errors, but warnings, as you can read...
      Now ... normaly i would say "YES".
      But THIS warning says something about an algorithm and how it may work or not.
      So, this is more a content-warning - so maybe more interesting then a syntax warning.


      Originally posted by Bandobras
      What was the problem, exactly?
      It was not straight forward for me to reduce the compilation to curses/ncurses. Some time (4 or 5 compiles) i got a binary that offered NO output version for the "-m" argument. The --help option did list nothing to choose from ...
      After i got it, it was easy of course.

      I love "configure" - should have a look at how to create such a thing

      Comment

      • Bandobras
        Knight
        • Apr 2007
        • 726

        #4
        Originally posted by TJA
        At first, could not find termcap:
        Ok, now I see your point. I have no clue if termcap is of any use here. Does anybody know if "-ltermcap" should be removed from the makefile or rather that TJA should better install termcap or a version of ncurses with termcap.h instead (my Debian version has it)? At my machine it seems to work OK without termcap, but perhaps it only shows its usefulness when run remotely on some strange terminal?

        BTW., why don't you use the X11 version?

        Comment

        • TJA
          Adept
          • Aug 2007
          • 117

          #5
          I have termcap - it will not be found:

          Code:
          rpm -qa | egrep "(termcap|curses)"
          ncurses-devel-5.4-68
          termcap-2.0.8-879
          ncurses-5.4-68
          There does not seem to be a termcap-devel package available, as everything is included in this package already:

          Code:
          /usr/include/curses
          /usr/include/curses/curses.h
          /usr/include/termcap
          /usr/include/termcap/termcap.h
          /usr/lib/curses
          /usr/lib/curses/libcurses.a
          /usr/lib/curses/libcurses.so
          /usr/lib/libcurses.so.1
          /usr/lib/libcurses.so.1.0.0
          /usr/lib/libtermcap.so.2
          /usr/lib/libtermcap.so.2.0.8
          /usr/lib/termcap
          /usr/lib/termcap/libtermcap.a
          /usr/lib/termcap/libtermcap.so
          Still, the Makefile.std does not work with it ...

          No idea why :-O

          Comment

          • takkaria
            Veteran
            • Apr 2007
            • 1951

            #6
            Originally posted by Bandobras
            Ok, now I see your point. I have no clue if termcap is of any use here. Does anybody know if "-ltermcap" should be removed from the makefile or rather that TJA should better install termcap or a version of ncurses with termcap.h instead (my Debian version has it)?
            -ltermcap isn't necessary, AFAICT. V doesn't use it at all anymore -- though it is required if you use main-cap.c (something else V doesn't have anymore).
            takkaria whispers something about options. -more-

            Comment

            • TJA
              Adept
              • Aug 2007
              • 117

              #7
              Will you invest time to clean up the Makefiles to reflect the actual requirements?
              Or is that nothing you plan to do?

              Comment

              • Bandobras
                Knight
                • Apr 2007
                • 726

                #8
                I've just removed -ltermcap in SVN. Thanks for pointing this out, TJA and thank you for the tip, takkaria.

                BTW., I've just noticed I didn't have -ltermcap in my local copy of Makefile.std already for some time...

                Comment

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