Closed aljce closed 8 years ago
Do I need a ghc on my path?
Unfortunately, yes.
how do I place the stack ghc on my path.
Here's how I do it: https://github.com/3noch/chess-finder-servant-demo/blob/8d72bd394e3b0effe980a3698e6b8dc923dc80e7/front/Makefile#L13-L17
Now that I have ghc and happy on my PATH, I am getting this error: haskell-src-exts-1.17.1: configure haskell-src-exts-1.17.1: build Progress: 1/5 -- While building package haskell-src-exts-1.17.1 using: /home/kyle/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.22.4.0-ghcjs-0.2.0.20151029_ghc-7.10.2 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs build --ghc-options " -ddump-hi -ddump-to-file" Process exited with code: ExitFailure 1 Logs have been written to: /home/kyle/Programming/haskell/try-stack-reflex/.stack-work/logs/haskell-src-exts-1.17.1.log
Configuring haskell-src-exts-1.17.1...
Building haskell-src-exts-1.17.1...
Preprocessing library haskell-src-exts-1.17.1...
unused rules: 3
happy: /home/kyle/.stack/snapshots/x86_64-linux/nightly-2015-12-08/7.10.2/share/x86_64-linux-ghc-7.10.2/happy-1.19.5/HappyTemplate-arrays-coerce: openFile: does not exist (No such file or directory)
You might be using an old version of GHCJS that, combined with a bug in node, caused errors like that. I wonder if this repo needs to update the GHCJS version.
how can i udpdate ghcjs?
Check out my demo project here for an example. Changing the dates on the compiler will get you version from that day's snapshot. https://github.com/3noch/chess-finder-servant-demo/blob/8d72bd394e3b0effe980a3698e6b8dc923dc80e7/front/stack.yaml
Should have mentioned, that project doesn't build currently. But the GHCJS setup is perfectly legit.
Alright well stack setup
works on the other project so this didnt solve the issue, fails with this again:
contravariant-1.4: copy/register Progress: 8/21 -- While building package haskell-src-exts-1.17.1 using: /home/kyle/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.22.4.0-ghcjs-0.2.0_ghc-7.10.2 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs build --ghc-options " -ddump-hi -ddump-to-file" Process exited with code: ExitFailure 1 Logs have been written to: /home/kyle/Programming/haskell/try-stack-reflex/.stack-work/logs/haskell-src-exts-1.17.1.log
Configuring haskell-src-exts-1.17.1...
Building haskell-src-exts-1.17.1...
Preprocessing library haskell-src-exts-1.17.1...
unused rules: 3
happy: /home/kyle/.stack/snapshots/x86_64-linux/nightly-2015-12-08/7.10.2/share/x86_64-linux-ghc-7.10.2/happy-1.19.5/HappyTemplate-arrays-coerce: openFile: does not exist (No such file or directory)
Any ideas? Should I open a bug with ghcjs?
Can you post your stack.yaml
?
kyle@Kyles-Laptop:~/Programming/haskell/try-stack-reflex$ cat stack.yaml resolver: lts-5.1 compiler: ghcjs-0.2.0.20160202_ghc-7.10.2
packages:
extra-deps:
require-stack-version: ">= 0.1.8" setup-info: ghcjs: source: ghcjs-0.2.0.20160202_ghc-7.10.2: url: "http://ghcjs.luite.com/master-20160202.tar.gz"
Try changing all of the occurrences of 20160202
to something more recent, like 20160422
. Then run stack setup
. Also you should be using a recent version of node
.
Latest attempt:
kyle@Kyles-Laptop:~/Programming/web/try-stack-reflex$ stack setup --stack-setup-yaml=stack.yaml stack will use a locally installed GHCJS For more information on paths, see 'stack path' and 'stack exec env' To use this GHCJS and packages outside of a project, consider using: stack ghc, stack ghci, stack runghc, or stack exec kyle@Kyles-Laptop:~/Programming/web/try-stack-reflex$ stack build /home/kyle/Programming/web/try-stack-reflex/reflex-todomvc: canonicalizePath: does not exist (No such file or directory)
This is very odd because when I changed the stack.yaml to look like this:
resolver: lts-5.1 compiler: ghcjs-0.2.0.20160422_ghc-7.10.2
packages:
extra-deps:
require-stack-version: ">= 0.1.8" setup-info: ghcjs: source: ghcjs-0.2.0.20160422_ghc-7.10.2: url: "http://ghcjs.luite.com/master-20160422.tar.gz"
It didnt download a new ghcjs.
For completeness:
kyle@Kyles-Laptop:~/Programming/web/try-stack-reflex$ node --version v4.4.3
Hmm...that's odd. You definitely want it to download a new GHCJS. Try deleting ~/.ghcjs
and maybe ~/.stack
and running it again. Also if you're able, you could upgrade node (that's decently old).
I deleted my .ghcjs but it didnt download the new version. Then I ran stack setup
and then stack build
this was the error on stack build
kyle@Kyles-Laptop:~/Programming/web/try-stack-reflex$ stack build /home/kyle/Programming/web/try-stack-reflex/reflex-todomvc: canonicalizePath: does not exist (No such file or directory)
Why isnt stack installing a new version? This is crazy.
When all else fails, delete ~/.stack
. :(
I am no longer on arch so this issue can no longer be tested.
Getting project config file from STACK_YAML environment stack will use a locally installed GHCJS For more information on paths, see 'stack path' and 'stack exec env' To use this GHCJS and packages outside of a project, consider using: stack ghc, stack ghci, stack runghc, or stack exec Getting project config file from STACK_YAML environment Ignoring that the GHCJS boot package "scientific" has a different version, 0.3.3.8, than the resolver's wanted version, 0.3.4.4 Ignoring that the GHCJS boot package "case-insensitive" has a different version, 1.2.0.4, than the resolver's wanted version, 1.2.0.5 Ignoring that the GHCJS boot package "hashable" has a different version, 1.2.3.2, than the resolver's wanted version, 1.2.4.0 Ignoring that the GHCJS boot package "async" has a different version, 2.0.1.6, than the resolver's wanted version, 2.1.0 Ignoring that the GHCJS boot package "text" has a different version, 1.2.1.1, than the resolver's wanted version, 1.2.2.0 Ignoring that the GHCJS boot package "syb" has a different version, 0.5.1, than the resolver's wanted version, 0.6 Ignoring that the GHCJS boot package "stm" has a different version, 2.4.4, than the resolver's wanted version, 2.4.4.1 Ignoring that the GHCJS boot package "parallel" has a different version, 3.2.0.6, than the resolver's wanted version, 3.2.1.0 Ignoring that the GHCJS boot package "dlist" has a different version, 0.7.1.1, than the resolver's wanted version, 0.7.1.2 Ignoring that the GHCJS boot package "pretty" has a different version, 1.1.3.2, than the resolver's wanted version, 1.1.2.0 Ignoring that the GHCJS boot package "containers" has a different version, 0.5.6.3, than the resolver's wanted version, 0.5.6.2 Ignoring that the GHCJS boot package "transformers" has a different version, 0.4.3.0, than the resolver's wanted version, 0.4.2.0 happy-1.19.5: configure happy-1.19.5: build Progress: 1/6 -- While building package happy-1.19.5 using: /tmp/stack4329/happy-1.19.5/.stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/setup/setup --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs build --ghc-options " -ddump-hi -ddump-to-file" Process exited with code: ExitFailure 1 Logs have been written to: /home/kyle/Programming/haskell/try-stack-reflex/.stack-work/logs/happy-1.19.5.log
Do I need a ghc on my path? If so how to I place the stack ghc on my path.