haskell / happy

The Happy parser generator for Haskell
Other
276 stars 84 forks source link

Error Building Happy: The program 'happy' is required but it could not be found #285

Closed Boring545 closed 4 days ago

Boring545 commented 1 month ago

Here's the process I followed to build happy, ending with the reported error:

wget https://hackage.haskell.org/package/happy-1.20.1/happy-1.20.1.tar.gz
tar -xf happy-1.20.1.tar.gz
cd happy-1.20.1

ghc --make Setup.hs
./Setup configure --user --enable-library-profiling

Attempt to build happy, resulting in the following error:

./Setup build
Preprocessing executable 'happy' for happy-1.20.1..
Error: Setup: The program 'happy' is required but it could not be found

Additionally, I successfully built Alex using a nearly identical approach.Is there an issue with my build method?

Boring545 commented 1 month ago

I tried version: starting with 1.20.1, 1.21.0, and they all failed during the process. Finally, I tried 1.19.12, 1.20.1.1, and the build was successful.

sgraf812 commented 1 month ago

Indeed, 1.20.1.1 should work. 1.21.0 and 1.20.1 were deprecated for the very reason that they can't be built.

sgraf812 commented 1 month ago

@Boring545 is there anything left to do here? Perhaps adding documentation somewhere? Where?

I see that you were using wget to download the tarball. Why not cabal get happy? That would have automatically downloaded the correct version.

sgraf812 commented 4 days ago

Closing, because there is a happy release (1.20.1.1) that works.