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 1.3.0 no longer notices system-installed ghc #2842

Closed
unhammer opened this issue Dec 13, 2016 · 3 comments
Closed

Stack 1.3.0 no longer notices system-installed ghc #2842

unhammer opened this issue Dec 13, 2016 · 3 comments

Comments

@unhammer
Copy link

unhammer commented Dec 13, 2016

General summary/comments (optional)

Stack 1.3.0 on Ubuntu no longer notices system-installed ghc (worked fine on 1.2.0)

Steps to reproduce

On Ubuntu 16.04,

  • Install ghc-7.8.4 happy-1.19.5 alex-3.1.4 from http://ppa.launchpad.net/hvr/ghc/ubuntu
  • export PATH="/opt/ghc/7.8.4/bin:/opt/happy/1.19.5/bin:/opt/alex/3.1.4/bin:$PATH"
  • Put resolver: lts-2.22 in stack.yaml
  • stack build

Expected

build using system ghc

Actual

stack complains

$ stack build
No compiler found, expected minor version match with ghc-7.8.4 (x86_64) (based on resolver setting in /home/kiwibird/src/app/stack.yaml).
To install the correct GHC into /home/kiwibird/.stack/programs/x86_64-linux/, try running "stack setup" or use the "--install-ghc" flag. To use your system GHC installation, run "stack config set system-ghc --global true", or use the "--system-ghc" flag.

The verbose version also says

@(Data/Store/VersionTagged.hs:72:13)
2016-12-13 11:38:24.242953: [debug] Run process: /sbin/ldconfig -p
@(System/Process/Read.hs:306:3)
2016-12-13 11:38:24.261096: [debug] Process finished in 17ms: /sbin/ldconfig -p
@(System/Process/Read.hs:306:3)
2016-12-13 11:38:24.263701: [debug] Run process: /usr/bin/gcc -v
@(System/Process/Read.hs:306:3)
2016-12-13 11:38:24.267995: [debug] Process finished in 3ms: /usr/bin/gcc -v
@(System/Process/Read.hs:306:3)
2016-12-13 11:38:24.269052: [debug] PIE enabled
@(Stack/Setup.hs:574:17)
2016-12-13 11:38:24.271102: [debug] Found shared library libtinfo.so.5 in 'ldconfig -p' output
@(Stack/Setup.hs:550:29)
2016-12-13 11:38:24.272860: [debug] Did not find shared library libtinfo.so.6
@(Stack/Setup.hs:564:38)
2016-12-13 11:38:24.273324: [debug] Did not find shared library libncursesw.so.6
@(Stack/Setup.hs:564:38)
2016-12-13 11:38:24.273635: [debug] Found shared library libgmp.so.10 in 'ldconfig -p' output
@(Stack/Setup.hs:550:29)
2016-12-13 11:38:24.273980: [debug] Did not find shared library libgmp.so.3
@(Stack/Setup.hs:564:38)
2016-12-13 11:38:24.274057: [debug] Using standard GHC build
@(Stack/Setup.hs:597:9)
2016-12-13 11:38:24.274848: [debug] Run process: /opt/ghc/7.8.4/bin/ghc --info
@(System/Process/Read.hs:306:3)
2016-12-13 11:38:24.330140: [debug] Process finished in 55ms: /opt/ghc/7.8.4/bin/ghc --info

first.

Stack version

$ stack --version
Version 1.3.0, Git revision 99b910d3c8e183aa376cb1e6f0341d86aed6d00e (4372 commits) x86_64 hpack-0.15.0

Method of installation

  • Official binary from fpcomplete's apt repo
@borsboom
Copy link
Contributor

From the Major Changes section of the changelog:

Stack will now always use its own GHC installation, even when a suitable GHC installation is available on the PATH. To get the old behaviour, use the --system-ghc flag or run stack config set system-ghc --global true. Docker- and Nix-enabled projects continue to use the GHC installations in their environment by default.

NB: Scripts that previously used stack in combination with a system GHC installation should now include a stack setup line or use the --install-ghc flag. #2221

@unhammer
Copy link
Author

unhammer commented Dec 13, 2016

I already tried this:

$ stack config set system-ghc --global true
No compiler found, expected minor version match with ghc-7.8.4 (x86_64) (based on resolver setting in /home/kiwibird/src/app/stack.yaml).
To install the correct GHC into /home/kiwibird/.stack/programs/x86_64-linux/, try running "stack setup" or use the "--install-ghc" flag. To use your system GHC installation, run "stack config set system-ghc --global true", or use the "--system-ghc" flag.

And I guess I gave up too early; I did get it compiling with stack build --system-ghc or manually setting system-ghc: true in ~/.stack/config.yaml.

Should I open a separate bug for the stack config set system-ghc --global true failure?

@borsboom
Copy link
Contributor

@unhammer: yes, please open a new issue; it does seem like stack config should work without a compiler installed.

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

2 participants