Ticket #1846 (closed bug: fixed)
win32 compile fails on sysmem.c on mingw gcc 4.5 (w. workaround)
Reported by: | ronaldws | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 2.10 |
Component: | build | Version: | 2.10.0 |
Severity: | medium | Keywords: | |
Cc: | Language: | ||
Patch status: | Platform: | win32 |
Description
mingw32-make fails with diagnostic output included below.
As a workaround if I change line 26 of config/gen/platform/win32/sysmem.c from:
#if defined MINGW32 && GNUC < 4
to:
#if defined MINGW32 /* && GNUC < 4 */
then parrot builds OK and tests out mostly OK. Rebuild requires mingw32-make realclean and perl Configure.pl followed by mingw32-make. Some preprocessing of sysmem.c seems to mean that mingw32-make clean is not enough.
Fixing this properly will require someone with a better understanding of mingw gcc access to the MEMORYSTATUSEX structure across various compiler versions.
Diagnostic output:
config/gen/platform/win32/sysmem.c: In function 'Parrot_sysmem_amount':
config/gen/platform/win32/sysmem.c:57:5: error: 'MEMORYSTATUSEX' undeclared (first use in this function)
config/gen/platform/win32/sysmem.c:57:5: note: each undeclared identifier is reported only once for each function it appears in
config/gen/platform/win32/sysmem.c:57:20: error: expected ';' before 'statex'
config/gen/platform/win32/sysmem.c:59:5: error: 'statex' undeclared (first use in this function)