valderman / haste-compiler

A GHC-based Haskell to JavaScript compiler
http://haste-lang.org
BSD 3-Clause "New" or "Revised" License
1.44k stars 111 forks source link

Problems building from stack #395

Closed rlpowell closed 7 years ago

rlpowell commented 7 years ago

The shellmate entry for stack.yaml seems wrong; here's what's working for me so far:

resolver: lts-5.5
extra-deps:
- HTTP-4000.2.23
- base-orphans-0.5.3
- ghc-simple-0.3
- shellmate-0.3.4
- tar-0.5.0.1
- text-1.2.2.0
- shellmate-extras-0.3.4
rlpowell commented 7 years ago

More to it than that. The stack.yaml that I settled on is:

resolver: lts-5.5
extra-deps:
- HTTP-4000.2.23
- base-orphans-0.5.3
- ghc-simple-0.3
- shellmate-0.3.4
- tar-0.5.0.1
- text-1.2.2.0
- shellmate-extras-0.3.4
- http-conduit-2.1.11
- http-client-0.4.31.2
- http-client-tls-0.2.4.1

and the stack install step works, but then:

[rlpowell@747797bd39ec haste-compiler]$ stack install
No packages found in snapshot which provide a "ghc" executable, which is a build-tool dependency of "HTTP"
Missing build-tools may be caused by dependencies of the build-tool being overridden by extra-deps.
This should be fixed soon - see this issue https://github.com/commercialhaskell/stack/issues/595

Copying from /tmp/haste-compiler/.stack-work/install/x86_64-linux/lts-5.5/7.10.3/bin/haste-boot to /home/rlpowell/.local/bin/haste-boot
Copying from /tmp/haste-compiler/.stack-work/install/x86_64-linux/lts-5.5/7.10.3/bin/haste-cat to /home/rlpowell/.local/bin/haste-cat
Copying from /tmp/haste-compiler/.stack-work/install/x86_64-linux/lts-5.5/7.10.3/bin/haste-pkg to /home/rlpowell/.local/bin/haste-pkg
Copying from /tmp/haste-compiler/.stack-work/install/x86_64-linux/lts-5.5/7.10.3/bin/hastec to /home/rlpowell/.local/bin/hastec

Copied executables to /home/rlpowell/.local/bin:
- haste-boot
- haste-cat
- haste-pkg
- hastec
[rlpowell@747797bd39ec haste-compiler]$  haste-boot --force --local
Downloading haste-cabal from GitHub
Downloading Google Closure compiler...
Reading package info from "libraries/rts.pkg" ... done.
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
Warning: Topdown solver is deprecated
Resolving dependencies...
Configuring ghc-prim-0.4.0.0...
Building ghc-prim-0.4.0.0...
Installed ghc-prim-0.4.0.0
Reading package info from "ghc-prim-0.4.0.0.conf" ... done.
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
Warning: Topdown solver is deprecated
Resolving dependencies...
Configuring integer-gmp-0.5.0.0...
Building integer-gmp-0.5.0.0...
Installed integer-gmp-0.5.0.0
cleaning...
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
Warning: Topdown solver is deprecated
Resolving dependencies...
Configuring base-4.8.0.0...
Building base-4.8.0.0...
Failed to install base-4.8.0.0
Build log ( /home/rlpowell/.cabal/logs/base-4.8.0.0.log ):
Configuring base-4.8.0.0...
Building base-4.8.0.0...
Preprocessing library base-4.8.0.0...
No template specified, and template-hsc.h not located.

Usage: hsc2hs [OPTIONS] INPUT.hsc [...]

  -o FILE          --output=FILE          name of main output file
  -t FILE          --template=FILE        template file
  -c PROG          --cc=PROG              C compiler to use
  -l PROG          --ld=PROG              linker to use
  -C FLAG          --cflag=FLAG           flag to pass to the C compiler
  -I DIR                                  passed to the C compiler
  -L FLAG          --lflag=FLAG           flag to pass to the linker
  -i FILE          --include=FILE         as if placed in the source
  -D NAME[=VALUE]  --define=NAME[=VALUE]  as if placed in the source
                   --no-compile           stop after writing *_hsc_make.c
  -x               --cross-compile        activate cross-compilation mode
                   --cross-safe           restrict .hsc directives to those supported by --cross-compile
  -k               --keep-files           do not remove temporary files
  -v               --verbose              dump commands to stderr
  -?               --help                 display this help and exit
  -V               --version              output version information and exit
ExitFailure 1ExitFailure 1haste-cabal.bin: Error: some packages failed to install:
ExitFailure 1ExitFailure 1haste-cabal.bin: Error: some packages failed to install:
base-4.8.0.0 failed during the building phase. The exception was:
ExitFailure 1
cleaning...
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
Resolving dependencies...
haste-cabal.bin: Could not resolve dependencies:
trying: array-0.5.1.0 (user goal)
next goal: base (dependency of array-0.5.1.0)
fail (unknown package: base)
Dependency tree exhaustively searched.
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
Resolving dependencies...
haste-cabal.bin: Could not resolve dependencies:
trying: haste-prim-0.6.0.0 (user goal)
next goal: base (dependency of haste-prim-0.6.0.0)
fail (unknown package: base)
Dependency tree exhaustively searched.
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
Resolving dependencies...
haste-cabal.bin: Could not resolve dependencies:
trying: time-1.5.0.1 (user goal)
next goal: base (dependency of time-1.5.0.1)
fail (unknown package: base)
Dependency tree exhaustively searched.
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
haste-cabal.bin: There is no package named 'hashable'.
You may need to run 'cabal update' to get the latest list of available
packages.
haste-pkg: cannot find package monads-tf

It is not obvious to me where to go from here.

valderman commented 7 years ago

I'm not sure the second issue is related to stack, as I can't reproduce it after fixing the first. If it the issue is still there with 931eb07f7111761aaa19e01f41a5a41be459caf5, please open a new issue for it.