ghc-cvs-snapshot with wxHaskell

Georg Martius mai99dgf at
Thu Feb 17 15:24:15 EST 2005

Hi folks,

thanks to Simon for enlighten me about the correct functionality of -odir and -hidir.
Now, we use -odir and -hidir for compilation as well as for dependency file generation. It seems to be a much better approach than before. However I ran into 2 problems again:

1. The cross-dependencies between wxcore and wx are wrong (@Daan)
compilation of the wx with -odir out/wx/imports produces dependencies like:
  out/wx/import/Graphics/UI/WX/Types.hs : out/wx/import/Graphics/UI/WXCORE/Types.o
where the latter not exist, since it is in out/wxcore/import/Graphics/UI/WXCORE/Types.o
I don't see a way to avoid that other than direct the output of wxcore and wx to the same directory. I took out/wx_wxcore. It is not as nice as before, but I hope that is OK for you?

2. Stub files (@Simon)
The problem I ran into was that the FILE_stub.o files are not placed at the correct(?) directory according to the position of FILE in the hierarchical library.
ghc -c wxcore/src/Graphics/UI/WXCore/Events.hs -o out/wxcore/imports/Graphics/UI/WXCore/Events.o  -fvia-C -package-name wxcore -iwxcore/src -odir out/wxcore/imports -hidir out/wxcore/imports -iout/wxcore/imports -Iwxc/include

instead of
I don't know if it is the expected behaviour?

My work around is to modify the dependency in the makefile to expect it there.
Now it works fine with ghc 6.2 and 6.4.

The patches are attached.


On Thu, 17 Feb 2005 17:04:13 -0000, Simon Marlow <simonmar at> wrote:

> On 17 February 2005 16:25, Georg Martius wrote:
>> Another bug in ghc!
>>> /usr/bin/ghc -M wxcore/src/Graphics/UI/WXCore/WxcClassTypes.hs  \
>>>   -iout/wxcore/imports -Iwxc/include -iwxcore/src \
>>>   -odir out/wxcore/imports/Graphics/UI/WXCore/ produces (among
>>> others):
> out/wxcore/imports/Graphics/UI/WXCore//Graphics/UI/WXCore/WxcClassTypes.
> o
>>> : \	wxcore/src/Graphics/UI/WXCore/WxcClassTypes.hs
>> where you see that the -odir is not handled correctly.
> This is correct behaviour for -odir.  The docs describe it:
> tion.html
> Cheers,
> 	Simon


---- Georg Martius,  Tel: (+49 34297) 89434 ----
------- ---------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makefile.diff
Type: application/octet-stream
Size: 1548 bytes
Desc: not available
Url :
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makefile.lib.diff
Type: application/octet-stream
Size: 937 bytes
Desc: not available
Url :

More information about the Glasgow-haskell-users mailing list