faylang / fay

A proper subset of Haskell that compiles to JavaScript
https://github.com/faylang/fay/wiki
BSD 3-Clause "New" or "Revised" License
1.29k stars 86 forks source link

Build failure: "The program 'cpphs' is required but it could not be found." #432

Closed jhftrifork closed 9 years ago

jhftrifork commented 9 years ago

I'm currently comparing Fay/Haste/GHCJS for ease of installation. Thought I should report this small build failure. It looks like the type-eq package has an undeclared dependency on the cpphs package.

> cabal install fay fay-base
Resolving dependencies...
Downloading data-lens-light-0.1.2.1...
Configuring ghc-paths-0.1.0.9...
Downloading mtl-compat-0.2.1.3...
Downloading polyparse-1.11...
Configuring data-lens-light-0.1.2.1...
Configuring mtl-compat-0.2.1.3...
Downloading safe-0.3.8...
Configuring safe-0.3.8...
Downloading sourcemap-0.1.3.0...
Downloading spoon-0.3.1...
Downloading traverse-with-class-0.2.0.3...
Downloading type-eq-0.5...
Building data-lens-light-0.1.2.1...
Building mtl-compat-0.2.1.3...
Building safe-0.3.8...
Installed mtl-compat-0.2.1.3
Configuring polyparse-1.11...
Building ghc-paths-0.1.0.9...
Building polyparse-1.11...
Configuring sourcemap-0.1.3.0...
Installed ghc-paths-0.1.0.9
Building sourcemap-0.1.3.0...
Configuring spoon-0.3.1...
Installed safe-0.3.8
Configuring traverse-with-class-0.2.0.3...
Installed data-lens-light-0.1.2.1
Building spoon-0.3.1...
Building traverse-with-class-0.2.0.3...
Configuring type-eq-0.5...
Installed spoon-0.3.1
Failed to install type-eq-0.5
Build log ( /Users/jhf/.cabal/logs/type-eq-0.5.log ):
Configuring type-eq-0.5...
setup-Simple-Cabal-1.22.2.0-x86_64-osx-ghc-7.8.3: The program 'cpphs' is
required but it could not be found.
Installed sourcemap-0.1.3.0
Installed traverse-with-class-0.2.0.3
Installed polyparse-1.11
Downloading cpphs-1.19...
Configuring cpphs-1.19...
Building cpphs-1.19...
Installed cpphs-1.19
Downloading haskell-src-exts-1.16.0.1...
Configuring haskell-src-exts-1.16.0.1...
Building haskell-src-exts-1.16.0.1...
Installed haskell-src-exts-1.16.0.1
Updating documentation index
/Users/jhf/Library/Haskell/share/doc/x86_64-osx-ghc-7.8.3/index.html
cabal: Error: some packages failed to install:
fay-0.23.1.4 depends on type-eq-0.5 which failed to install.
fay-base-0.20.0.0 depends on type-eq-0.5 which failed to install.
type-eq-0.5 failed during the configure step. The exception was:
ExitFailure 1
> cabal install fay fay-base
Resolving dependencies...
Configuring type-eq-0.5...
Building type-eq-0.5...
Installed type-eq-0.5
Downloading fay-0.23.1.4...
Configuring fay-0.23.1.4...
Building fay-0.23.1.4...
Installed fay-0.23.1.4
Downloading fay-base-0.20.0.0...
Configuring fay-base-0.20.0.0...
Building fay-base-0.20.0.0...
Installed fay-base-0.20.0.0
Updating documentation index
/Users/jhf/Library/Haskell/share/doc/x86_64-osx-ghc-7.8.3/index.html
>

My machine:

jhf@baal ~> cabal --version
cabal-install version 1.22.2.0
using version 1.22.2.0 of the Cabal library
jhf@baal ~> ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.3
jhf@baal ~> system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: OS X 10.10.2 (14C1514)
      Kernel Version: Darwin 14.1.0
      ...
bergmark commented 9 years ago

type-eq uses cpphs as a build-tool, not a library dependency. Unfortunately cabal does not install these automatically. If you install cpphs separately and put it in your PATH it should work.

jhftrifork commented 9 years ago

Ah, OK, thanks. Maybe the installation instructions should be cabal install cpphs fay fay-base?

bergmark commented 9 years ago

Make sense to include it!

Running it in the same command isn't guaranteed to work since type-eq can still be tried before cpphs. One solution is for type-eq to put cpphs as a build-dependcy.

For now I added a separate cabal install cpphs to the install instructions,

Thanks!