Changes between Version 2 and Version 3 of SharedLibraries


Ignore:
Timestamp:
Aug 2, 2007 9:27:37 AM (7 years ago)
Author:
simonmar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SharedLibraries

    v2 v3  
    11= Shared Libraries: distribution and build-system issues = 
     2 
     3This page is for discussing and documenting our strategy for 
     4 
     5 * How shared libraries are found 
     6 * How the build system works 
     7 * How distributions (of GHC and programs built by GHC) work 
     8 * Issues that affect Cabal 
     9 
     10== Goals/Scenarios == 
     11 
     12First of all, we take it as a given that a normal GHC installation will be a good citizen on its host platform: shared libraries will go in the standard locations, and we'll use the system's normal method for finding them at link time and runtime.  Windows is an exception: there is no standard location for installing shared libraries on Windows. 
     13 
     14So that we can support having multiple versions of GHC installed, shared libraries will have the GHC version number embedded, e.g. `libHSghc6.6.1-network-1.1.so`. 
     15 
     16Here is what else we'd like to do: 
     17 
     18 1. Support installing GHC outside of the standard location (e.g. in a home directory), and build 
     19    binaries using that installation.  Multiple such installations should be supported. 
     20 
     21 2. We need to build a distribution that supports choosing the install location at install time, for 
     22    use in (1). 
     23 
     24 3. Binaries that are built as part of the GHC build (e.g. stage2/ghc-inplace) need to run from 
     25    the build tree. 
     26 
     27= Proposed strategies = 
     28 
     29== 1. Static linking == 
     30 
     31(1,2) Installations of GHC that are not in the standard locations use static linking and come with static libraries only. 
     32 
     33(3) stage2/ghc-inplace is linked statically. 
     34 
     35This is attractive, but there are some drawbacks: 
     36 
     37 * we still need to build a distribution that uses shared libs.  Presumably we have to build both 
     38   shared and static libs then. 
     39 
     40 * the testsuite needs to build binaries against the shared libs for testing, without installing GHC. 
     41 
     42 * we want the GHC binary in a shared-library installation to be dynamically linked, not statically linked. 
     43 
     44== 2. Dynamic linking == 
    245 
    346= Platform support for locating shared libraries =