Skip to content

Hadrian install script doesn't update location of haddockHTMLs and haddockInterfaces

This is to track part two of the plan here: https://gitlab.haskell.org/ghc/ghc/merge_requests/50#note_1808.

When installing a bindist, the make system runs ghc-cabal to reconfigure packages and regenerate the package DB. Hadrian, on the other hand, seems to just be copying the package DB as is to its install location. This is mostly OK since most paths only need to be relative to package root. However, it breaks down for the haddock-interfaces and haddock-html fields, (esp. since documentation can be installed in a completely different location).

The following interaction demonstrates the problem. Note how ghc-pkg is pointing us to a directory that doesn't even exist!

$ ./hadrian/build.sh -c -j binary-dist
$ mv _build/bindist/ghc-8.7.20190117-x86_64-apple-darwin.tar.xz /Users/alec/scratch
$ cd /Users/alec/scratch
$ tar xpvf ghc-8.7.20190117-x86_64-apple-darwin.tar.xz
$ ./configure --prefix=/Users/alec/scratch && make install
$ ./bin/ghc-pkg field base haddock-html
haddock-html: /Users/alec/scratch/lib/../../docs/html/libraries/base
$ ls /Users/alec/scratch/lib/../../docs/html/libraries/base
ls: /Users/alec/scratch/lib/../../docs/html/libraries/base: No such file or directory
Trac metadata
Trac field Value
Version 8.6.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Build System (Hadrian)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information