More windows woe

Edward Z. Yang ezyang at MIT.EDU
Wed Sep 4 09:50:03 CEST 2013


I got my hands on a Windows build box, so I'll also go and see if
I can get a build working on Windows.

Excerpts from Simon Peyton-Jones's message of Tue Sep 03 07:33:32 -0700 2013:
> Simon Marlow: please help!
> At the moment windows builds are hosed, which is a Bad Situation.
> 
> Actually it turns out that what want is
> 
>   debugBelch("Checking whether to unload %S\n", oc->fileName));
> 
> That is, use "%S" rather than "%s" as format specifier for wide chars.
> 
> Sadly, this works on Windows, but not on Linux:
> rts/CheckUnload.c:260:13:
>      error: format ‘%S’ expects argument of type ‘wchar_t *’, but argument 2 has type ‘pathchar *’ [-Werror=format]
> 
> 
> So what I need guidance on, please!, is what the approved way to deal with this is.  I suppose that I could identify each use of %s on a filepath and say
> 
> #ifdef mingw32_HOST_OS
>   debugBelch("Checking whether to unload %S\n", oc->fileName));
> #else
>   debugBelch("Checking whether to unload %s\n", oc->fileName));
> #endif
> 
> But that seems deeply unsatisfactory doesn't it?
> 
> If not that, then what?
> 
> 
> Simon
> 
> | -----Original Message-----
> | From: Edward Z. Yang [mailto:ezyang at MIT.EDU]
> | Sent: 28 August 2013 20:59
> | To: Simon Peyton-Jones
> | Cc: ghc-devs at haskell.org
> | Subject: Re: More windows woe
> | 
> | My guess is the printf's need to be replaced with swprintf's.
> | 
> | Edward
> | 
> | Excerpts from Simon Peyton-Jones's message of Wed Aug 28 01:25:26 -0700
> | 2013:
> | > OK, so now my windows build is getting further, but it now falls over
> | here.  This one looks more straightforward!  Can anyone help?
> | >
> | > Simon
> | >
> | > "inplace/bin/ghc-stage1.exe" -optc-Werror -optc-Wall -optc-Wall -optc-
> | Wextra -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-
> | Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-
> | Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs -optc-
> | Wredundant-decls -optc-Iincludes -optc-Iincludes/dist -optc-
> | Iincludes/dist-derivedconstants/header -optc-Iincludes/dist-
> | ghcconstants/header -optc-Irts -optc-Irts/dist/build -optc-
> | DCOMPILING_RTS -optc-fno-strict-aliasing -optc-fno-common -optc-O2 -
> | optc-fomit-frame-pointer -optc-fno-omit-frame-pointer -optc-g -optc-O0 -
> | optc-DRtsWay=\"rts_debug\" -static -optc-DDEBUG -ticky -DTICKY_TICKY  -
> | H32m -O -Werror -Wall -H64m -O0 -Iincludes -Iincludes/dist -
> | Iincludes/dist-derivedconstants/header -Iincludes/dist-
> | ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -package-name
> | rts -dcmm-lint      -i -irts -irts/dist/build -irts/dist/build/autogen -
> | Irts/dist/build -Irts/dist/build/autogen           -O2 -O0    -c
> | rts/CheckUnload.c -o rts/dist/build/CheckUnload.debug_o
> | > cc1.exe: warnings being treated as errors
> | > rts\CheckUnload.c: In function 'checkUnload':
> | >
> | > rts\CheckUnload.c:257:7:
> | >      error: format '%s' expects type 'char *', but argument 2 has type
> | 'pathchar *'
> | >
> | > rts\CheckUnload.c:293:11:
> | >      error: format '%s' expects type 'char *', but argument 2 has type
> | 'pathchar *'
> | >
> | > rts\CheckUnload.c:297:11:
> | >      error: format '%s' expects type 'char *', but argument 2 has type
> | 'pathchar *'
> | > bash-3.1$




More information about the ghc-devs mailing list