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

On Arch linux 'stack install' succeeds while 'stack ghci' doesn't #1135

Closed
PierreR opened this issue Oct 9, 2015 · 5 comments
Closed

On Arch linux 'stack install' succeeds while 'stack ghci' doesn't #1135

PierreR opened this issue Oct 9, 2015 · 5 comments

Comments

@PierreR
Copy link

PierreR commented Oct 9, 2015

I am trying to use stack ghci with language-puppet. stack install works fine but stack ghci gives me a compilation error. For instance:

Puppet/Utils.hs:30:40:
    No instance for (AsNumber Scientific)
      arising from a use of ‘_Integer’

This error makes no sense to me because

It is important to note that:

  • I have been tested the same setting on Ubuntu 14.04.02 LTS Trusty Tahr and stack ghci works fine there.
  • I have other (simpler) projects on Arch linux that have no problem with stack ghci.
  • After a stack clean, I have another error: Could not find module ‘Paths_language_puppet’. When I stack build again and then stack ghci, I will get back the same compilation error.
  • Trying to remove ~/.ghci does not make a difference

One notable difference between the Ubuntu and the Arch linux setup, is the fact that in Ubuntu everything is installed by stack whereas in Arch linux, ghc and many other haskell packages are installed by Arch linux (via pacman)

How to reproduce (on Arch linux):

Using Version 0.1.5.0 X86_64 on Arch linux.

As already discussed in #847, the problem is related to Arch linux. It is suggested in #847 that permissions could be the root cause. I have tested the proposed fix (make file permissions on Arch the same as in Ubuntu) but it did not fix the problem.

@borsboom
Copy link
Contributor

What happens if you use stack --no-system-ghc, so that Stack doesn't use the system-installed GHC/packages?

Also, AFAIK, there's no inherent reason Stack on Arch has to use the system GHC/package. It would only do so if you have already installed GHC/packages separately from Stack (just like on Ubuntu and others). The haskell-stack package at https://aur.archlinux.org/packages/haskell-stack/ does not depend on any system GHC (but will use it if it's there).

@borsboom
Copy link
Contributor

Also, @drwebb, as our resident Arch user, do you have input about why the system-installed GHC/packages would be causing this kind of trouble with stack ghci?

@PierreR
Copy link
Author

PierreR commented Oct 12, 2015

As a note, I will have to check and see if 0a1a2f7 does not solve the issue.

@borsboom If it does not, I will definitely try stack --no-system-ghc

@PierreR
Copy link
Author

PierreR commented Oct 14, 2015

I can confirm this issue is solved in 0.1.7.0.

Thanks for the support.

@PierreR PierreR closed this as completed Oct 14, 2015
@drwebb
Copy link
Contributor

drwebb commented Oct 16, 2015

I've never come across a problem where using the ghc package in the Arch
repos acted like this.

Emanuel Borsboom writes:

Also, @drwebb, as our resident Arch user, do you have input about why the system-installed GHC/packages would be causing this kind of trouble with stack ghci?


Reply to this email directly or view it on GitHub:
#1135 (comment)

Tristan Webb PhD
Application Engineer
FP Complete

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