[darcs-users] Problem building darcs 2 on WinXP
David Roundy
droundy at darcs.net
Mon Dec 17 19:58:30 UTC 2007
On Mon, Dec 17, 2007 at 03:55:20PM +0000, Simon Marlow wrote:
> Claus Reinke wrote:
> >> Linking darcs ...
> >> src/win32/System/Posix.o(.text+0x550):fake: undefined reference to `SleepEx'
> >> collect2: ld returned 1 exit status
> >> make: *** [darcs] Error 1
> >
> > it might be a case of adding -fvia-C (used to be the default
> > until recently). if that is true, you might want to file a ticket
> > for ghc (change in default route gives failures and unhelpful
> > error messages).
> >
> > also, as a naive ffi user, i'd have expected
> >
> > foreign import ccall "winbase.h SleepEx" c_SleepEx :: DWORD -> BOOL -> IO DWORD
> >
> > to match the
> >
> > WINBASEAPI DWORD WINAPI SleepEx(DWORD,BOOL);
> >
> > in winbase.h, rather than the current
> >
> > foreign import ccall "winbase.h SleepEx" c_SleepEx :: CULong -> CUInt -> IO CInt
> >
> > but i don't know whether that is any issue at all.
>
> Looks like it should be
>
> foreign import stdcall "winbase.h SleepEx" c_SleepEx ...
>
> (i.e. stdcall rather than ccall)
>
> this would cause it to work with -fvia-C but fail with -fasm, because the C
> compiler can see the prototype. Arguably a bug in -fvia-C, but it's been
> that way for a very long time.
I'm not sure I understand what's gone wrong here. Do either of you have a
recommendation for something our fearless user can try? or a patch for us
to apply?
--
David Roundy
Department of Physics
Oregon State University
More information about the darcs-users
mailing list