[BUG] [General] Raze fails to compile on Fedora 40 - GCC 14.0.1
JoshuaPettus opened this issue · 2 comments
Raze version
No response
Which game are you running with Raze?
Other
What Operating System are you using?
Linux x86_64
Please describe your specific OS version
Fedora 40
Relevant hardware info
No response
Have you checked that no other similar issue already exists?
- I have searched and not found similar issues.
A clear and concise description of what the bug is.
Looks definitely to be a compiler issue. When attempting to compile, gcc trips up here:
[ 44%] Building C object libraries/webp/CMakeFiles/webp.dir/src/utils/huffman_utils.c.o /home/joshuapettus/Downloads/Raze-1.10.1/libraries/ZWidget/src/widgets/lineedit/lineedit.cpp: In member function ‘virtual void LineEdit::OnKeyDown(EInputKey)’: /home/joshuapettus/Downloads/Raze-1.10.1/libraries/ZWidget/src/widgets/lineedit/lineedit.cpp:509:76: error: cannot convert ‘std::__cxx11::basic_string<char>::iterator’ to ‘const char*’ 509 | std::string::const_iterator end_str = std::remove(str.begin(), str.end(), '\n'); | ~~~~~~~~~^~ | | | std::__cxx11::basic_string<char>::iterator In file included from /usr/include/c++/14/cstdio:42, from /usr/include/c++/14/ext/string_conversions.h:45, from /usr/include/c++/14/bits/basic_string.h:4154, from /usr/include/c++/14/string:54, from /home/joshuapettus/Downloads/Raze-1.10.1/libraries/ZWidget/include/zwidget/widgets/lineedit/../../core/widget.h:3, from /home/joshuapettus/Downloads/Raze-1.10.1/libraries/ZWidget/include/zwidget/widgets/lineedit/lineedit.h:4, from /home/joshuapettus/Downloads/Raze-1.10.1/libraries/ZWidget/src/widgets/lineedit/lineedit.cpp:2: /usr/include/stdio.h:158:32: note: initializing argument 1 of ‘int remove(const char*)’ 158 | extern int remove (const char *__filename) __THROW; | ~~~~~~~~~~~~^~~~~~~~~~ /home/joshuapettus/Downloads/Raze-1.10.1/libraries/ZWidget/src/widgets/lineedit/lineedit.cpp:511:48: error: cannot convert ‘std::__cxx11::basic_string<char>::iterator’ to ‘const char*’ 511 | end_str = std::remove(str.begin(), str.end(), '\r'); | ~~~~~~~~~^~ | | | std::__cxx11::basic_string<char>::iterator /usr/include/stdio.h:158:32: note: initializing argument 1 of ‘int remove(const char*)’ 158 | extern int remove (const char *__filename) __THROW; | ~~~~~~~~~~~~^~~~~~~~~~ make[2]: *** [libraries/ZWidget/CMakeFiles/zwidget.dir/build.make:230: libraries/ZWidget/CMakeFiles/zwidget.dir/src/widgets/lineedit/lineedit.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:370: libraries/ZWidget/CMakeFiles/zwidget.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs....
Steps to reproduce the behaviour.
Explain how to reproduce
1.
2.
3.
Your configuration
No response
Provide a Log
No response
This was reported on GZDoom and had an easy fix. Unfortunately I am shooting in the dark but I don't have much choice - and as far as I am concerned the GCC committee are the ones at fault for introducing such a breaking change.
Addressed with this change - f3cad84
Unfortunately that seems to be par for the course with them...