[GHC] #9498: GHC links against unversioned .so files
GHC
ghc-devs at haskell.org
Thu Aug 6 05:55:25 UTC 2015
#9498: GHC links against unversioned .so files
-------------------------------------+-------------------------------------
Reporter: Kritzefitz | Owner:
Type: feature request | Status: new
Priority: low | Milestone:
Component: Compiler (FFI) | Version: 7.6.3
Resolution: | Keywords: Debian
Operating System: Linux | Architecture:
| Unknown/Multiple
Type of failure: Other | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by trommler):
* owner: trommler =>
Comment:
Replying to [comment:9 rwbarton]:
> That means we need to record the fact that `-lcurl` is necessary when
linking against the static Haskell library but not when linking against
the dynamic Haskell library, right?
You are right, the dynamic library is linked against the versioned C
library and no extra `-lcurl` is required. At build time we need the
development package for libcurl so the link editor (ld) can link the
dynamic Haskell library. To use the dynamic Haskell library the
unversioned library is not needed anymore.
To load a static library we use the RTS linker and the RTS linker needs to
load dependent C libraries explicitly. Unfortunately we cannot assume that
the C library with a specific version is installed. So the RTS linker
looks for the unversioned library and tries to load that.
So yes, the unversioned C library is currently necessary to load a static
Haskell library but not needed to load a dynamic Haskell library.
Perhaps we could make cabal record the version information for C libraries
in the package database as suggested in comment:8 and change the RTS
linker to use that information?
I don't have time to work on this now, so I am disowning the ticket.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9498#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list