Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Variants

Reply
 
Thread Tools Display Modes
Old August 20, 2007, 18:57   #1
TJA
Adept
 
TJA's Avatar
 
Join Date: Aug 2007
Posts: 117
TJA is on a distinguished road
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 at 19:18.
TJA is offline   Reply With Quote
Old August 20, 2007, 21:14   #2
Bandobras
Knight
 
Join Date: Apr 2007
Posts: 723
Bandobras is on a distinguished road
Quote:
Originally Posted by TJA View Post
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...

Quote:
Originally Posted by TJA View Post
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...

Quote:
Originally Posted by TJA View Post
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?
Bandobras is offline   Reply With Quote
Old August 20, 2007, 21:32   #3
TJA
Adept
 
TJA's Avatar
 
Join Date: Aug 2007
Posts: 117
TJA is on a distinguished road
Quote:
Originally Posted by Bandobras View Post
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 ....


Quote:
Originally Posted by Bandobras View Post
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.


Quote:
Originally Posted by Bandobras View Post
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
TJA is offline   Reply With Quote
Old August 20, 2007, 21:43   #4
Bandobras
Knight
 
Join Date: Apr 2007
Posts: 723
Bandobras is on a distinguished road
Quote:
Originally Posted by TJA View Post
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?
Bandobras is offline   Reply With Quote
Old August 20, 2007, 21:48   #5
TJA
Adept
 
TJA's Avatar
 
Join Date: Aug 2007
Posts: 117
TJA is on a distinguished road
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
TJA is offline   Reply With Quote
Old August 21, 2007, 11:20   #6
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,887
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by Bandobras View Post
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 is offline   Reply With Quote
Old August 21, 2007, 11:30   #7
TJA
Adept
 
TJA's Avatar
 
Join Date: Aug 2007
Posts: 117
TJA is on a distinguished road
Will you invest time to clean up the Makefiles to reflect the actual requirements?
Or is that nothing you plan to do?
TJA is offline   Reply With Quote
Old August 23, 2007, 20:10   #8
Bandobras
Knight
 
Join Date: Apr 2007
Posts: 723
Bandobras is on a distinguished road
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...
Bandobras is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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