-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix MinGW build by reverting compiler detection #1497
Conversation
Revert "framework: report which compiler was used to build the game" This reverts commit 4313b20. Revert "cmake: make possible to use PCH with compilers with subcommands" This reverts commit 098edeb. Revert "cmake: reverse the PCH PNaCl test" This reverts commit 1b51cc3. Revert "cmake: improve the PCH support detection" This reverts commit e552ff7. Revert "cmake: add comments for future self to improve the CMake code" This reverts commit 4cb34f5. Revert "cmake: improve compiler support" This reverts commit cbe119e. Revert "cmake: report wich compiler is used to build the game" This reverts commit 596020e.
Why revert the compiler changes |
The compiler stuff is there to know it has been built using the standalone native MinGW toolchain, so it doesn't make sense to revert that. Here the fault is in the tool driving the compiler (maybe windres.exe -O coff […] -DDAEMON_CXX_COMPILER_STRING="MinGW 14.2.0/gcc-14.2.0 c++.exe"
cc1.exe: fatal error: 14.2.0/gcc-14.2.0\: No such file or directory We may try to replace the space character in the definition by something else, like But this a bug in third-party tools. |
Because they add defines with special characters that makes the MinGW toolchain unable to build. As a bonus, #982 was merged with only disapproving reviews.
Not really. It generates the same format of string for an MSYS MinGW toolchain. |
It is still true fro MinGW in general. |
That's not a reason to revert, that is a reason to fix. |
That's a bug in Using another character like |
Space is not a special character for a defined string… |
Funnily, using |
But using |
Apparently it happens on MSYS MinGW also. |
This is clearly a bug in the way the commands are processed on Windows, the string quoting doesn't work properly. Characters like space, pipe, etc. will break the string. It will break for whatever definition string having a character that is used as some token splitter (or even command splitter) in So this is not our fault™. This PR implement a workaround for that exact use case: But in the future we may implement something more robust like writing the definitions in a shared header file or something. Windows is simply broken there, passing a string as a definition should not be considered as being working on Windows. |
Fix the standalone native MinGW toolchain build by reverting #982. The resource compiler chokes on some combination of the quotation marks, spaces, and slashes in defines. Verbose Make logging: