Opened 17 months ago

Closed 17 months ago

Last modified 12 months ago

#15132 closed bug (fixed)

Hadrian-built GHC cannot locate `unlit`

Reported by: tdammers Owned by: alpmestan
Priority: normal Milestone: 8.6.1
Component: Build System (make) Version:
Keywords: hadrian Cc: alpmestan
Operating System: Linux Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

When trying to compile a Literate Haskell source with a Hadrian-built GHC, compilation fails due to GHC not finding the unlit binary.

How to reproduce:

  • Compile GHC using the default Hadrian build.sh script
  • Create a minimal LHS file, e.g. echo '> main = return ()' > test.lhs
  • Compile the LHS file with the in-place GHC: $GHC_SRC_TREE/_build/stage1/bin/ghc test.lhs

This fails with something like:

ghc: could not execute: $GHC_SRC_TREE/_build/stage1/lib/bin/unlit

However, the unlit binary is in $GHC_SRC_TREE/_build/stage1/bin/unlit. Considering how make-built GHC works fine, this seems to be a misconfiguration in the Hadrian build system.

Change History (4)

comment:1 Changed 17 months ago by alpmestan

Cc: alpmestan added
Keywords: hadrian added
Owner: set to alpmestan

This is due to GHC systematically looking for unlit under libexec, not even trying to look at the directory where the ghc binary resides, to see whether it also has an unlit executable.

I have a fairly simple fix for this on the hadrian side, that just places unlit executables under <build root>/stage<N>/lib/bin/unlit instead of <build root>/stage<N>/bin/unlit. Will submit a PR shortly. A better solution would be to change the code from SysTools.hs to do something a little smarter.

comment:2 Changed 17 months ago by alpmestan

Hadrian pull request here.

comment:3 Changed 17 months ago by alpmestan

Resolution: fixed
Status: newclosed

The pull request has been merged. Hadrian now produces GHCs that can successfully process .lhs files.

comment:4 Changed 12 months ago by bgamari

Component: Build SystemBuild System (make)

The new Hadrian build system has been merged. Relabeling the tickets concerning the legacy make build system to prevent confusion.

Note: See TracTickets for help on using tickets.