try-stack-reflex
try-stack-reflex copied to clipboard
./try-stack-reflex builds native binary rather than JS binary
% type ghc
ghc is /home/jchee/.stack/programs/x86_64-linux/ghc-7.10.2/bin/ghc
[jchee@gratia:~/packages/try-stack-reflex on master]
% ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.2
[jchee@gratia:~/packages/try-stack-reflex on master]
% ./try-stack-reflex
Getting project config file from STACK_YAML environment
GHC on PATH would be used
Getting project config file from STACK_YAML environment
While constructing the BuildPlan the following exceptions were encountered:
-- Failure when adding dependencies:
webkitgtk3: needed (>=0.14.0.0 && <0.15), but not present in build plan, latest is 0.14.1.1
needed for package: ghcjs-dom-0.2.2.0
-- Failure when adding dependencies:
ghcjs-dom: needed (>=0.2.1 && <0.3), but couldn't resolve its dependencies
webkitgtk3: needed (==0.14.*), but not present in build plan, latest is 0.14.1.1
webkitgtk3-javascriptcore: needed (==0.13.*), but not present in build plan, latest is 0.13.1.1
needed for package: reflex-dom-0.2
-- Failure when adding dependencies:
ghcjs-dom: needed (==0.2.*), but couldn't resolve its dependencies
reflex-dom: needed (-any), but couldn't resolve its dependencies
needed for package: reflex-todomvc-0.1
-- While attempting to add dependency,
Could not find package webkitgtk3 in known packages
-- While attempting to add dependency,
Could not find package webkitgtk3-javascriptcore in known packages
Recommended action: try adding the following to your extra-deps in /home/jchee/packages/try-stack-reflex/stack-ghcjs-improved-base.yaml
- webkitgtk3-0.14.1.1
- webkitgtk3-javascriptcore-0.13.1.1
You may also want to try the 'stack solver' command
Add the recommended packages and retry:
% git stash pop
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: stack-ghcjs-improved-base.yaml
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (25419f6473d05b2fd2741f7a6ed8d39fe0b3b790)
[jchee@gratia:~/packages/try-stack-reflex on master]
% git diff
diff --git a/stack-ghcjs-improved-base.yaml b/stack-ghcjs-improved-base.yaml
index fa2c51e..5783ce8 100644
--- a/stack-ghcjs-improved-base.yaml
+++ b/stack-ghcjs-improved-base.yaml
@@ -27,3 +27,5 @@ extra-deps:
- ref-tf-0.4
- these-0.6.1.0
- ghcjs-dom-0.2.2.0 # improved-base compatible with (2015-10-01 ghcjs)
+ - webkitgtk3-0.14.1.1
+ - webkitgtk3-javascriptcore-0.13.1.1
[jchee@gratia:~/packages/try-stack-reflex on master]
% ./try-stack-reflex
Getting project config file from STACK_YAML environment
GHC on PATH would be used
Getting project config file from STACK_YAML environment
ref-tf-0.4: configure
these-0.6.1.0: configure
ref-tf-0.4: build
webkitgtk3-0.14.1.1: configure
these-0.6.1.0: build
ref-tf-0.4: install
webkitgtk3-0.14.1.1: build
these-0.6.1.0: install
reflex-0.3: configure
reflex-0.3: build
reflex-0.3: install
webkitgtk3-0.14.1.1: install
webkitgtk3-javascriptcore-0.13.1.1: configure
ghcjs-dom-0.2.2.0: configure
webkitgtk3-javascriptcore-0.13.1.1: build
ghcjs-dom-0.2.2.0: build
webkitgtk3-javascriptcore-0.13.1.1: install
ghcjs-dom-0.2.2.0: install
reflex-dom-0.2: configure
reflex-dom-0.2: build
reflex-dom-0.2: install
reflex-todomvc-0.1: configure
Configuring reflex-todomvc-0.1...
reflex-todomvc-0.1: build
Building reflex-todomvc-0.1...
Preprocessing library reflex-todomvc-0.1...
[1 of 1] Compiling Reflex.TodoMVC ( src/Reflex/TodoMVC.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Reflex/TodoMVC.o )
In-place registering reflex-todomvc-0.1...
Preprocessing executable 'reflex-todomvc' for reflex-todomvc-0.1...
[1 of 1] Compiling Main ( src-bin/main.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/reflex-todomvc/reflex-todomvc-tmp/Main.o )
Linking .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/reflex-todomvc/reflex-todomvc ...
reflex-todomvc-0.1: install
Installing library in
/home/jchee/packages/try-stack-reflex/.stack-work/install/x86_64-linux/lts-3.10/7.10.2/lib/x86_64-linux-ghc-7.10.2/reflex-todomvc-0.1-3eNFqovyQ3w33ppa7pcxpV
Installing executable(s) in
/home/jchee/packages/try-stack-reflex/.stack-work/install/x86_64-linux/lts-3.10/7.10.2/bin
Registering reflex-todomvc-0.1...
Completed all 8 actions.
Couldn't get a file descriptor referring to the console
[jchee@gratia:~/packages/try-stack-reflex on master]1 ‽‽‽
% file /home/jchee/packages/try-stack-reflex/.stack-work/install/x86_64-linux/lts-3.10/7.10.2/bin/reflex-todomvc
/home/jchee/packages/try-stack-reflex/.stack-work/install/x86_64-linux/lts-3.10/7.10.2/bin/reflex-todomvc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=6ef1cdd88bcb26224f2ebbceacde071d0ed9a3b0, stripped
[jchee@gratia:~/packages/try-stack-reflex on master]
% ls -al /home/jchee/packages/try-stack-reflex/.stack-work/install/x86_64-linux/lts-3.10/7.10.2/bin
total 9124
drwxr-xr-x 2 jchee jchee 4096 Dec 15 16:01 .
drwxrwxr-x 8 jchee jchee 4096 Dec 15 16:01 ..
-rwxr-xr-x 1 jchee jchee 9332128 Dec 15 16:01 reflex-todomvc
looks like the compiler is getting overridden Can you give this a try:
export STACK_YAML=stack-ghcjs-improved-base.yaml
stack --no-system-ghc setup
stack --no-system-ghc build
echo $(stack path --no-system-ghc --local-install-root)/bin/reflex-todomvc.jsexe
# Getting project config file from STACK_YAML environment
# /Users/luigy/code/haskell/try-stack-reflex/.stack-work/install/x86_64-osx/lts-3.18/ghcjs-0.2.0.20151007_ghc-7.10.2/bin/reflex-todomvc.jsexe
# this will print the directory where the generated index.html should reside
if this does not work can you paste the output of cat stack.yaml
@luigy Thanks for advice. A full trace of each commands follow:
% export STACK_YAML=stack-ghcjs-improved-base.yaml
stack --no-system-ghc setup
stack --no-system-ghc build
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 "aeson" has a different version, 0.9.0.1, than the resolver's wanted version, 0.8.0.2
Ignoring that the GHCJS boot package "attoparsec" has a different version, 0.13.0.1, than the resolver's wanted version, 0.12.1.6
Ignoring that the GHCJS boot package "scientific" has a different version, 0.3.3.8, than the resolver's wanted version, 0.3.4.2
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.3.3
Ignoring that the GHCJS boot package "async" has a different version, 2.0.1.6, than the resolver's wanted version, 2.0.2
Ignoring that the GHCJS boot package "vector" has a different version, 0.11.0.0, than the resolver's wanted version, 0.10.12.3
Ignoring that the GHCJS boot package "text" has a different version, 1.2.1.1, than the resolver's wanted version, 1.2.1.3
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 "primitive" has a different version, 0.6, than the resolver's wanted version, 0.6.1.0
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
contravariant-1.3.3: configure
contravariant-1.3.3: build
exception-transformers-0.4.0.2: configure
contravariant-1.3.3: copy/register
exception-transformers-0.4.0.2: build
distributive-0.4.4: configure
exception-transformers-0.4.0.2: copy/register
distributive-0.4.4: build
exceptions-0.8.0.2: configure
exceptions-0.8.0.2: build
happy-1.19.5: configure
exceptions-0.8.0.2: copy/register
distributive-0.4.4: copy/register
happy-1.19.5: build
comonad-4.2.7.2: configure
comonad-4.2.7.2: build
comonad-4.2.7.2: copy/register
Progress: 6/18
-- While building package happy-1.19.5 using:
/tmp/stack10339/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/jchee/packages/try-stack-reflex/.stack-work/logs/happy-1.19.5.log
[1 of 1] Compiling Main ( /tmp/stack10339/happy-1.19.5/Setup.lhs, /tmp/stack10339/happy-1.19.5/.stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/setup/Main.js_o )
/tmp/stack10339/happy-1.19.5/Setup.lhs:20:1: Warning: Tab character
/tmp/stack10339/happy-1.19.5/Setup.lhs:21:1: Warning: Tab character
/tmp/stack10339/happy-1.19.5/Setup.lhs:22:1: Warning: Tab character
/tmp/stack10339/happy-1.19.5/Setup.lhs:68:1: Warning: Tab character
/tmp/stack10339/happy-1.19.5/Setup.lhs:74:1: Warning: Tab character
/tmp/stack10339/happy-1.19.5/Setup.lhs:81:19: Warning:
Tab character
/tmp/stack10339/happy-1.19.5/Setup.lhs:82:23: Warning:
Tab character
/tmp/stack10339/happy-1.19.5/Setup.lhs:83:26: Warning:
Tab character
/tmp/stack10339/happy-1.19.5/Setup.lhs:84:26: Warning:
Tab character
/tmp/stack10339/happy-1.19.5/Setup.lhs:85:30: Warning:
Tab character
/tmp/stack10339/happy-1.19.5/Setup.lhs:86:33: Warning:
Tab character
/tmp/stack10339/happy-1.19.5/Setup.lhs:87:32: Warning:
Tab character
/tmp/stack10339/happy-1.19.5/Setup.lhs:88:36: Warning:
Tab character
/tmp/stack10339/happy-1.19.5/Setup.lhs:89:39: Warning:
Tab character
/tmp/stack10339/happy-1.19.5/Setup.lhs:94:14: Warning:
Tab character
/tmp/stack10339/happy-1.19.5/Setup.lhs:99:13: Warning:
Tab character
/tmp/stack10339/happy-1.19.5/Setup.lhs:100:17: Warning:
Tab character
/tmp/stack10339/happy-1.19.5/Setup.lhs:101:23: Warning:
Tab character
Linking /tmp/stack10339/happy-1.19.5/.stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/setup/setup.jsexe (Main)
Configuring happy-1.19.5...
Linking /tmp/stack10339/happy-1.19.5/.stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/setup/setup.jsexe (Main)
Building happy-1.19.5...
Preprocessing executable 'happy' for happy-1.19.5...
[ 1 of 18] Compiling NameSet ( src/NameSet.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/NameSet.js_o )
[ 2 of 18] Compiling GenUtils ( src/GenUtils.lhs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/GenUtils.js_o )
[ 3 of 18] Compiling Target ( src/Target.lhs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/Target.js_o )
[ 4 of 18] Compiling AbsSyn ( src/AbsSyn.lhs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/AbsSyn.js_o )
[ 5 of 18] Compiling ParamRules ( src/ParamRules.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/ParamRules.js_o )
/tmp/stack10339/happy-1.19.5/src/ParamRules.hs:5:1: Warning:
Module ‘Control.Monad.Error’ is deprecated:
Use Control.Monad.Except instead
/tmp/stack10339/happy-1.19.5/src/ParamRules.hs:6:1: Warning:
Module ‘Control.Monad.Instances’ is deprecated:
This module now contains no instances and will be removed in the future
/tmp/stack10339/happy-1.19.5/src/ParamRules.hs:31:17: Warning:
In the use of type constructor or class ‘ErrorT’
(imported from Control.Monad.Error, but defined in transformers-0.4.3.0:Control.Monad.Trans.Error):
Deprecated: "Use Control.Monad.Trans.Except instead"
/tmp/stack10339/happy-1.19.5/src/ParamRules.hs:71:10: Warning:
In the use of type constructor or class ‘ErrorT’
(imported from Control.Monad.Error, but defined in transformers-0.4.3.0:Control.Monad.Trans.Error):
Deprecated: "Use Control.Monad.Trans.Except instead"
/tmp/stack10339/happy-1.19.5/src/ParamRules.hs:72:27: Warning:
In the use of ‘runErrorT’
(imported from Control.Monad.Error, but defined in transformers-0.4.3.0:Control.Monad.Trans.Error):
Deprecated: "Use Control.Monad.Trans.Except instead"
[ 6 of 18] Compiling ParseMonad ( src/ParseMonad.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/ParseMonad.js_o )
[ 7 of 18] Compiling AttrGrammar ( src/AttrGrammar.lhs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/AttrGrammar.js_o )
[ 8 of 18] Compiling AttrGrammarParser ( .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/AttrGrammarParser.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/AttrGrammarParser.js_o )
[ 9 of 18] Compiling Grammar ( src/Grammar.lhs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/Grammar.js_o )
[10 of 18] Compiling First ( src/First.lhs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/First.js_o )
[11 of 18] Compiling LALR ( src/LALR.lhs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/LALR.js_o )
[12 of 18] Compiling Lexer ( src/Lexer.lhs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/Lexer.js_o )
[13 of 18] Compiling Parser ( .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/Parser.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/Parser.js_o )
[14 of 18] Compiling Paths_happy ( .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/autogen/Paths_happy.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/Paths_happy.js_o )
[15 of 18] Compiling ProduceCode ( src/ProduceCode.lhs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/ProduceCode.js_o )
[16 of 18] Compiling ProduceGLRCode ( src/ProduceGLRCode.lhs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/ProduceGLRCode.js_o )
[17 of 18] Compiling Info ( src/Info.lhs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/Info.js_o )
[18 of 18] Compiling Main ( src/Main.lhs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy-tmp/Main.js_o )
Linking .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/happy/happy.jsexe (AbsSyn,AttrGrammar,AttrGrammarParser,First,GenUtils,Grammar,Info,LALR,Lexer,Main,NameSet,ParamRules,ParseMonad,Parser,Paths_happy,ProduceCode,ProduceGLRCode,Target)
setup: The program 'ghc' is required but it could not be found
% echo $(stack path --no-system-ghc --local-install-root)/bin/reflex-todomvc.jsexe
Getting project config file from STACK_YAML environment
/home/jchee/packages/try-stack-reflex/.stack-work/install/x86_64-linux/lts-3.10/ghcjs-0.2.0.20151001_ghc-7.10.2/bin/reflex-todomvc.jsexe
I see try one more time the same steps without the --no-system-ghc flag and it should be good to go 🙌