You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However I ran into two errors that I was able to fix, not sure about whether or not these should be made into a PR or not but I'd be happy to do it if these fixes are proper (my C is rusty):
The first error was:
dungeon.c:2481:12: error: implicitly declaring library function 'toupper' with type 'int (int)' [-Werror,-Wimplicit-function-declaration]
buf[i] = toupper(buf[i]);
^
dungeon.c:2481:12: note: include the header <ctype.h> or explicitly provide a declaration for 'toupper'
I resolved this by following the suggestion and adding #include <ctype.h> to src/dungeon.c.
The second error I hit was:
cc -O -I../include -c ../sys/share/ioctl.c
../sys/share/ioctl.c:110:9: error: implicit declaration of function 'ioctl' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (ioctl(fileno(stdin), (int)TIOCGWINSZ, (char *)&ttsz) != -1) {
^
1 error generated.
I resolved this by appending -Wno-implicit-function-declaration to the CFLAGS in src/Makefile:
I then updated GAMEUID and GAMEGRP in the root Makefile to my username and staff as the group accordingly, which allowed the game to be installed correctly.
However, one last issue is that if I run /usr/local/slashthemdir/slashthem, I get the perm bug error:
Cannot open file perm. This is a program bug.
Waiting for release of fcntl lock on perm. (9 retries left).
Waiting for release of fcntl lock on perm. (8 retries left).
Waiting for release of fcntl lock on perm. (7 retries left).
Waiting for release of fcntl lock on perm. (6 retries left).
Waiting for release of fcntl lock on perm. (5 retries left).
Waiting for release of fcntl lock on perm. (4 retries left).
Waiting for release of fcntl lock on perm. (3 retries left).
Waiting for release of fcntl lock on perm. (2 retries left).
Waiting for release of fcntl lock on perm. (1 retries left).
Waiting for release of fcntl lock on perm. (0 retries left).
I give up. Sorry.
Some other process has an unnatural grip on perm.
Hit space to continue:
I can work around this by creating a "perm" file with 644 permissions in whatever my current working directory is, and the game will launch without issue. So it appears to only be looking for that file in the current directory, instead of /usr/local/slashthemdir/ or even ~/slashthemdir. Is there something I can do to fix that particular issue? I'd rather not have a random "perm" file sitting around my home directory :)
The text was updated successfully, but these errors were encountered:
the header for ioctl is <sys/ioctl.h>, I think the preprocessor mess near the top of sys/share/ioctl.c are a bit of a mess and don't quite check what to do for macos properly
I suspect that's probably a running theme throughout and why toupper isn't declared either
depending which makefile you used there should be a shell script as well (in I think /usr/local/bin/slashthem maybe?) which sets the environment variables to point at the directory with perm in
I cloned this repository and tried the setup instructions from https://nethackwiki.com/wiki/SlashTHEM#Compiling_in_Mac_OSX
However I ran into two errors that I was able to fix, not sure about whether or not these should be made into a PR or not but I'd be happy to do it if these fixes are proper (my C is rusty):
The first error was:
I resolved this by following the suggestion and adding
#include <ctype.h>
to src/dungeon.c.The second error I hit was:
I resolved this by appending
-Wno-implicit-function-declaration
to the CFLAGS in src/Makefile:I then updated GAMEUID and GAMEGRP in the root Makefile to my username and staff as the group accordingly, which allowed the game to be installed correctly.
However, one last issue is that if I run
/usr/local/slashthemdir/slashthem
, I get the perm bug error:I can work around this by creating a "perm" file with 644 permissions in whatever my current working directory is, and the game will launch without issue. So it appears to only be looking for that file in the current directory, instead of
/usr/local/slashthemdir/
or even~/slashthemdir
. Is there something I can do to fix that particular issue? I'd rather not have a random "perm" file sitting around my home directory :)The text was updated successfully, but these errors were encountered: