Bartosz Wójcik wrote:
Hi Folks,

I'm facing problem after I've reinstalled directory-1.0.0.0 (setup configure/build/install). Since then I cannot complie anything that needs this library. It fails with following messages:

Preprocessing library haddock-2.4.0...
Preprocessing executables for haddock-2.4.0...
Building haddock-2.4.0...
/usr/bin/ar: creating dist/build/libHShaddock-2.4.0.a
Linking dist/build/haddock/haddock ...
/usr/local/lib/ghc-6.8.2/libHSghc.a(Coverage.o): In function `scXR_info':
(.text+0x17b7c): undefined reference to `directoryzm1zi0zi0zi0_SystemziDirectory_lvl29_closure'
/usr/local/lib/ghc-6.8.2/libHSghc.a(Coverage.o): In function `s8xU_info':
(.text+0x1792c): undefined reference to `directoryzm1zi0zi0zi0_SystemziDirectory_a43_info'
/usr/local/lib/ghc-6.8.2/libHSghc.a(Coverage.o): In function `r7aC_closure':
(.data+0xd18): undefined reference to `directoryzm1zi0zi0zi0_SystemziDirectory_a43_closure'
collect2: ld returned 1 exit status

Situation is following:
Old directory-1.0.0.0 resides in /usr/local/lib/ghc-6.8.2/lib/directory-1.0.0.0.
New one in /usr/local/lib/directory-1.0.0.0.

Why new one doesn't work?
How to force linker to use old one?

What happened here is that you recompiled directory without recompiling the things that depend on it (e.g. GHC). This is a problem because compiled Haskell libraries don't have a fixed ABI: if you recompile the library, you get a different result, and all the compiled clients of the library must be recompiled.

For libraries that GHC depends on, this is a problem, because it's usually not practical to recompile GHC. You can usually install a newer version of these libraries without conflicting with the old version, though.

We do think this is something that needs to be fixed in a future version of GHC (hopefully 6.12).

Cheers,
        Simon
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to