Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.21.0: The program 'happy' is required but it could not be found #211

Closed
Mikolaj opened this issue Oct 20, 2021 · 8 comments
Closed

Comments

@Mikolaj
Copy link
Member

Mikolaj commented Oct 20, 2021

GHC 8.10.7, cabal 3.4:

Downloading  happy-1.21.0
Downloaded   happy-1.21.0
Starting     happy-1.21.0 (exe:happy)
Building     happy-1.21.0 (exe:happy)

Failed to build exe:happy from happy-1.21.0.
Build log (
/home/mikolaj/.cabal/logs/ghc-8.10.7/happy-1.21.0-e-happy-f90d659122467dc006ae1efb35dcd10f113a0857663940bcc9c74e11a4405a6f.log
):
Configuring executable 'happy' for happy-1.21.0..
Preprocessing executable 'happy' for happy-1.21.0..
cabal-3.4.0.0: The program 'happy' is required but it could not be found
@int-index
Copy link
Collaborator

Cabal doesn’t understand bootstrapping, so you’ll need to do it manually.

cabal install happy -f -bootstrap
cabal install happy -f +bootstrap

Then it should work, assuming $HOME/.cabal/bin is in your $PATH.

@Mikolaj
Copy link
Member Author

Mikolaj commented Oct 20, 2021

My numerous CIs will be unamused. But @Ericson2314 is concocting a solution in cabal.project over at #haskell right now, so there is hope...

@Bodigrim
Copy link

On my machine cabal build -fbootstrap does not seem to work, even while happy is in the PATH:

$ cabal --version
cabal-install version 3.6.2.0
compiled using version 3.6.2.0 of the Cabal library
$ happy --version
Happy Version 1.20.0 Copyright (c) 1993-1996 Andy Gill, Simon Marlow (c) 1997-2005 Simon Marlow
$ cabal unpack happy-1.21.0
Unpacking to happy-1.21.0/
$ cd happy-1.21.0
$ cabal build
Resolving dependencies...
Build profile: -w ghc-8.10.6 -O1
In order, the following will be built (use -v for more details):
 - happy-1.21.0 (exe:happy) (first run)
Configuring executable 'happy' for happy-1.21.0..
Preprocessing executable 'happy' for happy-1.21.0..
happy: /private/tmp/happy-1.21.0/./data//HappyTemplate-arrays-coerce: openFile: does not exist (No such file or directory)
$ cabal build -fbootstrap
Resolving dependencies...
Build profile: -w ghc-8.10.6 -O1
In order, the following will be built (use -v for more details):
 - happy-1.21.0 (exe:happy) (configuration changed)
Configuring executable 'happy' for happy-1.21.0..
Preprocessing executable 'happy' for happy-1.21.0..
happy: /private/tmp/happy-1.21.0/./data//HappyTemplate-arrays-coerce: openFile: does not exist (No such file or directory)

@Bodigrim
Copy link

Could we avoid this flag altogether? What if we declare an internal library (sharing hs-source-dirs with happy executable), which bootstraps from a parser-combination-based implementation (so it is happy stage0) and is used to bootstrap happy proper?

@Ericson2314
Copy link
Collaborator

Ericson2314 commented Oct 21, 2021

I have deprecated 1.21.0 on Hackage before anyone else's workflows get broken. Sorry for the disturbance.

@Ericson2314
Copy link
Collaborator

@Bodigrim That is basically just what we are thinking :). I will try to make a two-exe, single package 1.21.1, and on master right now we are splitting things up so there will be less ugly sharing of source code between two components.

@Ericson2314
Copy link
Collaborator

#212 this is my attempt, but now the issue is needing Cabal to understand that happy-boot is to be used.

@RarogCmex
Copy link

RarogCmex commented Oct 25, 2021

@Ericson2314, thank you, but my workflow get slightly broken because 1.21.0 appears in Stackage Nightly (commercialhaskell/stackage#6252). I've used workaround with stack install happy :)

dahlia added a commit to dahlia/seonbi that referenced this issue Nov 17, 2021
dahlia added a commit to dahlia/seonbi that referenced this issue Nov 17, 2021
dahlia added a commit to dahlia/seonbi that referenced this issue Nov 17, 2021
dahlia added a commit to dahlia/seonbi that referenced this issue Nov 17, 2021
dahlia added a commit to dahlia/seonbi that referenced this issue Nov 17, 2021
dahlia added a commit to dahlia/seonbi that referenced this issue Nov 17, 2021
dahlia added a commit to dahlia/seonbi that referenced this issue Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants