
Hi, Patrick and I found some answers to the questions/problems we encountered. Finally got the thing to work. (patches appended) Versions: ghc-6.4.20050215 wxHaskell-0.8. 1. dep-files the new ghc produces a different dependency file. It includes also dependencies for imported modules. i.e.
module A import B it generates: B.o : B.hs A.o : A.hs A.o : B.hi where as the old ghc omitted the first line, which is not necessary IMO. The problem with the wx-Makefile is now that the .o and .hi files should reside in another directory namely out/... The current approach is to use "sed". However on the new depfiles it generates rules, which are not correct and which lead to the problems Patrick experiences. I have a possible fix: add -odir out/... to the call of ghc -M. This produces correct paths for the .o files. use "grep" to filter module A Problem: the .hi files have still the source path. Question @Daan: Why do they have to by in out/...? It seams to complicate the thing. Solution: "sed" I fixed that in "makefile.lib".
Now the dependency stuff seams to work fine. No double compilation anymore. 2. correct import-search path the make file calls ghc from the wxHaskell-root. Therefore -icurrent/source/path has to be included. I fixed that in "makefile". 3. Package stuff I included package files in the new style to the configure script. Problem: the environment variable are not substituted any longer by ghc-pkg ? My hack: let configure sustitude the variable, i.e. configure:750
wxhlibdir="${libdir}" . . import-dirs: ${wxhlibdir}/imports instead of import-dirs: \${wxhlibdir}/imports
This might cause problems with the rpm install stuff. Additionally, I had problems with the license field. It seams to be a choice rather a text-field. I took BSD3 since it worked. @Simon: How can I add a custom license like "wxWindows" @Daan: Please complete the package files. There are a couple of new entries. Also some exports from wxcore might be better in the hidden-modules field. Honestly I have no idea where it is for. A had to add a
extra-libs : wxc-gtk2.4.2-0.8 to wxcore package info. This seams not quite portable :-). @Daan: please replace this by a proper variable
4. Module name clash
ghc complained:
wxdirect/src/Set.hs:1:0:
Module `Set' is a member of package data-1.0.
To compile this module, please use -ignore-package data-1.0.
I love ghc's error messages! Great job Simon!
@Daan: the configure script uses /usr as a default prefix. I think /usr/local is more standard here. Additionally the modules are installed to <prefix>/lib/imports. I would rather like <prefix>/lib/wxHaskell/imports.
How do we make sure that nobody else wants to use the path lib/imports?
This is a fairly common, or at least non-specific, directory name in my eyes.
Cheers,
Georg
On Thu, 17 Feb 2005 00:44:23 +0100, Patrick Scheibe
On Wednesday 16 February 2005 16:48, you wrote:
Hi Simon and Daan.
I took the stable ghc source from yesterday, 15th of february. I think Simon fixed the creation of .depfiles problem, am I right? Touching of these files is unnecessary now.
In earlier versions the ghc seems to make the right thing when you call ghc -M ./dir1/dir2/src/Moduldir/Modul.hs
Now there are errors when you call it from outside the modulpath:
Could not find module `ParseEiffel': use -v to see a list of the files searched for (imported from wxdirect/src/CompileDefs.hs)
I fixed this with giving the -i./dir1/dir2/src option to every call. @Simon: is this a feature? Do I make something strange with this fix?
Now the compilation runs fine (:-) but when I do a make install, the makefile begins to compile again!?? After a while of compilation it breaks with a "no rule to make.." error. How can ghc forget the compiled stuff? The objects are definitely there, so there is no need to recompile WX.o, ...
@Daan: I tried to delete the dependency wx from the install rule of the makefile but that doesn't matter. I would like to install it by myself to see if the lib is working. Do you have a quick bad fix of this?
Cheers Patrick
-- ---- Georg Martius, Tel: (+49 34297) 89434 ---- ------- http://www.flexman.homeip.net ---------