[GHC] #8725: make DESTDIR=... install broken

GHC ghc-devs at haskell.org
Tue Feb 4 00:10:55 UTC 2014


#8725: make DESTDIR=... install broken
----------------------------------------+----------------------------------
        Reporter:  nomeata              |            Owner:
            Type:  bug                  |           Status:  new
        Priority:  high                 |        Milestone:
       Component:  Build System         |          Version:  7.6.3
      Resolution:                       |         Keywords:
Operating System:  Unknown/Multiple     |     Architecture:
 Type of failure:  Building GHC failed  |  Unknown/Multiple
       Test Case:                       |       Difficulty:  Unknown
        Blocking:                       |       Blocked By:
                                        |  Related Tickets:
----------------------------------------+----------------------------------

Comment (by nomeata):

 After being told that others have not problem with `DESTDIR`, I narrowed
 it down a bit.

 I believe that `DESTDIR` can only work if `$ghclibexecdir` = `$ghclibdir`.
 Then, executing `$ghclibexecdir/bin/ghc` works because of the rpath of the
 binaries:
 {{{
  0x000000000000000f (RPATH)              Library rpath:
 [$ORIGIN/../terminfo-0.4.0.0:$ORIGIN/../bin-package-
 db-0.0.0.0:$ORIGIN/../binary-0.7.1.0:$ORIGIN/../Cabal-1.18.1.3:$ORIGIN/../process-1.2.0.0:$ORIGIN/../pretty-1.1.1.1:$ORIGIN/../directory-1.2.0.2:$ORIGIN/../unix-2.7.0.0:$ORIGIN/../time-1.4.1:$ORIGIN
 /../old-
 locale-1.0.0.6:$ORIGIN/../filepath-1.3.0.2:$ORIGIN/../containers-0.5.4.0:$ORIGIN/../bytestring-0.10.4.0:$ORIGIN/../deepseq-1.3.0.2:$ORIGIN/../array-0.5.0.0:$ORIGIN/../base-4.7.0.0:$ORIGIN
 /../integer-gmp-0.5.1.0:$ORIGIN/../ghc-prim-0.3.1.0:$ORIGIN/../rts-1.0]
 }}}

 Debian has `$ghclibexecdir = $ghclibdir/lib`, so this breaks.

 The relative path here (`$ORIGIN/../$d`) is hard-coded in source:rules
 /build-package-way.mk and this issue was last addressed by [7dd7008f], in
 response to  #3072.

 To fix this properly, instead of `..` one would have to calculate the
 relative path from `$ghclibexecdir/bin` to `$ghclibdir`. Or simply, and
 officially stop supporting such directory layouts.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8725#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list