Changes between Version 7 and Version 8 of SharedLibraries


Ignore:
Timestamp:
Aug 2, 2007 9:46:49 AM (8 years ago)
Author:
simonmar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SharedLibraries

    v7 v8  
    4545 * if there are some static-only libraries on the system, then all packages must have static versions,
    4646   because dynamic linking is all-or-nothing in GHC.
     47 * This approach doesn't address Windows
    4748
    4849== 2. Dynamic linking ==
     50
     51The first plan was this:
     52
     53[http://www.haskell.org/pipermail/glasgow-haskell-users/2007-June/012740.html]
     54
     55It has since been pointed out that `LD_LIBRARY_PATH` overrides `-rpath` on some platforms (see below).  This might cause some difficulties (or not?).
     56
     57Assuming we can fix the locations of shared libraries at link time (eg. with -rpath), then:
     58
     59 1. Installations of GHC outside the system default location hardwire the locations of shared libraries
     60    into the binaries they build.  (hence such binaries cannot be distributed; this is a drawback)
     61 2. Binaries in the distribution must not have rpaths.  We should use wrapper scripts that set
     62    `LD_LIBRARY_PATH` instead.
     63 3. Binaries in the build tree need `LD_LIBRARY_PATH` wrappers.
     64 4. A Cabal package may install a shared library outside the standard location, but when linking to
     65    it we must do the equivalent of adding -rpath to point to its location.
     66
     67ToDo: Windows?
    4968
    5069= Platform support for locating shared libraries =