#1860: GMP dyn link dependencies in binary distributions
-----------------------------+----------------------------------------------
Reporter: chak | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.8.2
Component: Build System | Version: 6.8.1
Severity: major | Keywords:
Difficulty: Unknown | Testcase:
Architecture: Unknown | Os: MacOS X
-----------------------------+----------------------------------------------
A binary distribution contains a couple of ghc compiled binaries (most
notably `pwd` and `ghc-pkg` from the `utils/` directory) that are linked
by the '''bootstrap compiler''' (i.e., the compiler also used to compile
stage1). As result, these binaries include dependencies on those versions
of dynamic libraries used by the bootstrap compiler. This can be fatal if
the build machine has dynamic libraries that the machine where the binary
distribution is installed doesn't have (in particular, this can be a
problem with gmp on Mac OS X).
Here an example:
1. Machine A has a macports installation of GHC 6.6.1 that is dependent
on and uses macport's gmp.
2. Machine A is used to generate a binary distribution for GHC 6.8.1,
where the 6.6.1 compiler is used as the bootstrap compiler. The resulting
GHC compiled binaries in the `utils/` directory of the generated
distribution will now depend on the macports version of gmp.
3. Machine B has no gmp installed (which should be ok as the binary
distribution has a version of gmp embedded which the newly installed
compiler will use).
4. When invoking `./configure` on Machine B, `utils/pwd` of the binary
distribution will be invoked which looks for the macports version of gmp
in vain and fails.
This is a fundamental problem with dynlib dependencies, esp on gmp, which
will affect all architectures to varying degrees. However, it is
especially bad for Mac OS X, as the obvious solution - to link the
binaries generated by the bootstrap compiler '''statically''' - does not
work on Mac OS X (at least it does not on 10.5). It the flag `-optl-
static` is supplied, linking fails complaining that a library `crt.o`
could not be found.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1860>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs