Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • 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,842
    • Issues 4,842
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 457
    • Merge requests 457
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #19646

Closed
Open
Created Apr 04, 2021 by Steve Smith@essandess

Bootstrap of ghc doesn’t do DESTDIR correctly, propagates build dir

Summary

The bootstrap of ghc doesn’t do DESTDIR correctly, embeds the build directory into the ghc binary, and propagates the build directory to binaries built using bootstrapped ghc.

This is embedded in the ghc binary in several places:

vi /opt/local/lib/ghc-8.10.4/bin/ghc

^@/opt/local/var/macports/build/_opt_local_ports_lang_ghc/ghc/work/src/ghc-8.10.4/rts/dist/build^@

Also:

fgrep "/opt/local/var/macports/build" /opt/local/lib/ghc-8.10.4/bin/ghc
Binary file /opt/local/lib/ghc-8.10.4/bin/ghc matches

Looking at binaries built with this bootstrapped ghc shows that the issue propagates.

Here is the binary for pandoc, built using cabal 3.4.0.0 and this ghc-8.10.4 binary:

fgrep "/opt/local/var/macports/build/_opt_local_ports_lang_ghc/ghc/work/src/ghc-8.10.4/rts" /opt/local/bin/pandoc
Binary file /opt/local/bin/pandoc matches

Steps to reproduce

The Portfile simply implements ghc's basic quick start build instructions.

Expected behavior

No build directories in the ghc binary, or binaries built using it.

Environment

  • GHC version used: 8.10.4

Optional:

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