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

Stack cannot find happy during build #3178

Closed
W4RH4WK opened this issue May 18, 2017 · 4 comments
Closed

Stack cannot find happy during build #3178

W4RH4WK opened this issue May 18, 2017 · 4 comments

Comments

@W4RH4WK
Copy link

W4RH4WK commented May 18, 2017

While trying to build one project that makes use of pretty-show, stack complains about not finding happy, although it has been installed previously and can be run:

> stack exec -- happy --version
Happy Version 1.19.5 Copyright (c) 1993-1996 Andy Gill, Simon Marlow (c) 1997-2005 Simon Marlow

Happy is a Yacc for Haskell, and comes with ABSOLUTELY NO WARRANTY.
This program is free software; you can redistribute it and/or modify
it under the terms given in the file 'LICENSE' distributed with
the Happy sources.

Building produces following error message:

--  While building package pretty-show-1.6.12 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_1.24.2.0_ghc-8.0.2.exe --builddir=.stack-work\dist\ca59d0ab configure --with-ghc=C:\Users\alex\AppData\Local\Programs\stack\x86_64-windows\ghc-8.0.2\bin\ghc.EXE --with-ghc-pkg=C:\Users\alex\AppData\Local\Programs\stack\x86_64-windows\ghc-8.0.2\bin\ghc-pkg.EXE --user --package-db=clear --package-db=global --package-db=C:\sr\snapshots\bf8f3162\pkgdb --libdir=C:\sr\snapshots\bf8f3162\lib --bindir=C:\sr\snapshots\bf8f3162\bin --datadir=C:\sr\snapshots\bf8f3162\share --libexecdir=C:\sr\snapshots\bf8f3162\libexec --sysconfdir=C:\sr\snapshots\bf8f3162\etc --docdir=C:\sr\snapshots\bf8f3162\doc\pretty-show-1.6.12 --htmldir=C:\sr\snapshots\bf8f3162\doc\pretty-show-1.6.12 --haddockdir=C:\sr\snapshots\bf8f3162\doc\pretty-show-1.6.12 --dependency=array=array-0.5.1.1 --dependency=base=base-4.9.1.0 --dependency=filepath=filepath-1.4.1.1 --dependency=ghc-prim=ghc-prim-0.5.0.0 --dependency=haskell-lexer=haskell-lexer-1.0.1-KbrNzOgvOlP3fb0pmnXx0E --dependency=pretty=pretty-1.1.3.3 --extra-include-dirs=C:\Users\alex\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include --extra-lib-dirs=C:\Users\alex\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib
    Process exited with code: ExitFailure 1
    Logs have been written to: Z:\insieme\code\analysis\src\cba\haskell\insieme-hat\.stack-work\logs\pretty-show-1.6.12.log

    Configuring pretty-show-1.6.12...
    Cabal-simple_Z6RU0evB_1.24.2.0_ghc-8.0.2.exe: The program 'happy' is required
    but it could not be found.

The project can be found here. The following steps should reproduce the issue.

  • clone https://github.com/insieme/insieme
  • checkout 0fd76d435ec403afa1e9b8efcd1a99c974cf1b91
  • cd code/analysis/src/cba/haskell/insieme-hat
  • remove stack-8.0.yaml (just to make sure this does not interfere somehow)
  • edit stack.yaml, change resolver to lts-8.14
  • stack setup
  • stack build alex
  • stack build happy
  • stack build c2hs
  • stack build

Note that this issue is encountered on Windows 10 64 Bit including the creators update.

Stack version

> stack --version
Version 1.4.0, Git revision e714f1dd3fade19496d91bd6a017e435a96a6bcd x86_64 hpack-0.17.0

Method of installation

  • Official binary, downloaded from stackage.org or fpcomplete's package repository
@W4RH4WK
Copy link
Author

W4RH4WK commented May 19, 2017

This indeed seems to be related to #3151 as this issue does not happen with Stack 1.3.2.

@mgsloan
Copy link
Contributor

mgsloan commented Jun 6, 2017

If I build happy, then this works.

Oddly enough, for me it doesn't seem to have happy in the snapshot despite its presence in lts-8.14. This causes happy to not get installed automatically. This could certainly use additional investigation.

@mgsloan mgsloan added this to the P2: Should milestone Jun 6, 2017
@snoyberg
Copy link
Contributor

snoyberg commented Jul 5, 2017

I believe this is fixed by my PR #3249, based on my testing. I'd appreciate if you could give a shot at building with a Stack built from that branch (extensible-exceptions) and let me know if you can confirm. Note that that branch should still be considered experimental, and therefore you probably don't want to make it your main Stack executable.

@snoyberg
Copy link
Contributor

Closing now that #3249 is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants