commercialhaskell / stack

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

stack build: 'InvalidAbsDir "(unreachable)/"' using docker on OSX #3948

Open runeksvendsen opened 6 years ago

runeksvendsen commented 6 years ago

General summary/comments (optional)

InvalidAbsDir "(unreachable)/" while building with fpco/stack-build docker image

Steps to reproduce

git clone -b stack-docker-bug https://github.com/runeksvendsen/ufw.git docker-bug
cd docker-bug/
docker pull fpco/stack-build
stack build

stack.yaml

Expected

Successful build

Actual

Error (InvalidAbsDir "(unreachable)/") during build.

Verbose build log: https://gist.github.com/runeksvendsen/d7f87ef79f49e450895ba004444f4c68

Stack version

$ stack --version
Version 1.6.5, Git revision 24ab0d6ff07f28276e082c3ce74dfdeb1a2ca9e9 (5514 commits) x86_64 hpack-0.20.0

Method of installation

Further information

Docker for Mac: version: 18.03.0-ce-mac59 (dd2831d4b7421cf559a0881cc7a5fdebeb8c2b98) macOS: version 10.13.3 (build: 17D102)

abailly commented 6 years ago

running into same issue with freshly downloaded stack 1.7.1

abailly commented 6 years ago

@mgsloan This seems related to #2614 and the related fix #2830

dbaynard commented 6 years ago

@abailly and @runeksvendsen would one of you be able to test with master?

I suspect it won't fix the issue but it's worth confirming.

runeksvendsen commented 6 years ago

@dbaynard running stack upgrade --git followed by going through the steps above to reproduce the bug, I get the following error at the stack build-step:

Runes-MacBook-Pro:docker-bug runesvendsen$ stack build
Downloading Docker-compatible stack executable
Control.Exception.Safe.throwString called with:

Could not get release information for Stack from: https://api.github.com/repos/commercialhaskell/stack/releases/tags/v1.8.0
Called from:
  throwString (src/Stack/Setup.hs:1824:14 in stack-1.8.0-1iO6z6o89x11YM8z8RL59i:Stack.Setup)

Is it not sufficient to run stack upgrade --git to get a Docker-compatible stack built from master?

dbaynard commented 5 years ago

It should be. I'm not quite sure what's going on here, though — I'll get somebody else to take a look.

Thanks for bearing with the delay.

borsboom commented 5 years ago

There aren't pre-built docker compatible binaries for the master branch (since master is changing all the time). You'll have to build a Linux executable yourself and then point to it with --docker-stack-exe.

runeksvendsen commented 5 years ago

I don't understand what to do.

I'm on OSX using Docker for Mac. Which executable do I have to build, and how do I use the --docker-stack-exe option?

nikitamendelbaum commented 5 years ago

Had same issue on docker 18.06.0-ce-mac70 with stack 1.7.1 and fpco/stack-build:lts-10.10 image. Removed both ~/.stack and .stack-work, updated docker and the issue is gone now. Not sure what exactly solved the problem. Tried to clean stack directories earlier and it didn't help but hard to believe it's docker...