![]() |
#1 |
Swordsman
Join Date: Oct 2021
Location: WA
Posts: 342
![]() |
Compiling Hengband: "fatal error: util.h: No such file or directory"
When compiling Hengband--the latest from the Hengband repo--in Cygwin, following the instructions for Unix here https://github.com/hengband/hengband.../readme-eng.md , I get an error:
Code:
io/uid-checker.cpp:6:10: fatal error: util.h: No such file or directory 6 | #include "util.h" There are a lot of files in the Hengband repo ending with "-util.h," but none named just "util.h." Could this be a typo in uid-checker.cpp, or a missing file? I'm a noob at this, sorry for the dumb question!
__________________
My Angband videos |
![]() |
![]() |
![]() |
#2 |
Swordsman
Join Date: Aug 2019
Posts: 434
![]() |
That looks like a bug. I'd post an issue about it on Hengband's issue list. My guess as to why they haven't seen it when they compile for Linux is that SAFE_SETUID_POSIX somehow isn't set there while it is set on cygwin. Commenting out lines 51 to 53 of src/system/h-config.h (i.e. replace
Code:
#ifdef _POSIX_SAVED_IDS #define SAFE_SETUID_POSIX #endif Code:
#if 0 #ifdef _POSIX_SAVED_IDS #define SAFE_SETUID_POSIX #endif #endif |
![]() |
![]() |
![]() |
#3 | |
Swordsman
Join Date: Oct 2021
Location: WA
Posts: 342
![]() |
Quote:
(There's also the odd issue that trying to run ./hengband gives a "is a directory" error; renaming /hengband/Hengband/ to something that is not "Hengband" seems to dodge that (looks like all that's in that directory are vc proj files?), but there's probably a less hacky way to do that.) I entered the "util.h" compiling error on their repo, and included your comment: https://github.com/hengband/hengband/issues/1971 Update: They replied almost instantly, fixed my issue title (I'd overlooked it and left it as the Japanese placeholder text, urk), and said they would fix the problem: they've added it to their Alpha 52 milestone. : )
__________________
My Angband videos |
|
![]() |
![]() |
![]() |
#4 | |
Swordsman
Join Date: Oct 2021
Location: WA
Posts: 342
![]() |
Hourier replied on their git to say
Quote:
Actually, depending on how I try running it, it may say a few different things--I list these in the github issue. For instance, if I try "./hengband" from home/[username]/hengband/ (I have the game and /src/ etc in that folder I made--but I have to rename home/[username]/hengband/Hengband/ to home/[username]/hengband/zHengband/ or something first, otherwise I get "is a directory" : P), it responds with "setuid(): cannot set permissions correctly!"
__________________
My Angband videos Last edited by smbhax; January 9, 2022 at 16:53. |
|
![]() |
![]() |
![]() |
#5 |
Swordsman
Join Date: Aug 2019
Posts: 434
![]() |
The most recent update to the master branch for Hengband has a change that may fix the problem you saw with escalating/dropping privileges on Cygwin. If you have a chance, it's probably worth trying it out and reporting the results on the issue you filed.
The problem with the executable name clashing with the directory for the Visual Studio project files when the file system is case-insensitive is still there. Easiest workaround is likely to move the Hengband directory to another name before building. |
![]() |
![]() |
![]() |
#6 | |
Swordsman
Join Date: Oct 2021
Location: WA
Posts: 342
![]() |
Quote:
__________________
My Angband videos |
|
![]() |
![]() |
![]() |
#7 | |
Knight
Join Date: Jan 2017
Posts: 960
![]() |
Managed to compile 3.0.0Alpha51 on my local machine, but when I try it on the angband.live server I run into this:
Quote:
|
|
![]() |
![]() |
![]() |
#8 |
Swordsman
Join Date: Oct 2021
Location: WA
Posts: 342
![]() |
I didn't run into anything like that either when compiling it on my own machine. Some difference in the compiler you're using on live? I hope you can get it working, it would definitely be nice to see there. : )
__________________
My Angband videos |
![]() |
![]() |
![]() |
#9 |
Swordsman
Join Date: Aug 2019
Posts: 434
![]() |
Gwarl, I didn't encounter any problems compiling it on Debian bullseye (Debian's version of gcc 10.2.1 was the compiler). From GitHub's logs for Hengband's Actions, they're successfully compiling it on Ubuntu 20.04 LTS using clang-11 or gcc (gcc version is either 10.3 or 9.3 according to GitHub's summary of the installed software for the Ubuntu runner).
Did you try adding Code:
#include "system/object-type-definition.h" |
![]() |
![]() |
![]() |
#10 | |
Knight
Join Date: Jan 2017
Posts: 960
![]() |
Thanks, that fixed it. I got a couple of other files needing the same fix, now I've run into this
Quote:
|
|
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
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 03:29 |
Compiling a "Windows Console" version | Dean Anderson | Development | 34 | December 3, 2010 23:00 |
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 |