Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Variants

Reply
 
Thread Tools Display Modes
Old January 21, 2022, 06:41   #1
smbhax
Adept
 
Join Date: Oct 2021
Location: WA
Posts: 207
smbhax is on a distinguished road
Zangband GNU Curses "Fatal Error" when run

After massacring makefiles and things for a bit I managed to compile what might be a GNU Curses version of Zangband 2.7.5.1 or whatever under Cygwin, but when trying to run it I get "Fatal Error."

In an earlier thread where this kind of thing came up, backwardsEric said "Fatal Error" means it can't find the "libs" directory. Running it with "-help" says it has a command line option along those lines

Code:
-d<def> Define a 'lib' dir sub-path
but I can't figure out how to use that. If anyone has any suggestions, I'd very much like to hear them. : )

Update:

src/z-config.h has two options that may be relevant to the lib thing:

DEFAULT_PATH

This defaults to "./lib/" but recommends that you change it to "the actual location of the 'lib' folder." Mine is under my Cygwin home, ~/zangband/lib/, so I tried setting it to "/zangband/lib/" before compiling, but "Fatal Error" persists.

FIXED_PATHS

This apparently "prevents usage" of the '-d<what=path' command line option. I tried commenting it out--but I still have no idea how to use -d, and it is giving me the same "bad semantics" and so forth errors when I try to guess at it.
__________________
My roguelike gameplay videos

Last edited by smbhax; January 21, 2022 at 09:23.
smbhax is offline   Reply With Quote
Old January 21, 2022, 17:51   #2
backwardsEric
Swordsman
 
Join Date: Aug 2019
Posts: 273
backwardsEric is on a distinguished road
When you set DEFAULT_PATH to "~/zangband/lib/", did you give it in exactly that form or in a form where the tilde had been replaced with the path to the home directory (i.e. what you would see if you ran "cd ~; pwd" from Cygwin's shell). It doesn't look like Zangband is prepared to handle the former so you'd have to give it the path where the tilde has already been replaced.

For the -d options, it looks like the format it wants is like this:

Code:
    -ds=your_path_here
where the letter after "-d" sets which directory you're changing. The above changes the location of the save file directory. With a misconfigured DEFAULT_PATH, you'll have to override a lot of directories (-de=... -df=... ...), so I'd try to get the right DEFAULT_PATH and avoid trying to set the directories manually on Zangband's command line.
backwardsEric is offline   Reply With Quote
Old January 21, 2022, 19:11   #3
smbhax
Adept
 
Join Date: Oct 2021
Location: WA
Posts: 207
smbhax is on a distinguished road
Quote:
Originally Posted by backwardsEric View Post
When you set DEFAULT_PATH to "~/zangband/lib/", did you give it in exactly that form or in a form where the tilde had been replaced with the path to the home directory (i.e. what you would see if you ran "cd ~; pwd" from Cygwin's shell). It doesn't look like Zangband is prepared to handle the former so you'd have to give it the path where the tilde has already been replaced.
Thanks! Yeah z-config.h gave some example paths that did not include ~ so I guessed and just went with "/zangband/lib/" which not surprisingly still didn't work.

"cd ~; pwd" gives me "/home/smbhax" so now I'm trying "/home/smbhax/zangband/lib/"... Still "Fatal Error" though.

Actually hm this in the generated makefile looks suspicious

Code:
prefix = /usr/local
exec_prefix = ${prefix}


bindir = ${exec_prefix}/bin
datadir = ${prefix}/share

DESTDIR = $(datadir)/games/zangband/
GAMEGROUP = games

CFLAGS += -DDEFAULT_PATH=\"$(DESTDIR)lib/\"
Commenting that CFLAGS += out and trying

Code:
CFLAGS := -Wall -O1 -pipe -g -D"USE_GCU" -DDEFAULT_PATH=\"/home/smbhax/zangband/lib/\"
allows the game to launch. : ) But then it hangs at stat rolling with high CPU usage. Same result with no -DDEFAULT_PATH parameter set--falls back to ./lib/ then I suppose. Well, I have no idea what that is, drat...other than that it's all slightly reminiscent of where Hengband was quitting out with its setguid problem. Zangband has a z-config.h option to disable autoroller, but that causes compilation errors.
__________________
My roguelike gameplay videos

Last edited by smbhax; January 21, 2022 at 19:25.
smbhax is offline   Reply With Quote
Old January 21, 2022, 19:52   #4
backwardsEric
Swordsman
 
Join Date: Aug 2019
Posts: 273
backwardsEric is on a distinguished road
Quote:
Originally Posted by smbhax View Post
But then it hangs at stat rolling with high CPU usage. Same result with no -DDEFAULT_PATH parameter set--falls back to ./lib/ then I suppose. Well, I have no idea what that is, drat...other than that it's all slightly reminiscent of where Hengband was quitting out with its setguid problem. Zangband has a z-config.h option to disable autoroller, but that causes compilation errors.
There was a similar problem with Hengband 1.6.2 - on 64-bit systems the types it chose for fixed-size integers led to the random number initialization getting stuck. The change to src/h-types.h that was used to fix it is here (the change to configure.ac won't be relevant if you're not using autoconf and the configure script). Alternatively, compiling everything with "-DL64" included in CFLAGS may work too.
backwardsEric is offline   Reply With Quote
Old January 21, 2022, 20:27   #5
smbhax
Adept
 
Join Date: Oct 2021
Location: WA
Posts: 207
smbhax is on a distinguished road
Quote:
Originally Posted by backwardsEric View Post
Alternatively, compiling everything with "-DL64" included in CFLAGS may work too.
Dude, you know too much and it is amazing. That's got it running. : )
__________________
My roguelike gameplay videos
smbhax is offline   Reply With Quote
Old January 21, 2022, 20:38   #6
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 56
Posts: 9,317
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
Quote:
Originally Posted by smbhax View Post
Dude, you know too much and it is amazing.
Excellent summary
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old January 22, 2022, 14:28   #7
Gwarl
Knight
 
Join Date: Jan 2017
Posts: 919
Gwarl will become famous soon enough
FWIW I usually fix it like this:

https://github.com/OwenGHB/angband-2...16d17a54f5d1d6
Gwarl is offline   Reply With Quote
Old January 22, 2022, 18:50   #8
smbhax
Adept
 
Join Date: Oct 2021
Location: WA
Posts: 207
smbhax is on a distinguished road
Quote:
Originally Posted by Gwarl View Post
Thanks for sharing that. : ) The fact that you've had Zangband running in Curses on angband.live all this time is what gave me hope!
__________________
My roguelike gameplay videos
smbhax is offline   Reply With Quote
Old January 22, 2022, 18:54   #9
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,667
Donated: $40
Pete Mack is on a distinguished road
Getting 64 bits working on windows wasnt too hard either. I think it took 4 changes.
Pete Mack 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
Compiling Hengband: "fatal error: util.h: No such file or directory" smbhax Variants 66 February 3, 2022 21:02
Getting "error!! is this really character dump?" TheQuest Variants 4 July 20, 2017 11:31
3.5 key map error "x" Ingwe Ingweron Development 1 January 4, 2014 02:29
Lua "obsolete file error", blargh Therem Harth ToME 4 July 4, 2010 14:02
help with compile error (and "const") will_asher Development 4 August 3, 2009 23:35


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


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