RE: ghc-cvs-snapshot with wxHaskell

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: http://www.haskell.org/ghc/docs/latest/html/users_guide/separate-compila tion.html Cheers, Simon

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.
Example:
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
produces
out/wxcore/imports/Events_stub.o
instead of
out/wxcore/imports/Graphics/UI/WXCore/Events_stub.o
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.
Cheers,
Georg
On Thu, 17 Feb 2005 17:04:13 -0000, Simon Marlow
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:
http://www.haskell.org/ghc/docs/latest/html/users_guide/separate-compila tion.html
Cheers, Simon
-- ---- Georg Martius, Tel: (+49 34297) 89434 ---- ------- http://www.flexman.homeip.net ---------
participants (2)
-
Georg Martius
-
Simon Marlow