Cabal/GHC interaction buglet

Hi, Using GHC 6.4.2, Cabal from Darcs - every time I do runhaskell Setup build in Hoogle (the Hoogle cabal file isn't up on the web yet, but I'm working on it!) it does relinking. Trying -v I get the command: Building Hoogle-3.0... C:\ghc\ghc-6.4.2\bin\ghc.exe -Idist\build -o dist\build\hoogle\hoogle --make -hi de-all-packages -i -idist\build\autogen -isrc -odir dist\build\hoogle\hoogle-tmp Unfortunately GHC 6.4.2 has a bug in it that if the .exe is not specified in the -o it always relinks. Any chance Cabal can ++ executableExtension when passing onto the GHC? (I did take a look at writing a patch, but as far as I can see in Distribution.Simple.GHC, the file passed along to -o is created by mkGHCiLibName and should end in ".o", but it doesn't... If anyone can point me at where this should go, then maybe, just maybe...) Thanks Neil

On 8/17/06, Neil Mitchell
Unfortunately GHC 6.4.2 has a bug in it that if the .exe is not specified in the -o it always relinks. Any chance Cabal can ++ executableExtension when passing onto the GHC?
Sounds right, but I think joinExtension in Distribution.Compat.Filepath is for this.
(I did take a look at writing a patch, but as far as I can see in Distribution.Simple.GHC, the file passed along to -o is created by mkGHCiLibName and should end in ".o", but it doesn't... If anyone can point me at where this should go, then maybe, just maybe...)
mkGHCiLibName builds name for an object file ghci uses when linking interpreted bytecode with binary. That's just part of the code that builds library. I think you want the code that comes afterwards. Best regards, --Esa

Hi,
mkGHCiLibName builds name for an object file ghci uses when linking interpreted bytecode with binary. That's just part of the code that builds library. I think you want the code that comes afterwards.
Thanks for the hints, my greping was confusing me. Patch attached that stops multiple relinking on Windows with GHC 6.4.2. Thanks Neil

On Fri, 2006-08-18 at 12:59 +0100, Neil Mitchell wrote:
Hi,
mkGHCiLibName builds name for an object file ghci uses when linking interpreted bytecode with binary. That's just part of the code that builds library. I think you want the code that comes afterwards.
Thanks for the hints, my greping was confusing me.
Patch attached that stops multiple relinking on Windows with GHC 6.4.2.
The change itself looks fine. It didn't apply cleanly however, it gave conflicts. Would you mind sending it again relative to the current darcs version of Cabal? Cheers. Duncan
participants (3)
-
Duncan Coutts
-
Esa Ilari Vuokko
-
Neil Mitchell