ghcjs / ghcjs-examples

89 stars 15 forks source link

Build ghcjs-hello with stack #13

Open k-bx opened 8 years ago

k-bx commented 8 years ago

ghcjs-examples looks a bit broken to me lately. What I did was shaping it up so that you can do:

stack setup

to set up working ghcjs binary, and do:

stack build

to build it locally. Right now only ghcjs-hello builds, also few things were fixed by rather a hack than a proper fix, will need to think on this later.

Please review!

k-bx commented 8 years ago

Ok, I see there is actually a Travis job which probably builds things as they are. Need to take a look at it.

k-bx commented 8 years ago

Ah, it fails on "darcs get --lazy http://patch-tag.com/r/hamish/gtk2hs" (not my fault!)

k-bx commented 8 years ago

Added mloc-js to stack build. Unfortunately, it fails upon linking with:

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 "transformers" has a different version, 0.4.3.0, than the resolver's wanted version, 0.4.2.0
mloc-js-0.0.1: build
mloc-js-0.0.1: copy/register

--  While building package mloc-js-0.0.1 using:
      /Users/kb/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghcjs-0.2.0.20151029_ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0_ghcjs copy
    Process exited with code: ExitFailure 1
    Logs have been written to: /Users/kb/workspace/ghcjs-examples/.stack-work/logs/mloc-js-0.0.1.log

    Preprocessing library mloc-js-0.0.1...
    In-place registering mloc-js-0.0.1...
    Preprocessing executable 'mloc-js' for mloc-js-0.0.1...
    Linking .stack-work/dist/x86_64-osx/Cabal-1.22.4.0_ghcjs/build/mloc-js/mloc-js.jsexe (Demo.DOM,Demo.JavaScriptFFI,Demo.LazyLoading,Demo.Life,Demo.Threading,Main,WebKitUtils)

    /Users/kb/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghcjs-0.2.0.20151029_ghc-7.10.2:7909
          throw ("setErrno not yet implemented: " + e);
                                                  ^
    setErrno not yet implemented: Error: Path must be a string without null bytes.
k-bx commented 8 years ago

Commenting out mloc-js