Closed TerrorJack closed 5 years ago
I think you're using too old a Cabal version, because since 2.2 IIRC things that are in build-tool-depends
are also installed automatically. Any chance this could be the problem?
@alpmestan ghc-8.4.4 has Cabal-2.2.0.1
in global pkgdb, and I'm using cabal-install-2.4.0.0
compiled using Cabal-2.4.0.1
, so Cabal
version should be relatively new here.
Hmm, I'm confused then. Maybe @hvr will know?
cabal does build them; the problem is a different one: how to make them visible to ./configure
so it can persist/record their locations in the config-settings.
Here's two ways which should work to query for the locations for the build-tools
that were requested by hadrian.cabal
:
$ cabal new-exec --project=$PWD/hadrian/cabal.project sh -- -c 'command -v alex'
/home/hvr/.cabal/store/ghc-8.4.4/alex-3.2.4-4006f020d0bf93fca9fc50e9f961c4a2af3341f7a44d2bfa6f7feb9c7d6e930b/bin/alex
or alternatively
$ cabal new-exec --project=$PWD/hadrian/cabal.project which -- alex
/home/hvr/.cabal/store/ghc-8.4.4/alex-3.2.4-4006f020d0bf93fca9fc50e9f961c4a2af3341f7a44d2bfa6f7feb9c7d6e930b/bin/alex
One thing I I've been missing from configure
is support for --with-alex=
and --with-happy=
; in the past I temporarily modified PATH
during the ./configure
invocation until the locations were persisted; but that's not a precise method.
(@TerrorJack told me on IRC this problem is now solved.)
I am not sure we should consider this issue resolved.
As @hvr points out, the general solution is unclear. Others may he hit by the same problem.
Adding support for --with-(alex|happy)
: https://phabricator.haskell.org/D5307
We landed proper support for passing alex & happy to configure in https://gitlab.haskell.org/ghc/ghc/merge_requests/61
I’m happy to take a stab at fixing this ticket if we still want it?
@adamse Yes, it would be great, thank you!
Perhaps, you could open a GHC Trac ticket (or should it be a GitLab issue now?) to briefly describe the problem and proposed solution, so that it is more visible to GHC developers?
@snowleopard see https://ghc.haskell.org/trac/ghc/ticket/16120#ticket
@adamse Awesome, thank you! I'm therefore closing this issue.
Starting from a fresh checkout of ghc tree (revision 9a779d9fe05a0e6eec1db9b5c22fb5e9ae81eb91), running
hadrian/build.sh --configure -j
produces the following error message:I'm building it with ghc-8.4.4 and if I'm correct,
alex
andhappy
arebuild-tool
s ofhadrian
, so when they are not present inPATH
,Cabal
should build and use them automatically, but this seems to be not the case.Does
hadrian
requirealex
,happy
pre-installed, just like the legacymake
-based build system? If so this should be documented.