-
Notifications
You must be signed in to change notification settings - Fork 584
Fix compilation with MinGW.org #18783
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
Conversation
This also fixes a compilation error on MinGW.org caused by the fact that it defines fpos_t as a non-integer.
The former is the canonical name of the type. The latter doesn't work on MinGW.org.
MinGW.org defines clockid_t as an opaque pointer, which conflicts with our definition. Defining _POSIX_C_SOURCE to '1' will hide it.
A few constants are missing from MinGW.org headers.
Oops, it seems the Time::HiRes change broke Visual C++. I think it's fixed now. |
Thanks for figuring this stuff out. If your assumption in #18510 is correct:
and MinGW-w64 is still good, then given that this branch needs to touch code in two dual life modules, and source code outside of just Win32, then my initial thought is to merge this to blead after 5.34.0, but also to
|
I've got a mingw.org gcc-9.2.0 compiler that's throwing an error when building ext/POSIX:
It's a compiler I installed earlier this year using the mingw-get-setup.exe installer from: I don't know why that error should arise. Another issue is that I see the following warning being issued repeatedly:
As regards __USE_MINGW_ANSI_STDIO, the referenced _mingw.h file tells us:
Keith Marshall has been warning for years that __USE_MINGW_ANSI_STDIO should not be called directly, and that calling it directly is not guaranteed to work in the future. I just wonder whether it's worth all the trouble to keep supporting the mingw.org compilers, especially given that they're only 32-bit. |
@sisyphus, have you been able to further investigate the problems you described earlier in this p.r.? Thank you very much. |
I spent quite a bit of time on it and got nowhere. Seems that __USE_MINGW_ANSI_STDIO is not merely "deprecated", but is already laden with booby traps - wrt the building of perl, anyway. Thanks for following up !! Cheers, |
What should we do with this PR? |
The question is whether we want to support MinGW.org or not. IMO we shouldn't. I'm not aware of any valid reasons to prefer MinGW.org to MinGW-w64. MinGW.org isn't very popular, it's 32-bit only and its authors clearly go out of their way to break the compatibility with the rest of Windows compilers. Nevertheless, two commits from this PR (a644daa and 9994e22) make sense even if we don't care about MinGW.org. |
I just got a CPAN testers report about this issue in Win32-0.58 (using Strawberry Perl 5.10.1): http://www.cpantesters.org/cpan/report/c13b1734-6e5c-1014-b256-9c16032c038b I was thinking about just applying the Win32-specific part of this PR, but I noticed that the tester report also complains about @xenu, any reason why this wasn't required for your scenario? Maybe because their Anyways, do you plan to file a PR against Win32 for this, or should I do this myself? |
Commenters, can we get an update on the status of this pull request (which has acquired merge conflicts)? |
This p.r. still has merge conflicts. Last year @xenu commented, "The question is whether we want to support MinGW.org or not." IMO, that's a policy question that should be discussed on the P5P list. Assuming that we do have that discussion there, I would suggest to @xenu that if you want to follow up on the 2 commits you cited above, you open a new p.r. just for them. Thank you very much. |
No further discussion since last September; closing. |
Fixes #18510