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

Can't build using stack on OS X #12

Open
jwhitley opened this issue Jul 15, 2015 · 4 comments
Open

Can't build using stack on OS X #12

jwhitley opened this issue Jul 15, 2015 · 4 comments

Comments

@jwhitley
Copy link

[N.B.: this is quite possibly also relevant to commercialhaskell/stack than stackage-view, but I'm starting the discussion here.]

Repro steps

  1. On an OS X box, install stack and clone this repo.
  2. cd path/to/stackage-view
  3. stack build

Actual results

>> stack build
Cannot find 'docker' in PATH.  Is Docker installed?

Expected results

stackage-view builds natively, so it can be invoked in a Cabal project directory.

Notes

The stack.yml file includes the stanza:

docker:
  repo: fpco/ghcjs-dev

This means that what should be a straightforward local build of this tool now must be built inside of a docker instance. This makes for a positively bizarre workflow, since the primary usage of this tool appears to be on a development host.

I fully understand the benefits of fully reproducible builds using docker (and VMs in general). Yet those benefits don't appear to apply to stackage-view because it's a client tool, not a server tool.

@jwhitley
Copy link
Author

Ah ha! From this comment by @snoyberg it's now clear that the current stack.yaml setup is to satisfy this build's dependency on GHCJS, thus the repo: ghcjs-dev docker image.

The error reporting observed below is rather obscure for a missing CLI dependency:

[13 of 17] Compiling Import           ( server/Import.hs, .stack-work/dist/x86_64-osx/Cabal-1.18.1.5/build/Import.o )
[14 of 17] Compiling Handler.Home     ( server/Handler/Home.hs, .stack-work/dist/x86_64-osx/Cabal-1.18.1.5/build/Handler/Home.o )
ghcjs app/Client.hs -outputdir dist/ghcjs -o /var/folders/x6/bd5b_zh50cg2fp5jzzv30zn80000gn/T/run-ghcjs.51318 -i -iclient -ishared -iclient -ishared -XCPP -XTemplateHaskell -hide-all-packages -package aeson -package attoparsec -package base -package containers -package data-default -package ghcjs-base -package ghcjs-dom -package ghcjs-jquery -package ghcjs-react -package lens -package mtl -package stm -package text

server/Handler/Home.hs:17:5:
    Exception when trying to run compile-time code:
      The GHCJS process failed with exit code 127.
    Code: ghcjsFileDev
            development
            ((++)
               ["-iclient", "-ishared", "-XCPP", ....]
               concatMap
                 (\ pkg -> ["-package", pkg]) ["aeson", "attoparsec", "base", ....])
            ["client", "shared"]
            "app/Client.hs"
    In the splice:
      $(ghcjsFileDev
          development
          (["-iclient", "-ishared", "-XCPP", ....]
           ++
             concatMap
               (\ pkg -> ["-package", pkg]) ["aeson", "attoparsec", "base", ....])
          ["client", "shared"]
          "app/Client.hs")
Completed all 180 actions.

@nrolland
Copy link

@jwhitley could you build it finally ? I switched to the 3.XX listed her https://hub.docker.com/r/fpco/stack-ghcjs-build/tags/ to no avail (some permission in .profile popping up when stack build-ing ). retrying my luck with 2.16 (10Go... !)

@nrolland
Copy link

$ stack build                                                                                                                                                      not sandboxed
tar: ./.profile: Cannot open: Permission denied
tar: ./.bashrc: Cannot open: Permission denied
tar: ./.bash_logout: Cannot open: Permission denied
tar: Exiting with failure status due to previous errors

with 2.16 as well. that's annoying. no idea where this come from..

Edit : same as here apparently
commercialhaskell/stack#488

@nrolland
Copy link

cabal build as of now does not succeed either : I give up. that's my haskell experience when not using Nix or Stack. can't wait for the dev tooling to improve

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