Ian Lynagh wrote:
On Fri, Aug 07, 2009 at 11:42:08PM +0100, Simon Marlow wrote:
Ian Lynagh wrote:
Fri Aug  7 06:07:31 PDT 2009  Ian Lynagh <[email protected]>
  * Add a kludge to fix building shared libs
  The .dyn_hi files currently depend on the .dyn_hi files of modules that
  they import. But they actually want the .hi files of modules from
  another package.This we make the .dyn_hi files depend on the .hi files
  so we are sure that they exist and are up-to-date.
I don't understand - why do they need to depend on the .hi files and not the .dyn_hi files?

I don't know, but that's the current behaviour:

libraries/array/Data/Array.hs:1:0:
    Failed to load interface for `Prelude':
      There are files missing in the `base' package,
      try running 'ghc-pkg check'.
      locations searched:
        libraries/array/./Prelude.dyn_hi
        libraries/array/./Prelude.dyn_hi-boot
        libraries/array/dist-install/build/Prelude.dyn_hi
        libraries/array/dist-install/build/Prelude.dyn_hi-boot
        libraries/array/dist-install/build/autogen/Prelude.dyn_hi
        libraries/array/dist-install/build/autogen/Prelude.dyn_hi-boot
        /home/ian/ghc/darcs/ghc/libraries/base/dist-install/build/Prelude.hi

Oh. It seems that -dynamic is not treated as a "way" by GHC, but we are treating it like a way in the build system. So when you use -dynamic, GHC reads the .hi files for the normal way, but links against the .so files. It's absolutely amazing that this works at all.

The right fix is to make -dynamic a "way" flag.

Cheers,
        Simon

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to