Skip to content

Hadrian: "Could not find module ‘Text.Regex’" when building nofib

I believed hadrian would take care of all dependencies, but that doesn't seem to work in the case of nofib where it shells out to make?!

$ hadrian/build.sh nofib
<snip>
------------------------------------------------------------------------
== /usr/bin/make boot ;
 in /home/simon/src/ghc-head/nofib/nofib-analyse
------------------------------------------------------------------------
/opt/ghc/bin/ghc -O -cpp --make Main -o nofib-analyse
[1 of 4] Compiling CmdLine          ( CmdLine.hs, CmdLine.o )
[2 of 4] Compiling GenUtils         ( GenUtils.lhs, GenUtils.o )
[3 of 4] Compiling Slurp            ( Slurp.hs, Slurp.o )

Slurp.hs:13:1: error:
    Could not find module ‘Text.Regex’
    Perhaps you meant Text.Read (from base-4.12.0.0)
    Use -v to see a list of the files searched for.
   |
13 | import Text.Regex
   | ^^^^^^^^^^^^^^^^^
Makefile:7: recipe for target 'nofib-analyse' failed
make[1]: *** [nofib-analyse] Error 1
Failed making boot in nofib-analyse: 1
mk/ghc-recurse.mk:65: recipe for target 'boot' failed
make: *** [boot] Error 1
Error when running Shake build system:
  at want, called at src/Main.hs:75:30 in main:Main
* Depends on: nofib
  at apply1, called at src/Development/Shake/Internal/Rules/Rerun.hs:41:5 in shake-0.18.2-6c1a78b650054ba4d7475d07c73c33ee532fad0617de5e4799edbccec0e17700:Development.Shake.Internal.Rules.Rerun
* Depends on: _build/nofib-log
* Raised the exception:
user error (Development.Shake.cmd, system command failed
Command line: /usr/bin/make WithNofibHc=/home/simon/src/ghc-head/_build/stage1/bin/ghc boot
Current directory: /home/simon/src/ghc-head/nofib
Exit code: 2
Stderr:
Slurp.hs:13:1: error:
    Could not find module ‘Text.Regex’
    Perhaps you meant Text.Read (from base-4.12.0.0)
    Use -v to see a list of the files searched for.
   |
13 | import Text.Regex
   | ^^^^^^^^^^^^^^^^^
make[1]: *** [nofib-analyse] Error 1
make: *** [boot] Error 1
)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information