Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Variants

Reply
 
Thread Tools Display Modes
Old April 16, 2015, 22:34   #41
jevansau
Adept
 
Join Date: Jan 2009
Age: 59
Posts: 157
jevansau is on a distinguished road
A quick question on speed - does it work similarly to other Angbands, or is there a change?
I ask because it is displayed as movement speed, maybe implying that it doesn't affect other actions.
jevansau is offline   Reply With Quote
Old April 17, 2015, 01:11   #42
debo
Veteran
 
debo's Avatar
 
Join Date: Oct 2011
Location: Toronto, Canada
Posts: 2,344
debo is on a distinguished road
Quote:
Originally Posted by jevansau View Post
A quick question on speed - does it work similarly to other Angbands, or is there a change?
I ask because it is displayed as movement speed, maybe implying that it doesn't affect other actions.
It's like hellband I think -- movement and attack speed are decoupled.
__________________
Glaurung, Father of the Dragons says, 'You cannot avoid the ballyhack.'
debo is offline   Reply With Quote
Old April 17, 2015, 08:18   #43
Dean Anderson
Adept
 
Join Date: Nov 2009
Posts: 124
Dean Anderson is on a distinguished road
Quote:
Originally Posted by Nerdanel View Post
Cthangband doesn't compile on Linux. This is because Linux is case-sensitive (not just case-preserving), and most of the source files have been renamed to start with capital letters. Meanwhile all the makefiles and the includes in the source files all use uncapitalized versions of the filenames.

Also, makefile.org still uses the hellband name.

I'm now going to have to rename the files one by one...

EDIT TO ADD:

Having renamed the files, I now get the following error message:

Code:
$ make -f makefile.org
gcc -I/usr/X11R6/include -I/usr/include/ncurses -Wall -O2 -fno-strength-reduce -
pedantic -D"USE_X11" -D"USE_GCU" -D"USE_NCURSES"   -c -o z-util.o z-util.c
In file included from h-basic.h:16:0,
                 from z-util.h:6,
                 from z-util.c:5:
h-system.h:107:21: error: macro "strchr" requires 2 arguments, but only 1 given
 extern char *strchr();
                     ^
h-system.h:107:14: error: 'strchr' redeclared as different kind of symbol
 extern char *strchr();
              ^
