Closed Rojikku closed 2 years ago
Hi @Rojikku , many thanks for the report.
It's certainly going to be useful to support GCC 11 so I will take a look at that. I'll also see what I can do about removing that hard coded g++ requirement.
Regards, Michael
Michael,
One of the users in the AUR, aaronp, reported to me that I should just remove line 36 from the CMakeLists.txt (The one with -Werror), which will result in the error above becoming a warning, and thus letting the package build. The advantage being I don't have to make every user install gcc-10 (Though it can be uninstalled right after).
That appears to work, and I didn't encounter any bugs, so that's what I've released for now. Worst case scenario the previous instructions I provided will work for people.
Hopefully that information is useful to your debugging process!
Rojikku
Thanks Rojikku. That line just outputs various compiler warnings so it's fine to comment it out just to get the build working. I've not encountered any issues with game saves, but still, I'll need to update the code :)
Thanks again, Michael
Very simple fix, the code is checking in a rather archaic way for an out-of bounds, itself using an out of bound index.
replace the offending line with:
if (tile > &dg.floor[MAX_HEIGHT-1][MAX_WIDTH-1]) {
and builds fine in gcc 11.2
:-)
Greetings. I maintain https://aur.archlinux.org/packages/umoria/ currently. The build instructions are in the PKGBUILD on there, if you're particularly curious.
I was troubleshooting a failure to build in Arch, but fortunately before posting this I tested my previous builds and found they no longer worked. Some troubleshooting finally led me to see that when I last built I actually had gcc 10 still, which was the issue. I therefore specified the variables CC and CXX to fix this issue- and it STILL didn't work because CMakeLists.txt has g++ hardcoded, so switching it to use g++-10 to get around this issue required a minor patch.
When running
make
with gcc-11.1 I consistently get the following error:Hopefully, anyone else who experiences this issue will be able to search the reported error and realize it can be solved by using gcc10 instead of gcc11.
I do not know enough about CMake to say if you should make any improvements there, or nearly enough about C++ to suggest if you should make this compatible with gcc11, so consider this issue purely informative.