Fix Windows/MinGW compilation issues
This PR resolves all compilation issues preventing GAP from building on Windows using MinGW. Fixes #4157.
It's a rough initial version and needs further cleanup. Will do this in a week or so. But I'm happy for any initial suggestions and feedback. The first question: do you prefer if the changes are split in smaller PRs?
Text for release notes
see title
Further details
For transparency: The changes were mostly created by GH Copilot, see https://github.com/tobiasdiez/gap/pull/1 for details (I mostly wanted to see how able the copilot feature is by now, and this seemed to be a good test case).
Compilation is successful on my device, but I get runtime errors:
[ "List Element: <list>[1] must have an assigned value" ]
while reading ./lib/type.g:351
Error before error-handling is initialized:
[ "List Element: <list>[1] must have an assigned value" ]
while reading ./lib/type.g:353
Error before error-handling is initialized:
[ "List Element: <list>[1] must have an assigned value" ]
while reading ./lib/type.g:355
....
These point to the line DeclareRepresentation( "IsNonAtomicComponentObjectRep", IsComponentObjectRep );.
Adding the following debug outputs there:
Print( "IS_OBJECT = ", IS_OBJECT, "\n" );
Print( "IsComponentObjectRep = ", IsComponentObjectRep, "\n" );
yield
IS_OBJECT = Error before error-handling is initialized:
[ "Variable: <<unknown>> must have an assigned value" ]
IsComponentObjectRep = Error before error-handling is initialized:
[ "Variable: <<unknown>> must have an assigned value" ]
Not sure if those are a result of a wrong print command, or if they shine light on what's wrong here.
Just to say I won't have time to look at this until next Wednesday as I'm on holiday, but from a quick glance I'd want to see it broken down into more pieces -- build system, fixes for different functions.
I would guess the crash is because of the GC, and that is probably because it's not stack scanning properly. (It could also be a layout issue). Those are both harder to fix, but can be handled separately.
One more thing:
This PR resolves all compilation issues preventing GAP from building on Windows using MinGW. Fixes https://github.com/gap-system/gap/issues/4157.
This PR most definitely does not fix #4157. It is certainly some good first steps towards it (bravo), but "making it build" is not the same as "making it work" (indeed, otherwise you could just delete all the code, it would also build very well).
Thanks for the comments! I will look at them later in detail, and will also extract more easily reviewable chunks.
For now, could someone please run the CI here to make sure that it's not breaking anything on Linux. Thanks