<builtin>: recipe for target 'z-util.o' failed
make: *** [z-util.o] Error 1
So yes, it errors out when trying to compile the first file.
That doesn't surprise me at all. I've never seen a Linux version of Cthangband (I'm sure people have done them for their own use over the years, but no-one has ever sent me updated files back to stick in the "official" source code). And since I don't have Linux and never use makefiles these things just get copied from version to version and are usually woefully out of date.

I know that there are some funky #ifdef preprocessor commands throughout the code to deal with different platforms and it vaguely rings a bell that the redefinition of strchr is wrapped in them (I don't have the code in front of me to check), so the error you're getting with z-util is probably because they're set up wrongly, but again I've no experience of compiling on anything except Windows or DOS and these things are things that I inherited from the Zangband code 18 years ago and haven't touched since.
Dean Anderson is offline   Reply With Quote
Old April 17, 2015, 09:39   #44
Nerdanel
Rookie
 
Join Date: Dec 2008
Posts: 15
Nerdanel is on a distinguished road
Quote:
Originally Posted by Dean Anderson View Post
That doesn't surprise me at all. I've never seen a Linux version of Cthangband (I'm sure people have done them for their own use over the years, but no-one has ever sent me updated files back to stick in the "official" source code). And since I don't have Linux and never use makefiles these things just get copied from version to version and are usually woefully out of date.

I know that there are some funky #ifdef preprocessor commands throughout the code to deal with different platforms and it vaguely rings a bell that the redefinition of strchr is wrapped in them (I don't have the code in front of me to check), so the error you're getting with z-util is probably because they're set up wrongly, but again I've no experience of compiling on anything except Windows or DOS and these things are things that I inherited from the Zangband code 18 years ago and haven't touched since.
I've played SCthangband, and it compiled just fine, no modifications. I'm also the person who fixed the Linux makefile for you for early Hellband. (No, I don't mind that you don't remember. I wouldn't remember either.) If I recall correctly, there were no issues with the code compiling, but you had added one or more source files that needed to be correspondingly mentioned in the makefile.

So it looks like that strchr thing is something new, which should make the change that broke it easier to pinpoint.

EDIT TO ADD:

I commented out the offending double definition and its two suspicious buddies while I was at it. Probably the real issue was that USG should have been defined but wasn't. With that I was able to get the compile going until a failure at the final linking part.

Code:
gcc -I/usr/X11R6/include -I/usr/include/ncurses -Wall -O2 -fno-strength-reduce -
pedantic -D"USE_X11" -D"USE_GCU" -D"USE_NCURSES" -o hellband z-util.o z-virt.o z-
form.o z-rand.o z-term.o variable.o tables.o util.o cave.o object1.o object2.o 
monster1.o monster2.o xtra1.o xtra2.o spells1.o spells2.o melee1.o melee2.o save
.o files.o cmd1.o cmd2.o cmd3.o cmd4.o cmd5.o cmd6.o store.o birth.o load.o wiza
rd1.o wizard2.o generate.o dungeon.o init1.o init2.o quest.o main-gcu.o main-x11
.o main.o  -L/usr/X11R6/lib -lXaw -lXext -lSM -lICE -lXmu -lXt -lX11 -lncurses
util.o: In function `path_temp':
util.c:(.text+0x56e): warning: the use of `tmpnam' is dangerous, better use `mks
temp'
main.o: In function `init_stuff':
main.c:(.text+0x53): undefined reference to `get_windows_user_path'
main.o: In function `main':
main.c:(.text.startup+0x380): undefined reference to `init_wcn'
collect2: error: ld returned 1 exit status
makefile.org:224: recipe for target 'hellband' failed
make: *** [hellband] Error 1
So main.c now relies on two functions that are defined only in main-wcn.c, a Windows-only file that doesn't get compiled for systems that aren't Windows.

Last edited by Nerdanel; April 17, 2015 at 16:15.
Nerdanel is offline   Reply With Quote
Old April 17, 2015, 21:05   #45
Nerdanel
Rookie
 
Join Date: Dec 2008
Posts: 15
Nerdanel is on a distinguished road
So I commented out the line "#define USE_WCN" in defines.h, though to get that to stick I had to first chmod myself the write permissions that for some reason weren't there. That allowed the program to compile. Then I had to decapitalize the stuff in data/text to get past those errors. I also modified makefile.org a little and commented out the install rule that was no longer needed because of the directory structure changes. At that point I ran into a mysterious freeze on startup after the program displays the logo and checks the files but before allowing user interaction, and a gdb stack trace revealed that the freeze occurred at rng-related code.

So it looks like there are still some defines wrong or missing or maybe some code has been deleted, but I'm getting tired of this thing. I saw that other thread, and if Cthangband is going to get converted to C# I'm so not going to bother with the game.
Nerdanel is offline   Reply With Quote
Old April 17, 2015, 21:56   #46
debo
Veteran
 
debo's Avatar
 
Join Date: Oct 2011
Location: Toronto, Canada
Posts: 2,344
debo is on a distinguished road
Quote:
Originally Posted by Nerdanel View Post
So I commented out the line "#define USE_WCN" in defines.h, though to get that to stick I had to first chmod myself the write permissions that for some reason weren't there. That allowed the program to compile. Then I had to decapitalize the stuff in data/text to get past those errors. I also modified makefile.org a little and commented out the install rule that was no longer needed because of the directory structure changes. At that point I ran into a mysterious freeze on startup after the program displays the logo and checks the files but before allowing user interaction, and a gdb stack trace revealed that the freeze occurred at rng-related code.
We've seen this trying to build other variants before, and I think the culprit was a 32bit vs 64bit problem.
__________________
Glaurung, Father of the Dragons says, 'You cannot avoid the ballyhack.'
debo is offline   Reply With Quote
Old April 17, 2015, 22:59   #47
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,365
AnonymousHero is on a distinguished road
Quote:
Originally Posted by debo View Post
We've seen this trying to build other variants before, and I think the culprit was a 32bit vs 64bit problem.
Yes, indeed. I can't recall what the fix was, but I recall stumbling into this rng-related hang in PosChengband (or Cheng? or Entro?), I think. A search of my posts may reveal a workaround, but I cannot be bothered right now.
AnonymousHero is offline   Reply With Quote
Old April 18, 2015, 00:24   #48
Dean Anderson
Adept
 
Join Date: Nov 2009
Posts: 124
Dean Anderson is on a distinguished road
Quote:
Originally Posted by Nerdanel View Post
So main.c now relies on two functions that are defined only in main-wcn.c, a Windows-only file that doesn't get compiled for systems that aren't Windows.
I see that you've given up, but for the benefit of others, it only tries to call those functions if you've told it to by defining USE_WCN, which is in with all the other USE_XXX definitions for other systems and is documented in the comments. You're supposed to enable some of these and disable others depending on your configuration.

Similarly the function calls themselves are in the middle of a bunch of other system-specific calls (all inside matching preprocessor directives aimed at their platforms) for the initialisation routines for other systems - again, perfectly normal and standard for Angband and its variants (at least, before the major 3.x rewrite).

There are no unusual or hard-wired dependencies on Windows-only files. Only normal ones that are conditionally there when you tell it that you're using Windows!

Last edited by Dean Anderson; April 18, 2015 at 00:32.
Dean Anderson is offline   Reply With Quote
Old April 18, 2015, 08:11   #49
Nerdanel
Rookie
 
Join Date: Dec 2008
Posts: 15
Nerdanel is on a distinguished road
Quote:
Originally Posted by Dean Anderson View Post
I see that you've given up, but for the benefit of others, it only tries to call those functions if you've told it to by defining USE_WCN, which is in with all the other USE_XXX definitions for other systems and is documented in the comments. You're supposed to enable some of these and disable others depending on your configuration.

Similarly the function calls themselves are in the middle of a bunch of other system-specific calls (all inside matching preprocessor directives aimed at their platforms) for the initialisation routines for other systems - again, perfectly normal and standard for Angband and its variants (at least, before the major 3.x rewrite).

There are no unusual or hard-wired dependencies on Windows-only files. Only normal ones that are conditionally there when you tell it that you're using Windows!
Yeah, I found the issue and commented out the define (which shouldn't have been there in defines.h in the first place, but anyway), but then there was that rng-related freeze I mentioned... That one probably won't be that hard to fix either, but if Cthangband is next going to become a Windows program written in C# I'm not going to bother.
Nerdanel is offline   Reply With Quote
Old April 19, 2015, 22:54   #50
caruso
Adept
 
Join Date: May 2011
Posts: 148
caruso is on a distinguished road
No announcement on Roguebasin yet, nor in the news on oook!?

Also, could someone please give me a hand while I try to start the game on Linux? I've been messing around with Wine for about half an hour and still can't figure it out

So, I have downloaded msvcr120.dll from the internet and copied it into ~/.wine/drive_c/windows/system32. After that, I right-clicked on Cthangband-500-Windows-Install.exe and selected "Open with Wine Windows program starter" (or something like that) and installed Cthangband using the default settings. Then I tried to adapt the instructions in the competition post and typed into a terminal:
Code:
cd ~/.wine/drive_c/Program Files/Cthangband
However, it returned an error message translating to "File or directory not found", even though I can see the Cthangband folder there with my own eyes (using Nautilus) What am I doing wrong?
caruso 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Announce DaJAngband 1.3.5 released will_asher Variants 9 June 25, 2012 14:05
Announce DaJAngband 1.3.0 released will_asher Variants 6 April 13, 2011 12:11
Announce DaJAngband 1.2.0 released will_asher Variants 19 March 23, 2010 20:46
Announce DaJAngband 1.1.2 released will_asher Variants 11 January 17, 2010 23:51
Announce DaJAngband v1.0.95 Released will_asher Variants 1 June 18, 2008 00:31


All times are GMT +1. The time now is 02:43.


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