Dynamic libraries on Mac

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Dynamic libraries on Mac

Kazu Yamamoto (山本和彦)
Hi,

I built GHC head today (with d61c3ac186c94021c851f7a2a6d20631e35fc1ba
reverted). While I'm supporting GHC head for "doctest" on Mac, I found
the following problems relating to dynamic linking:

(1) Every ".dylib" installed with GHC head refers to itself in its
    build directory. E.g.

        % otool -L libHSbase-4.7.0.0-ghc7.7.20130909.dylib | grep base
        libHSbase-4.7.0.0-ghc7.7.20130909.dylib:
                /Users/kazu/work/ghc/libraries/base/dist-install/build/libHSbase-4.7.0.0-ghc7.7.20130909.dylib (compatibility version 0.0.0, current version 0.0.0)

(2) Some ".dylib" installed with GHC head refers to other libraries in their
    build directories. E.g.

        % otool -L libHSvector-0.9.1-ghc7.7.20130909.dylib | grep /Users
                /Users/kazu/work/ghc/libraries/vector/dist-install/build/libHSvector-0.9.1-ghc7.7.20130909.dylib (compatibility version 0.0.0, current version 0.0.0)
                /Users/kazu/work/ghc/libraries/primitive/dist-install/build/libHSprimitive-0.4.0.1-ghc7.7.20130909.dylib (compatibility version 0.0.0, current version 0.0.0)

(3) All user installed libraries by cabal-install refer to
    other libraries in their build directories. E.g.

        % otool -L libHSghc-paths-0.1.0.9-ghc7.7.20130909.dylib| grep Users
                /Users/kazu/Library/Haskell/ghc-7.7.20130909/lib/ghc-paths-0.1.0.9/lib/libHSghc-paths-0.1.0.9-ghc7.7.20130909.dylib (compatibility version 0.0.0, current version 0.0.0)
                /Users/kazu/work/ghc/libraries/base/dist-install/build/libHSbase-4.7.0.0-ghc7.7.20130909.dylib (compatibility version 0.0.0, current version 0.0.0)
                /Users/kazu/work/ghc/libraries/integer-gmp/dist-install/build/libHSinteger-gmp-0.5.1.0-ghc7.7.20130909.dylib (compatibility version 0.0.0, current version 0.0.0)
                /Users/kazu/work/ghc/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.3.1.0-ghc7.7.20130909.dylib (compatibility version 0.0.0, current version 0.0.0)


This means that programs complied GHC head do not work if I execute
"make clean" in the GHC build directory.

--Kazu