Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,865
    • Issues 4,865
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 461
    • Merge requests 461
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #16434
Closed
Open
Created Mar 14, 2019 by David Eichmann@DavidEichmann🏋Maintainer

Hadrian binary-dist Installs files into the wrong location

I've compared the binary dist installation of GHC-8.6.1 and HEAD+Hadrian (on linux):

$ cd ghc-8.6.1
$ ./configure --prefix=~/ghc-8.6.1
$ sudo make install                 # I'm not sure why, but sudo was needed here
$ cd ..

$ cd ghc  # ghc head
$ ./hadrian/build.sh -j dinary-dist
$ cd _build/bindist/ghc-<ver>-<ptfm>
$ ./configure --prefix=~/ghc-HEAD
$ make install
$ cd ..

It seems Hadrian places many files in the wrong place:

  • (A) 8.6.1 places many files in ${prefix}/lib/ghc-8.6.1 and places no other files/directories directly in ${prefix}/lib. HEAD+Hadrian on the other hand, places some of the corresponding files in ${prefix}/lib/ghc-<ver>, and the rest in the parent directory ${prefix}/lib (this seems like a blatant bug to me).
  • (B) HEAD+Hadrian places an include directory in ${prefix} while make places it in ${prefix}/lib/ghc-8.6.1.

Also note that all binaries (e.g. ghc itself) should be placed in ${prefix}/lib/ghc-<ver> as is done in make. Annoyingly, these binaries will fail to run if called directly. Instead, the wrapper scripts must be used (placed at ${prefix}/bin). This begs the question:

  • (C) The rpaths on the Hadrian binaries are correct in the _build directory, but are no longer correct after a binary-dist install! In order for the rpaths to be correct in both cases, the relative locations of the shared libraries and the binaries must be the same. This could be solved by changing the location of the binaries in the _build directory (and possibly adding wrapper scripts in _build in place of the binaries e.g. so _build/stage1/bin/ghc is a wrapper that calls _build/stage1/lib/bin/ghc).

Related github issue: https://github.com/snowleopard/hadrian/issues/570.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking