More windows woe
Edward Z. Yang
ezyang at MIT.EDU
Wed Sep 4 12:10:54 CEST 2013
Easy to fix: just tack a 'hiding (Handler)' onto the relevant import.
Excerpts from Edward Z. Yang's message of Wed Sep 04 02:56:38 -0700 2013:
> My latest error:
>
> librarieshaskelineSystemConsoleHaskelineBackendWin32.hsc:432:47:
> Ambiguous occurrence `Handler'
> It could refer to either `System.Console.Haskeline.Backend.Win32.Handler',
> defined at librarieshaskelineSystemConsoleHaskelineBackendWin32.hs
> c:430:6
> or `System.Console.Haskeline.Monads.Handler',
> imported from `System.Console.Haskeline.Monads' at librarieshaskel
> ineSystemConsoleHaskelineBackendWin32.hsc:20:1-38
> (and originally defined in `System.Console.Haskeline.MonadExceptio
> n')
>
> librarieshaskelineSystemConsoleHaskelineBackendWin32.hsc:432:69:
> Ambiguous occurrence `Handler'
> It could refer to either `System.Console.Haskeline.Backend.Win32.Handler',
> defined at librarieshaskelineSystemConsoleHaskelineBackendWin32.hs
> c:430:6
> or `System.Console.Haskeline.Monads.Handler',
> imported from `System.Console.Haskeline.Monads' at librarieshaskel
> ineSystemConsoleHaskelineBackendWin32.hsc:20:1-38
> (and originally defined in `System.Console.Haskeline.MonadExceptio
> n')
>
> librarieshaskelineSystemConsoleHaskelineBackendWin32.hsc:435:15:
> Ambiguous occurrence `Handler'
> It could refer to either `System.Console.Haskeline.Backend.Win32.Handler',
> defined at librarieshaskelineSystemConsoleHaskelineBackendWin32.hs
> c:430:6
> or `System.Console.Haskeline.Monads.Handler',
> imported from `System.Console.Haskeline.Monads' at librarieshaskel
> ineSystemConsoleHaskelineBackendWin32.hsc:20:1-38
> (and originally defined in `System.Console.Haskeline.MonadExceptio
> n')
> make[1]: *** [libraries/haskeline/dist-install/build/System/Console/Haskeline/Backend/Win32.o]
> Error 1
> make: *** [all] Error 2
>
> Excerpts from Simon Marlow's message of Wed Sep 04 02:44:18 -0700 2013:
> > Sorry about that; I'm on it, fix coming soon.
> >
> > Cheers,
> > Simon
> >
> > On 03/09/13 15:33, Simon Peyton-Jones wrote:
> > > 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