commercialhaskell / stack

The Haskell Tool Stack
http://haskellstack.org
BSD 3-Clause "New" or "Revised" License
3.98k stars 845 forks source link

Stack does not respect use of system ghc when it cannot find installation keys for the OS #5065

Open ProofOfKeags opened 4 years ago

ProofOfKeags commented 4 years ago

General summary/comments (optional)

I am trying to build a project on Arch Linux on ARMv7 (Raspberry Pi 4), and it cannot find the OS Key for linux-armv7-tinfo6. This is expected behavior. However, I managed to install ghc 8.6.1 via pacman. I figured I would be able to use this resolver with the flag system-ghc: true to at least get a build started if not fully finished. This is not the case.

Steps to reproduce

The full steps are not needed to understand the gist of this issue (I think). But for completeness:

  1. Install Arch Linux on a Raspberry Pi
  2. Install Stack: pacman -S stack
  3. Upgrade to Stack 2.1.3: stack upgrade
  4. Install GHC: pacman -S ghc
  5. Set up trivial project that uses the resolver: resolver: nightly-2018-09-29
  6. Set the flag system-ghc: true
  7. Build the project

Expected

The build should start with the system-ghc

Actual

$ stack build
Unable to find installation URLs for OS key: linux-armv7-tinfo6

Stack version

$ stack --version
Version 2.1.3, Git revision 636e3a759d51127df2b62f90772def126cdf6d1f (7735 commits) arm hpack-0.31.2

Method of installation

stack upgrade . pacman -S stack

tmspzz commented 4 years ago

@CaptJakk Is it possible that your system's GHC doesn't match the resolver's one?

I just stumbled upon this issue and it's working for me on (on ubuntu 19.10 arm64) with ghc 8.6.5 and resolver 14.16

I just issued stack install --system-ghc and my project started building

ProofOfKeags commented 4 years ago

have you tried on ARM? this ONLY happens if it can't find the installation keys for the arch-os combo. I ran into this when doing some work on Arch on a RPi 4.

robwithhair commented 4 years ago

I have experienced this issue on 64bit Ubuntu Server installed on Raspberry Pi 4 and on 32bit Raspbian on Raspberry Pi 4. Stack seems broken on the Pi.

ProofOfKeags commented 4 years ago

We are having a lot of success running it on Raspbian Buster Lite, in general. Arch on the Pi doesn't seem to work with stack though, even though GHC binaries for 8.6.1 are available, which is why we said "use system ghc", but it still was hung up on not being able to find installation keys