0

I'm following chapter 13.3 of "Haskell Programming from First Principles" and working on stack build but fail with below error message as below. I'm doing on my MBP terminal with current Stack version: 1.3.2 installed, . Any solution for a way out? (I'm currently working with very slow wifi environment. I'm not sure whether stack build fails because of bad connectivity.)

$ stack build
Updating package index Hackage (mirrored at 
https://github.com/commercialhaskell/all-cabal-hashes.git) ...  

Long Pause Here... almost 10 minutes.

Running /usr/bin/git clone https://github.com/commercialhaskell/all-cabal-hashes.git all-cabal-hashes/ -b display in directory /Users/Sleepyleo/.stack/indices/Hackage/git-update/ exited with ExitFailure 128

Cloning into 'all-cabal-hashes'...  
error: RPC failed; curl 56 SSLRead() return error -9806  
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
duplode
  • 33,731
  • 7
  • 79
  • 150
  • 1
    "I'm currently working with very slow wifi environment. I'm not sure whether stack build fails because of bad connectivity." -- Sounds plausible, though it is hard to tell for sure. This specific step (updating the package index) shouldn't be taking so long. Did you get to run `stack build` successfully in your system in the past? – duplode Apr 30 '17 at 18:42
  • It's my first try using *stack build*. I've installed stack 3.1.2 like a 3-4 months back and never have run it. I'm trying to `stack upgrade` now but slow wifi here make me impatient. – Lim Hyuntaek Apr 30 '17 at 18:49
  • 1
    FWIW on my machine `./.stack/indices/Hackage/git-update/all-cabal-hashes` is ~ 250 MB so that can take a while to fully clone on a slow connection. – ppb Apr 30 '17 at 19:12
  • 250MB is pretty huge. This cloning need to be done every time running `stack build`? or only one time at the very first time? – Lim Hyuntaek May 01 '17 at 18:11

1 Answers1

0

Error code -9806 is a Mac OS X error code for a generic SSL connection failure. Others have reported this as a problem with older versions of git connecting to certain sites with incompatible SSL configurations. See this StackOverflow question, for example. However, it's also been reported as a result of a connection being interrupted on a flaky Internet connection (e.g., this github issue).

Unfortunately, since you are seeing this after a 10 minute timeout, it's likely your Internet connection rather than an SSL compatibility problem.

You might want to try running:

/usr/bin/git clone https://github.com/commercialhaskell/all-cabal-hashes.git
    all-cabal-hashes/ -b display

manually in a directory somewhere. It's about a 200 megabyte download. This will show you if it's making any progress and how fast the download is running.

Community
  • 1
  • 1
K. A. Buhr
  • 45,621
  • 3
  • 45
  • 71