Failed to install ghcjs-dom-0.0.7 - src/GHCJS/DOM.hs:3:14: Unsupported extension: JavaScriptFFI - haskell

I have problems installing Leksah, the depends on ghcjs-dom:
Here's what I precisely get when trying to install this precise package:
$ cabal install ghcjs-dom -v
Reading available packages...
Choosing modular solver.
Resolving dependencies...
Ready to install ghcjs-dom-0.0.7
Waiting for install task to finish...
Extracting
/Users/bastiengallay/Library/Haskell/repo-cache/hackage.haskell.org/ghcjs-dom/0.0.7/ghcjs-dom-0.0.7.tar.gz
to /var/folders/1s/mnr_nf9x1c3fr5v_bcrg712m0000gn/T/ghcjs-dom-0.0.7-24896...
Updating ghcjs-dom.cabal with the latest revision from the index.
Configuring ghcjs-dom-0.0.7...
Flags chosen: gtk3=True, jsc=False, webkit=False, jsffi=False, ghcjs=True
Dependency base ==4.6.0.1: using base-4.6.0.1
Dependency mtl ==2.2.0.1: using mtl-2.2.0.1
Using Cabal-1.20.0.0 compiled by ghc-7.6
Using compiler: ghc-7.6.3
Using install prefix:
/Users/bastiengallay/Library/Haskell/ghc-7.6.3/lib/ghcjs-dom-0.0.7
Binaries installed in:
/Users/bastiengallay/Library/Haskell/ghc-7.6.3/lib/ghcjs-dom-0.0.7/bin
Libraries installed in:
/Users/bastiengallay/Library/Haskell/ghc-7.6.3/lib/ghcjs-dom-0.0.7/lib
Private binaries installed in:
/Users/bastiengallay/Library/Haskell/ghc-7.6.3/lib/ghcjs-dom-0.0.7/libexec
Data files installed in:
/Users/bastiengallay/Library/Haskell/ghc-7.6.3/lib/ghcjs-dom-0.0.7/share
Documentation installed in:
/Users/bastiengallay/Library/Haskell/ghc-7.6.3/lib/ghcjs-dom-0.0.7/doc
Configuration files installed in:
/Users/bastiengallay/Library/Haskell/ghc-7.6.3/lib/ghcjs-dom-0.0.7/etc
Using alex version 3.1.3 found on system at:
/Users/bastiengallay/Library/Haskell/bin/alex
Using ar found on system at: /usr/bin/ar
No c2hs found
No cpphs found
No ffihugs found
Using gcc version 4.8.3 found on system at: /usr/local/bin/gcc
Using ghc version 7.6.3 found on system at: /usr/local/bin/ghc
Using ghc-pkg version 7.6.3 found on system at: /usr/local/bin/ghc-pkg
No greencard found
Using haddock version 2.13.2 found on system at: /usr/local/bin/haddock
Using happy version 1.19.3 found on system at:
/Users/bastiengallay/Library/Haskell/bin/happy
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.6 found on system at: /usr/local/bin/hpc
Using hsc2hs version 0.67 found on system at: /usr/local/bin/hsc2hs
No hscolour found
No hugs found
No jhc found
Using ld found on system at: /usr/bin/ld
No lhc found
No lhc-pkg found
No nhc98 found
Using pkg-config version 0.28 found on system at: /usr/local/bin/pkg-config
Using strip found on system at: /usr/bin/strip
Using tar found on system at: /usr/bin/tar
No uhc found
Component build order: library
creating dist/build
creating dist/build/autogen
Building ghcjs-dom-0.0.7...
Preprocessing library ghcjs-dom-0.0.7...
Building library...
creating dist/build
/usr/local/bin/ghc --make -fbuilding-cabal-package -O -outputdir dist/build -odir dist/build -hidir dist/build -stubdir dist/build -i -idist/build -isrc -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -package-name ghcjs-dom-0.0.7 -hide-all-packages -package-db dist/package.conf.inplace -package-id base-4.6.0.1-6c351d70a24d3e96f315cba68f3acf57 -package-id mtl-2.2.0.1-ef91e0abcf7a4fb581ecb7fe83cdcba1 -XHaskell2010 GHCJS.DOM GHCJS.DOM.Types GHCJS.DOM.Attr GHCJS.DOM.BarProp GHCJS.DOM.Blob GHCJS.DOM.CharacterData GHCJS.DOM.Console GHCJS.DOM.Css GHCJS.DOM.CSSRule GHCJS.DOM.CSSRuleList GHCJS.DOM.CSSStyleDeclaration GHCJS.DOM.CSSStyleSheet GHCJS.DOM.CSSValue GHCJS.DOM.Document GHCJS.DOM.DocumentType GHCJS.DOM.DOMApplicationCache GHCJS.DOM.DOMImplementation GHCJS.DOM.DOMMimeType GHCJS.DOM.DOMMimeTypeArray GHCJS.DOM.DOMNamedFlowCollection GHCJS.DOM.DOMPlugin GHCJS.DOM.DOMPluginArray GHCJS.DOM.DOMSelection GHCJS.DOM.DOMSettableTokenList GHCJS.DOM.DOMTokenList GHCJS.DOM.DOMWindow GHCJS.DOM.DOMWindowCSS GHCJS.DOM.Element GHCJS.DOM.Event GHCJS.DOM.EventM GHCJS.DOM.Events GHCJS.DOM.EventTargetClosures GHCJS.DOM.File GHCJS.DOM.FileList GHCJS.DOM.History GHCJS.DOM.HTMLAnchorElement GHCJS.DOM.HTMLAppletElement GHCJS.DOM.HTMLAreaElement GHCJS.DOM.HTMLBaseElement GHCJS.DOM.HTMLBaseFontElement GHCJS.DOM.HTMLBodyElement GHCJS.DOM.HTMLBRElement GHCJS.DOM.HTMLButtonElement GHCJS.DOM.HTMLCollection GHCJS.DOM.HTMLDirectoryElement GHCJS.DOM.HTMLDivElement GHCJS.DOM.HTMLDListElement GHCJS.DOM.HTMLDocument GHCJS.DOM.HTMLElement GHCJS.DOM.HTMLFieldSetElement GHCJS.DOM.HTMLFontElement GHCJS.DOM.HTMLFormElement GHCJS.DOM.HTMLFrameElement GHCJS.DOM.HTMLFrameSetElement GHCJS.DOM.HTMLHeadElement GHCJS.DOM.HTMLHeadingElement GHCJS.DOM.HTMLHRElement GHCJS.DOM.HTMLHtmlElement GHCJS.DOM.HTMLIFrameElement GHCJS.DOM.HTMLImageElement GHCJS.DOM.HTMLInputElement GHCJS.DOM.HTMLLabelElement GHCJS.DOM.HTMLLegendElement GHCJS.DOM.HTMLLIElement GHCJS.DOM.HTMLLinkElement GHCJS.DOM.HTMLMapElement GHCJS.DOM.HTMLMenuElement GHCJS.DOM.HTMLMetaElement GHCJS.DOM.HTMLModElement GHCJS.DOM.HTMLObjectElement GHCJS.DOM.HTMLOListElement GHCJS.DOM.HTMLOptGroupElement GHCJS.DOM.HTMLOptionElement GHCJS.DOM.HTMLOptionsCollection GHCJS.DOM.HTMLParagraphElement GHCJS.DOM.HTMLParamElement GHCJS.DOM.HTMLPreElement GHCJS.DOM.HTMLQuoteElement GHCJS.DOM.HTMLScriptElement GHCJS.DOM.HTMLSelectElement GHCJS.DOM.HTMLStyleElement GHCJS.DOM.HTMLTableCaptionElement GHCJS.DOM.HTMLTableCellElement GHCJS.DOM.HTMLTableColElement GHCJS.DOM.HTMLTableElement GHCJS.DOM.HTMLTableRowElement GHCJS.DOM.HTMLTableSectionElement GHCJS.DOM.HTMLTextAreaElement GHCJS.DOM.HTMLTitleElement GHCJS.DOM.HTMLUListElement GHCJS.DOM.KeyboardEvent GHCJS.DOM.Location GHCJS.DOM.MediaList GHCJS.DOM.MediaQueryList GHCJS.DOM.MouseEvent GHCJS.DOM.NamedNodeMap GHCJS.DOM.Navigator GHCJS.DOM.Node GHCJS.DOM.NodeFilter GHCJS.DOM.NodeIterator GHCJS.DOM.NodeList GHCJS.DOM.ProcessingInstruction GHCJS.DOM.Range GHCJS.DOM.Ranges GHCJS.DOM.Screen GHCJS.DOM.StyleMedia GHCJS.DOM.StyleSheet GHCJS.DOM.StyleSheetList GHCJS.DOM.Stylesheets GHCJS.DOM.Storage GHCJS.DOM.Text GHCJS.DOM.Traversal GHCJS.DOM.TreeWalker GHCJS.DOM.UIEvent GHCJS.DOM.ValidityState GHCJS.DOM.WebKitNamedFlow GHCJS.DOM.WebKitPoint GHCJS.DOM.XPathExpression GHCJS.DOM.XPathNSResolver GHCJS.DOM.XPathResult GHCJS.DOM.DOMSecurityPolicy GHCJS.DOM.DOMStringList GHCJS.DOM.Geolocation GHCJS.DOM.HTMLCanvasElement GHCJS.DOM.HTMLDetailsElement GHCJS.DOM.HTMLEmbedElement GHCJS.DOM.HTMLKeygenElement GHCJS.DOM.HTMLMarqueeElement GHCJS.DOM.HTMLMediaElement GHCJS.DOM.HTMLVideoElement GHCJS.DOM.MediaError GHCJS.DOM.StorageInfo GHCJS.DOM.TimeRanges
src/GHCJS/DOM.hs:3:14: Unsupported extension: JavaScriptFFI
Failed to install ghcjs-dom-0.0.7
World file is already up to date.
cabal: Error: some packages failed to install:
ghcjs-dom-0.0.7 failed during the building phase. The exception was:
ExitFailure 1
My config:
$ cabal --version
cabal-install version 1.20.0.2
using version 1.20.0.0 of the Cabal library
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3
Some patches seem to exist for GHC 7.8, but don't know how to use them.

ghcjs-dom is not designed to be installed with ghc, it is designed to be installed with ghc-js. To install packages for ghc-js, you need to run cabal install --ghcjs packageName

I noticed in the error messages that "c2hs" can't be found. This is often caused by not having ~/.cabal/bin in your path. Try typing "c2hs" at the prompt, this will tell you if it is set up.

Related

ihp/nix how to add wreq to dependencies without compile failing?

In an IHP project, I tried adding wreq to default.nix as described in https://ihp.digitallyinduced.com/Guide/recipes.html#making-a-http-request but I get
src/Codec/Crypto/RSA/Pure.hs:115:25: error:
• Could not deduce (MonadFail m) arising from a use of ‘fail’
when compiling. Similarly with the alternative req.
I've just used stackage before, I'm completely new to nix – is there some way to get a set of package versions that work together like with stackage? Or is there something obvious I'm missing?
Full output after adding wreq to default.nix and running make -B .envrc in nix-shell:
[nix-shell:~/src/foo]$ make -B .envrc
rm -f .envrc
echo "PATH_add $(nix-shell -j auto --cores 0 --pure --run 'printf %q $PATH')" > .envrc
direnv allow
these derivations will be built:
/nix/store/iamd2pmg0xhh67b9wx23pfq815v1rpg5-RSA-2.3.1.drv
/nix/store/b4s6rcqnxnd9nsx5123n1xb0p1d7lz7r-authenticate-oauth-1.6.0.1.drv
/nix/store/jhkbm2z39sfi94zfy93bw4ivay21k49p-simple-reflect-0.3.3.drv
/nix/store/n13kcx1m809a2prdqbvm6v4vsdkfayym-lens-4.19.drv
/nix/store/whv58hpwx2yqchv14mgjjr4j6zs5lmmr-lens-aeson-1.0.2.drv
/nix/store/wwn14fv4gmwh4p2w1516fwhc88bz7wdr-time-locale-compat-0.1.1.5.drv
/nix/store/mmpdshwkx498v4hd39d5qb82y4zjhvsx-wreq-0.5.3.2.drv
/nix/store/i1fqnspxpy7ikvbzbnr484dlggn98dpk-ghc-8.8.3-with-packages.drv
building '/nix/store/iamd2pmg0xhh67b9wx23pfq815v1rpg5-RSA-2.3.1.drv'...
building '/nix/store/wwn14fv4gmwh4p2w1516fwhc88bz7wdr-time-locale-compat-0.1.1.5.drv'...
building '/nix/store/jhkbm2z39sfi94zfy93bw4ivay21k49p-simple-reflect-0.3.3.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3.
setupCompilerEnvironmentPhase
Build with /nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3.
setupCompilerEnvironmentPhase
Build with /nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3.
unpacking sources
unpacking source archive /nix/store/vbjq94k0fh92d2g1i5xl0bv0bj4kawyp-time-locale-compat-0.1.1.5.tar.gz
source root is time-locale-compat-0.1.1.5
setting SOURCE_DATE_EPOCH to timestamp 1535285808 of file time-locale-compat-0.1.1.5/time-locale-compat.cabal
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/build/setup-package.conf.d -j4 -threaded
unpacking sources
unpacking source archive /nix/store/7zj46nqh5hynrrc2vkniyymfryf8f8h3-simple-reflect-0.3.3.tar.gz
source root is simple-reflect-0.3.3
setting SOURCE_DATE_EPOCH to timestamp 1521050226 of file simple-reflect-0.3.3/simple-reflect.cabal
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/build/setup-package.conf.d -j4 -threaded
[1 of 1] Compiling Main ( Setup.hs, /build/Main.o )
[1 of 1] Compiling Main ( Setup.hs, /build/Main.o )
unpacking sources
unpacking source archive /nix/store/bv3lckj9fqlzw84xafipfnnv13lpigs4-RSA-2.3.1.tar.gz
source root is RSA-2.3.1
setting SOURCE_DATE_EPOCH to timestamp 1546300677 of file RSA-2.3.1/Test.hs
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/build/setup-package.conf.d -j4 -threaded
[1 of 1] Compiling Main ( Setup.hs, /build/Main.o )
Linking Setup ...
Linking Setup ...
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/5l41880hdczl2yhpxr4579vljmpr1lmj-time-locale-compat-0.1.1.5 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --docdir=/nix/store/wmnnz02rq2pxdxzadmm57m1wdq253mz6-time-locale-compat-0.1.1.5-doc/share/doc/time-locale-compat-0.1.1.5 --with-gcc=gcc --package-db=/build/package.conf.d --ghc-option=-j4 --disable-split-objs --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --ghc-option=-split-sections --extra-lib-dirs=/nix/store/kpw4kmc74djprg3bjc5rxblij46jdmnf-ncurses-6.1-20190112/lib --extra-lib-dirs=/nix/store/x6sc334nvkl7pr3yqiqs3dzhfsbsgqcd-libffi-3.3/lib --extra-lib-dirs=/nix/store/gldhjyzsj475ymgax9ycv8m1wf6rkc02-gmp-6.2.0/lib
configuring
configureFlags: --verbose --prefix=/nix/store/myldnlikwicwz054kycwx6gzpyp29sw6-simple-reflect-0.3.3 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --docdir=/nix/store/n4rqdqimm3rq1m2w3fhnmdxy9vj1srx7-simple-reflect-0.3.3-doc/share/doc/simple-reflect-0.3.3 --with-gcc=gcc --package-db=/build/package.conf.d --ghc-option=-j4 --disable-split-objs --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --ghc-option=-split-sections --extra-lib-dirs=/nix/store/kpw4kmc74djprg3bjc5rxblij46jdmnf-ncurses-6.1-20190112/lib --extra-lib-dirs=/nix/store/x6sc334nvkl7pr3yqiqs3dzhfsbsgqcd-libffi-3.3/lib --extra-lib-dirs=/nix/store/gldhjyzsj475ymgax9ycv8m1wf6rkc02-gmp-6.2.0/lib
configuring
configureFlags: --verbose --prefix=/nix/store/qa57n6w7772mq96gbhz1jf95aqz4ay2l-RSA-2.3.1 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --docdir=/nix/store/2mxz458lx9xfbracvz4icjjyi6s304kk-RSA-2.3.1-doc/share/doc/RSA-2.3.1 --with-gcc=gcc --package-db=/build/package.conf.d --ghc-option=-j4 --disable-split-objs --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --ghc-option=-split-sections --extra-lib-dirs=/nix/store/kpw4kmc74djprg3bjc5rxblij46jdmnf-ncurses-6.1-20190112/lib --extra-lib-dirs=/nix/store/x6sc334nvkl7pr3yqiqs3dzhfsbsgqcd-libffi-3.3/lib --extra-lib-dirs=/nix/store/gldhjyzsj475ymgax9ycv8m1wf6rkc02-gmp-6.2.0/lib
Using Parsec parser
Configuring time-locale-compat-0.1.1.5...
Flags chosen: old-locale=False
Dependency base <5: using base-4.13.0.0
Dependency time >=1.5: using time-1.9.3
Using Parsec parser
Configuring simple-reflect-0.3.3...
Dependency base >=2 && <5: using base-4.13.0.0
Source component graph: component lib
Configured component graph:
component time-locale-compat-0.1.1.5-3KeDjePLdJz63GzLtGEnjG
include base-4.13.0.0
include time-1.9.3
Linked component graph:
unit time-locale-compat-0.1.1.5-3KeDjePLdJz63GzLtGEnjG
include base-4.13.0.0
include time-1.9.3
Data.Time.Locale.Compat=time-locale-compat-0.1.1.5-3KeDjePLdJz63GzLtGEnjG:Data.Time.Locale.Compat
Ready component graph:
definite time-locale-compat-0.1.1.5-3KeDjePLdJz63GzLtGEnjG
depends base-4.13.0.0
depends time-1.9.3
Using Cabal-3.0.1.0 compiled by ghc-8.8
Using compiler: ghc-8.8.3
Using install prefix:
/nix/store/5l41880hdczl2yhpxr4579vljmpr1lmj-time-locale-compat-0.1.1.5
Executables installed in:
/nix/store/5l41880hdczl2yhpxr4579vljmpr1lmj-time-locale-compat-0.1.1.5/bin
Libraries installed in:
/nix/store/5l41880hdczl2yhpxr4579vljmpr1lmj-time-locale-compat-0.1.1.5/lib/ghc-8.8.3/x86_64-linux-ghc-8.8.3/time-locale-compat-0.1.1.5-3KeDjePLdJz63GzLtGEnjG
Dynamic Libraries installed in:
/nix/store/5l41880hdczl2yhpxr4579vljmpr1lmj-time-locale-compat-0.1.1.5/lib/ghc-8.8.3/x86_64-linux-ghc-8.8.3
Private executables installed in:
/nix/store/5l41880hdczl2yhpxr4579vljmpr1lmj-time-locale-compat-0.1.1.5/libexec/x86_64-linux-ghc-8.8.3/time-locale-compat-0.1.1.5
Data files installed in:
/nix/store/5l41880hdczl2yhpxr4579vljmpr1lmj-time-locale-compat-0.1.1.5/share/x86_64-linux-ghc-8.8.3/time-locale-compat-0.1.1.5
Documentation installed in:
/nix/store/wmnnz02rq2pxdxzadmm57m1wdq253mz6-time-locale-compat-0.1.1.5-doc/share/doc/time-locale-compat-0.1.1.5
Configuration files installed in:
/nix/store/5l41880hdczl2yhpxr4579vljmpr1lmj-time-locale-compat-0.1.1.5/etc
No alex found
Using ar found on system at:
/nix/store/1zf4cnaaidjajwb4gx4mnkqc5dypkcdy-binutils-2.31.1/bin/ar
No c2hs found
No cpphs found
No doctest found
Using gcc version 9.2.0 given by user at:
/nix/store/xh3bh8nir5d45zk45dz9xxfs2j95cby4-gcc-wrapper-9.2.0/bin/gcc
Using ghc version 8.8.3 found on system at:
/nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3/bin/ghc
Using ghc-pkg version 8.8.3 found on system at:
/nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3/bin/ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.23.0 found on system at:
/nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3/bin/haddock
No happy found
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.67 found on system at:
/nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3/bin/hpc
Using hsc2hs version 0.68.5 found on system at:
/nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3/bin/hsc2hs
Using hscolour version 1.24 found on system at:
/nix/store/4kr0317ac62lw56yaygq2kfiqv96za9f-hscolour-1.24.4/bin/HsColour
No jhc found
Using ld found on system at:
/nix/store/axkkr27z9cjzxac1c9s6ngda73kbz063-binutils-wrapper-2.31.1/bin/ld.gold
No pkg-config found
Using runghc version 8.8.3 found on system at:
/nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3/bin/runghc
Using strip version 2.31 found on system at:
/nix/store/1zf4cnaaidjajwb4gx4mnkqc5dypkcdy-binutils-2.31.1/bin/strip
Using tar found on system at:
/nix/store/c98k0shcp2yp69g81mqhbqw3xbxvnk0r-gnutar-1.32/bin/tar
No uhc found
building
Preprocessing library for time-locale-compat-0.1.1.5..
Building library for time-locale-compat-0.1.1.5..
Source component graph: component lib
Configured component graph:
component simple-reflect-0.3.3-7n1WmXGrTqW325T1Vh7H5M
include base-4.13.0.0
Linked component graph:
unit simple-reflect-0.3.3-7n1WmXGrTqW325T1Vh7H5M
include base-4.13.0.0
Debug.SimpleReflect=simple-reflect-0.3.3-7n1WmXGrTqW325T1Vh7H5M:Debug.SimpleReflect,Debug.SimpleReflect.Expr=simple-reflect-0.3.3-7n1WmXGrTqW325T1Vh7H5M:Debug.SimpleReflect.Expr,Debug.SimpleReflect.Vars=simple-reflect-0.3.3-7n1WmXGrTqW325T1Vh7H5M:Debug.SimpleReflect.Vars
Ready component graph:
definite simple-reflect-0.3.3-7n1WmXGrTqW325T1Vh7H5M
depends base-4.13.0.0
Using Cabal-3.0.1.0 compiled by ghc-8.8
Using compiler: ghc-8.8.3
Using install prefix:
/nix/store/myldnlikwicwz054kycwx6gzpyp29sw6-simple-reflect-0.3.3
Executables installed in:
/nix/store/myldnlikwicwz054kycwx6gzpyp29sw6-simple-reflect-0.3.3/bin
Libraries installed in:
/nix/store/myldnlikwicwz054kycwx6gzpyp29sw6-simple-reflect-0.3.3/lib/ghc-8.8.3/x86_64-linux-ghc-8.8.3/simple-reflect-0.3.3-7n1WmXGrTqW325T1Vh7H5M
Dynamic Libraries installed in:
/nix/store/myldnlikwicwz054kycwx6gzpyp29sw6-simple-reflect-0.3.3/lib/ghc-8.8.3/x86_64-linux-ghc-8.8.3
Private executables installed in:
/nix/store/myldnlikwicwz054kycwx6gzpyp29sw6-simple-reflect-0.3.3/libexec/x86_64-linux-ghc-8.8.3/simple-reflect-0.3.3
Data files installed in:
/nix/store/myldnlikwicwz054kycwx6gzpyp29sw6-simple-reflect-0.3.3/share/x86_64-linux-ghc-8.8.3/simple-reflect-0.3.3
Documentation installed in:
/nix/store/n4rqdqimm3rq1m2w3fhnmdxy9vj1srx7-simple-reflect-0.3.3-doc/share/doc/simple-reflect-0.3.3
Configuration files installed in:
/nix/store/myldnlikwicwz054kycwx6gzpyp29sw6-simple-reflect-0.3.3/etc
No alex found
Using ar found on system at:
/nix/store/1zf4cnaaidjajwb4gx4mnkqc5dypkcdy-binutils-2.31.1/bin/ar
No c2hs found
No cpphs found
No doctest found
Using gcc version 9.2.0 given by user at:
/nix/store/xh3bh8nir5d45zk45dz9xxfs2j95cby4-gcc-wrapper-9.2.0/bin/gcc
Using ghc version 8.8.3 found on system at:
/nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3/bin/ghc
Using ghc-pkg version 8.8.3 found on system at:
/nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3/bin/ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.23.0 found on system at:
/nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3/bin/haddock
No happy found
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.67 found on system at:
/nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3/bin/hpc
Using hsc2hs version 0.68.5 found on system at:
/nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3/bin/hsc2hs
Using hscolour version 1.24 found on system at:
/nix/store/4kr0317ac62lw56yaygq2kfiqv96za9f-hscolour-1.24.4/bin/HsColour
No jhc found
Using ld found on system at:
/nix/store/axkkr27z9cjzxac1c9s6ngda73kbz063-binutils-wrapper-2.31.1/bin/ld.gold
No pkg-config found
Using runghc version 8.8.3 found on system at:
/nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3/bin/runghc
Using strip version 2.31 found on system at:
/nix/store/1zf4cnaaidjajwb4gx4mnkqc5dypkcdy-binutils-2.31.1/bin/strip
Using tar found on system at:
/nix/store/c98k0shcp2yp69g81mqhbqw3xbxvnk0r-gnutar-1.32/bin/tar
No uhc found
[1 of 1] Compiling Data.Time.Locale.Compat ( src/Data/Time/Locale/Compat.hs, dist/build/Data/Time/Locale/Compat.o )
building
Preprocessing library for simple-reflect-0.3.3..
Building library for simple-reflect-0.3.3..
Using Parsec parser
Configuring RSA-2.3.1...
Dependency SHA >=1.6.4.1 && <2.0: using SHA-1.6.4.4
Dependency base >=4.6 && <7.0: using base-4.13.0.0
Dependency binary >0.7 && <1.0: using binary-0.8.7.0
Dependency bytestring >0.8 && <0.12: using bytestring-0.10.10.0
Dependency crypto-api >=0.10 && <0.14: using crypto-api-0.13.3
Dependency crypto-pubkey-types >=0.2 && <0.6: using crypto-pubkey-types-0.4.3
Dependency DRBG >=0.5.2 && <0.7: using DRBG-0.5.5
Dependency QuickCheck >=2.5 && <3: using QuickCheck-2.13.2
Dependency SHA >=1.6.4.1 && <2.0: using SHA-1.6.4.4
Dependency base >=4.6 && <7.0: using base-4.13.0.0
Dependency binary >0.7 && <1.0: using binary-0.8.7.0
Dependency bytestring >0.8 && <0.12: using bytestring-0.10.10.0
Dependency crypto-api >=0.10 && <0.14: using crypto-api-0.13.3
Dependency crypto-pubkey-types >=0.4 && <0.6: using crypto-pubkey-types-0.4.3
Dependency tagged >=0.2 && <0.9: using tagged-0.8.6
Dependency test-framework >=0.8.0.3 && <0.10: using test-framework-0.8.2.0
Dependency test-framework-quickcheck2 >=0.3.0.2 && <0.5: using
test-framework-quickcheck2-0.3.0.5
[1 of 3] Compiling Debug.SimpleReflect.Expr ( Debug/SimpleReflect/Expr.hs, dist/build/Debug/SimpleReflect/Expr.o )
[1 of 1] Compiling Data.Time.Locale.Compat ( src/Data/Time/Locale/Compat.hs, dist/build/Data/Time/Locale/Compat.p_o )
Source component graph:
component test:test-rsa
component lib
Configured component graph:
component RSA-2.3.1-JJYZ7HtptBX49F9kO59MAB-test-rsa
include DRBG-0.5.5-4enzLx907KB4ly1cvZ83Rj
include QuickCheck-2.13.2-9teeivRumd01cV6oeVrmWt
include SHA-1.6.4.4-HjVIktJeEh9Jm66vy0zsGC
include base-4.13.0.0
include binary-0.8.7.0
include bytestring-0.10.10.0
include crypto-api-0.13.3-5deppbfxVTTBecXOiXtKKK
include crypto-pubkey-types-0.4.3-HEZvEEbmspDBQkghRIQNcJ
include tagged-0.8.6-FYc8l1vwILF5OSKkSTSNII
include test-framework-0.8.2.0-5G7BFKLBjZC6YeudnlZJNp
include test-framework-quickcheck2-0.3.0.5-3rpDyIsNKye2cByAhaUbY6
component RSA-2.3.1-ET1TzkXBKSBHYmOWRgR5vO
include SHA-1.6.4.4-HjVIktJeEh9Jm66vy0zsGC
include base-4.13.0.0
include binary-0.8.7.0
include bytestring-0.10.10.0
include crypto-api-0.13.3-5deppbfxVTTBecXOiXtKKK
include crypto-pubkey-types-0.4.3-HEZvEEbmspDBQkghRIQNcJ
Linked component graph:
unit RSA-2.3.1-JJYZ7HtptBX49F9kO59MAB-test-rsa
include DRBG-0.5.5-4enzLx907KB4ly1cvZ83Rj
include QuickCheck-2.13.2-9teeivRumd01cV6oeVrmWt
include SHA-1.6.4.4-HjVIktJeEh9Jm66vy0zsGC
include base-4.13.0.0
include binary-0.8.7.0
include bytestring-0.10.10.0
include crypto-api-0.13.3-5deppbfxVTTBecXOiXtKKK
include crypto-pubkey-types-0.4.3-HEZvEEbmspDBQkghRIQNcJ
include tagged-0.8.6-FYc8l1vwILF5OSKkSTSNII
include test-framework-0.8.2.0-5G7BFKLBjZC6YeudnlZJNp
include test-framework-quickcheck2-0.3.0.5-3rpDyIsNKye2cByAhaUbY6
unit RSA-2.3.1-ET1TzkXBKSBHYmOWRgR5vO
include SHA-1.6.4.4-HjVIktJeEh9Jm66vy0zsGC
include base-4.13.0.0
include binary-0.8.7.0
include bytestring-0.10.10.0
include crypto-api-0.13.3-5deppbfxVTTBecXOiXtKKK
include crypto-pubkey-types-0.4.3-HEZvEEbmspDBQkghRIQNcJ
Codec.Crypto.RSA=RSA-2.3.1-ET1TzkXBKSBHYmOWRgR5vO:Codec.Crypto.RSA,Codec.Crypto.RSA.Exceptions=RSA-2.3.1-ET1TzkXBKSBHYmOWRgR5vO:Codec.Crypto.RSA.Exceptions,Codec.Crypto.RSA.Pure=RSA-2.3.1-ET1TzkXBKSBHYmOWRgR5vO:Codec.Crypto.RSA.Pure
Ready component graph:
definite RSA-2.3.1-JJYZ7HtptBX49F9kO59MAB-test-rsa
depends DRBG-0.5.5-4enzLx907KB4ly1cvZ83Rj
depends QuickCheck-2.13.2-9teeivRumd01cV6oeVrmWt
depends SHA-1.6.4.4-HjVIktJeEh9Jm66vy0zsGC
depends base-4.13.0.0
depends binary-0.8.7.0
depends bytestring-0.10.10.0
depends crypto-api-0.13.3-5deppbfxVTTBecXOiXtKKK
depends crypto-pubkey-types-0.4.3-HEZvEEbmspDBQkghRIQNcJ
depends tagged-0.8.6-FYc8l1vwILF5OSKkSTSNII
depends test-framework-0.8.2.0-5G7BFKLBjZC6YeudnlZJNp
depends test-framework-quickcheck2-0.3.0.5-3rpDyIsNKye2cByAhaUbY6
definite RSA-2.3.1-ET1TzkXBKSBHYmOWRgR5vO
depends SHA-1.6.4.4-HjVIktJeEh9Jm66vy0zsGC
depends base-4.13.0.0
depends binary-0.8.7.0
depends bytestring-0.10.10.0
depends crypto-api-0.13.3-5deppbfxVTTBecXOiXtKKK
depends crypto-pubkey-types-0.4.3-HEZvEEbmspDBQkghRIQNcJ
Using Cabal-3.0.1.0 compiled by ghc-8.8
Using compiler: ghc-8.8.3
Using install prefix: /nix/store/qa57n6w7772mq96gbhz1jf95aqz4ay2l-RSA-2.3.1
Executables installed in:
/nix/store/qa57n6w7772mq96gbhz1jf95aqz4ay2l-RSA-2.3.1/bin
Libraries installed in:
/nix/store/qa57n6w7772mq96gbhz1jf95aqz4ay2l-RSA-2.3.1/lib/ghc-8.8.3/x86_64-linux-ghc-8.8.3/RSA-2.3.1-ET1TzkXBKSBHYmOWRgR5vO
Dynamic Libraries installed in:
/nix/store/qa57n6w7772mq96gbhz1jf95aqz4ay2l-RSA-2.3.1/lib/ghc-8.8.3/x86_64-linux-ghc-8.8.3
Private executables installed in:
/nix/store/qa57n6w7772mq96gbhz1jf95aqz4ay2l-RSA-2.3.1/libexec/x86_64-linux-ghc-8.8.3/RSA-2.3.1
Data files installed in:
/nix/store/qa57n6w7772mq96gbhz1jf95aqz4ay2l-RSA-2.3.1/share/x86_64-linux-ghc-8.8.3/RSA-2.3.1
Documentation installed in:
/nix/store/2mxz458lx9xfbracvz4icjjyi6s304kk-RSA-2.3.1-doc/share/doc/RSA-2.3.1
Configuration files installed in:
/nix/store/qa57n6w7772mq96gbhz1jf95aqz4ay2l-RSA-2.3.1/etc
No alex found
Using ar found on system at:
/nix/store/1zf4cnaaidjajwb4gx4mnkqc5dypkcdy-binutils-2.31.1/bin/ar
No c2hs found
No cpphs found
No doctest found
Using gcc version 9.2.0 given by user at:
/nix/store/xh3bh8nir5d45zk45dz9xxfs2j95cby4-gcc-wrapper-9.2.0/bin/gcc
Using ghc version 8.8.3 found on system at:
/nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3/bin/ghc
Using ghc-pkg version 8.8.3 found on system at:
/nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3/bin/ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.23.0 found on system at:
/nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3/bin/haddock
No happy found
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.67 found on system at:
/nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3/bin/hpc
Using hsc2hs version 0.68.5 found on system at:
/nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3/bin/hsc2hs
Using hscolour version 1.24 found on system at:
/nix/store/4kr0317ac62lw56yaygq2kfiqv96za9f-hscolour-1.24.4/bin/HsColour
No jhc found
Using ld found on system at:
/nix/store/axkkr27z9cjzxac1c9s6ngda73kbz063-binutils-wrapper-2.31.1/bin/ld.gold
No pkg-config found
Using runghc version 8.8.3 found on system at:
/nix/store/z9hplpp91s3s8k8gsj5wvhnsqpvijz0p-ghc-8.8.3/bin/runghc
Using strip version 2.31 found on system at:
/nix/store/1zf4cnaaidjajwb4gx4mnkqc5dypkcdy-binutils-2.31.1/bin/strip
Using tar found on system at:
/nix/store/c98k0shcp2yp69g81mqhbqw3xbxvnk0r-gnutar-1.32/bin/tar
No uhc found
building
Preprocessing test suite 'test-rsa' for RSA-2.3.1..
Building test suite 'test-rsa' for RSA-2.3.1..
[1 of 2] Compiling Codec.Crypto.RSA.Pure ( src/Codec/Crypto/RSA/Pure.hs, dist/build/test-rsa/test-rsa-tmp/Codec/Crypto/RSA/Pure.o )
running tests
src/Codec/Crypto/RSA/Pure.hs:115:25: error:
• Could not deduce (MonadFail m) arising from a use of ‘fail’
from the context: (Monad m, Show a)
bound by the type signature for:
failOnError :: forall (m :: * -> *) a b.
(Monad m, Show a) =>
Either a b -> m b
at src/Codec/Crypto/RSA/Pure.hs:114:1-53
Possible fix:
add (MonadFail m) to the context of
the type signature for:
failOnError :: forall (m :: * -> *) a b.
(Monad m, Show a) =>
Either a b -> m b
• In the expression: fail (show e)
In an equation for ‘failOnError’:
failOnError (Left e) = fail (show e)
|
115 | failOnError (Left e) = fail (show e)
| ^^^^^^^^^^^^^
Package has no test suites.
haddockPhase
builder for '/nix/store/iamd2pmg0xhh67b9wx23pfq815v1rpg5-RSA-2.3.1.drv' failed with exit code 1
cannot build derivation '/nix/store/i1fqnspxpy7ikvbzbnr484dlggn98dpk-ghc-8.8.3-with-packages.drv': 1 dependencies couldn't be built
This is a known issue. To fix the RSA package that causes the build failure, create a file Config/nix/haskell-packages/RSA.nix and paste in the following content:
{ mkDerivation, base, binary, bytestring, crypto-api
, crypto-pubkey-types, QuickCheck, SHA, stdenv, tagged
, test-framework, test-framework-quickcheck2
}:
mkDerivation {
pname = "RSA";
version = "2.4.1";
sha256 = "0hchsqrxpfw7mqrqwscfy8ig1w2di6w3nxpzi873w0gibv2diibj";
libraryHaskellDepends = [
base binary bytestring crypto-api crypto-pubkey-types SHA
];
testHaskellDepends = [
base binary bytestring crypto-api crypto-pubkey-types QuickCheck
SHA tagged test-framework test-framework-quickcheck2
];
description = "Implementation of RSA, using the padding schemes of PKCS#1 v2.1.";
license = stdenv.lib.licenses.bsd3;
}
This overrides the existing RSA package to use a newer version. After that make -B .envrc should work as expected.
In case you're curious how to update an existing package from the IHP nixpkgs version, take a look at https://ihp.digitallyinduced.com/Guide/package-management.html#using-a-different-version-of-a-haskell-package :)

Installing Euterpea for computer music applications and Haskell

I followed the instructions here http://www.euterpea.com for installing Euterpea (a domain-specific language for computer music applications embedded in Haskell), and I received a message that certain packages and things failed to install (see the code below). How can I install the remaining packages?
Mo-MacBook-Pro:~ Mo$ cabal update
Downloading the latest package list from hackage.haskell.org
cabal install Euterpea
To revert to previous state run:
cabal update --index-state='2018-06-25T08:34:14Z'
Mo-MacBook-Pro:~ Mo$ cabal install Euterpea
clang: warning: argument unused during compilation: '-nopie' [-Wunused-
command-line-argument]
Resolving dependencies...
Downloading heap-1.0.4...
Downloading PortMidi-0.1.6.1...
Configuring PortMidi-0.1.6.1...
Downloading lazysmallcheck-0.6...
Configuring heap-1.0.4...
Downloading semigroups-0.18.5...
Configuring lazysmallcheck-0.6...
Configuring semigroups-0.18.5...
Building heap-1.0.4...
Building PortMidi-0.1.6.1...
Building lazysmallcheck-0.6...
Building semigroups-0.18.5...
Installed semigroups-0.18.5
Downloading stm-2.5.0.0...
Configuring stm-2.5.0.0...
Installed lazysmallcheck-0.6
Downloading HCodecs-0.5.1...
Installed heap-1.0.4
Downloading Stream-0.4.7.2...
Configuring HCodecs-0.5.1...
Configuring Stream-0.4.7.2...
Building stm-2.5.0.0...
Building HCodecs-0.5.1...
Building Stream-0.4.7.2...
Failed to install HCodecs-0.5.1
Build log ( /Users/Mo/.cabal/logs/ghc-8.4.3/HCodecs-0.5.1-
BtnY8oBJJ5FGnsoQaqbvOm.log ):
cabal: Entering directory
'/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-
5294/HCodecs-0.5.1'
Configuring HCodecs-0.5.1...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-
command-line-argument]
Preprocessing library for HCodecs-0.5.1..
Building library for HCodecs-0.5.1..
<command line>: cannot satisfy -package-id random-1.1-
7T1TXpwb46H1j0av1OnVaD
(use -v for more information)
cabal: Leaving directory
'/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-
5294/HCodecs-0.5.1'
Failed to install Stream-0.4.7.2
Build log ( /Users/Mo/.cabal/logs/ghc-8.4.3/Stream-0.4.7.2-
ES6rey5IgWg9tsXDghlP7Y.log ):
cabal: Entering directory
'/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-
5295/Stream-0.4.7.2'
Warning: Stream.cabal:6:4: Tabs used as indentation at 6:4, 12:4, 13:4,
14:4,
15:4, 16:4, 17:4
Configuring Stream-0.4.7.2...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-
command-line-argument]
Preprocessing library for Stream-0.4.7.2..
Building library for Stream-0.4.7.2..
<command line>: cannot satisfy -package-id QuickCheck-2.11.3-
4Q6LQ7mN6Tj8otrLuHN0se
(use -v for more information)
cabal: Leaving directory
'/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-
5295/Stream-0.4.7.2'
Installed PortMidi-0.1.6.1
Installed stm-2.5.0.0
cabal: Error: some packages failed to install:
Euterpea-2.0.6-LLo28S848YneLemh6QUkK depends on Euterpea-2.0.6 which
failed to
install.
HCodecs-0.5.1-BtnY8oBJJ5FGnsoQaqbvOm failed during the building phase.
The
exception was:
ExitFailure 1
Stream-0.4.7.2-ES6rey5IgWg9tsXDghlP7Y failed during the building phase.
The
exception was:
ExitFailure 1
arrows-0.4.4.2-GLke2GgDEro6Tzj3MGmTOB depends on arrows-0.4.4.2 which
failed
to install.
It would be great if someone could help. Thanks.
I have included all the code, lest some particular relevant detail was omitted.
Edit
I have also tried to install Euterpea via stack. I get this message:
Mo-MacBook-Pro:~ Mo$ stack install Euterpea
Error: While constructing the build plan, the following exceptions were
encountered:
In the dependencies for Euterpea-2.0.6:
PortMidi must match ==0.1.6.1, but the stack configuration has no specified version (latest matching version is 0.1.6.1)
arrows must match >=0.4 && <0.5, but the stack configuration has no specified version (latest matching version is 0.4.4.2)
needed since Euterpea is a build target.
Some different approaches to resolving this:
* Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build configuration. This can be convenient when dealing with many complicated constraint
errors, but results may be unpredictable.
* Recommended action: try adding the following to your extra-deps in /Users/Mo/.stack/global-project/stack.yaml:
- PortMidi-0.1.6.1
- arrows-0.4.4.2
Plan construction failed.
--
Edit 2.
As suggested below, I tried cabal install random-1.1 --force-reinstalls which generated:
clang: warning: argument unused during compilation: '-nopie' [- Wunused-command-line-argument]
Resolving dependencies...
Warning: The following packages are likely to be broken by the reinstalls:
tf-random-0.5
QuickCheck-2.11.3
Continuing even though the plan contains dangerous reinstalls.
Configuring random-1.1...
Building random-1.1...
Installed random-1.1
Then
Mo-MacBook-Pro:~ Mo$ cabal install Euterpea
clang: warning: argument unused during compilation: '-nopie' [- Wunused-command-line-argument]
Resolving dependencies...
Configuring Stream-0.4.7.2...
Configuring HCodecs-0.5.1...
Building HCodecs-0.5.1...
Building Stream-0.4.7.2...
Failed to install HCodecs-0.5.1
Build log ( /Users/lukeburke/.cabal/logs/ghc-8.4.3/HCodecs-0.5.1- BtnY8oBJJ5FGnsoQaqbvOm.log ):
cabal: Entering directory '/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-20742/HCodecs- 0.5.1'
Configuring HCodecs-0.5.1...
clang: warning: argument unused during compilation: '-nopie' [- Wunused-command-line-argument]
Preprocessing library for HCodecs-0.5.1..
Building library for HCodecs-0.5.1..
<command line>: cannot satisfy -package-id random-1.1- 7T1TXpwb46H1j0av1OnVaD
(use -v for more information)
cabal: Leaving directory '/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-20742/HCodecs- 0.5.1'
Failed to install Stream-0.4.7.2
Build log ( /Users/Mo/.cabal/logs/ghc-8.4.3/Stream-0.4.7.2- ES6rey5IgWg9tsXDghlP7Y.log ):
cabal: Entering directory '/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-20743/Stream- 0.4.7.2'
Warning: Stream.cabal:6:4: Tabs used as indentation at 6:4, 12:4, 13:4, 14:4,
15:4, 16:4, 17:4
Configuring Stream-0.4.7.2...
clang: warning: argument unused during compilation: '-nopie' [- Wunused-command-line-argument]
Preprocessing library for Stream-0.4.7.2..
Building library for Stream-0.4.7.2..
<command line>: cannot satisfy -package-id QuickCheck-2.11.3- 4Q6LQ7mN6Tj8otrLuHN0se
(use -v for more information)
cabal: Leaving directory '/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-20743/Stream- 0.4.7.2'
cabal: Error: some packages failed to install:
Euterpea-2.0.6-LLo28S848YneLemh6QUkK depends on Euterpea-2.0.6 which failed to
install.
HCodecs-0.5.1-BtnY8oBJJ5FGnsoQaqbvOm failed during the building phase. The
exception was:
ExitFailure 1
Stream-0.4.7.2-ES6rey5IgWg9tsXDghlP7Y failed during the building phase. The
exception was:
ExitFailure 1
arrows-0.4.4.2-GLke2GgDEro6Tzj3MGmTOB depends on arrows-0.4.4.2 which failed
to install.
Edit 3
It has been suggested below that multiple packages are botched and that I should try re-installing all of them (in a single command, i.e. cabal install random tf-random QuickCheck Euterpea --force-reinstalls.
However, if I write cabal install random tf-random QuickCheck Euterpea --force-reinstalls I receive the following code:
clang: warning: argument unused during compilation: '-nopie' [- Wunused-command-line-argument]
Resolving dependencies...
Warning: The following packages are likely to be broken by the reinstalls:
QuickCheck-2.11.3
Continuing even though the plan contains dangerous reinstalls.
Downloading erf-2.0.0.0...
Configuring random-1.1...
Configuring erf-2.0.0.0...
Building random-1.1...
Building erf-2.0.0.0...
Installed erf-2.0.0.0
Installed random-1.1
Downloading tf-random-0.5...
Configuring tf-random-0.5...
Building tf-random-0.5...
Failed to install tf-random-0.5
Build log ( /Users/Mo/.cabal/logs/ghc-8.4.3/tf-random-0.5- ADZoyzEXgHe6hyR0Bycce0.log ):
cabal: Entering directory '/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-21584/tf- random-0.5'
Configuring tf-random-0.5...
clang: warning: argument unused during compilation: '-nopie' [- Wunused-command-line-argument]
Preprocessing library for tf-random-0.5..
Building library for tf-random-0.5..
<command line>: cannot satisfy -package-id primitive-0.6.4.0- 9k41Y6ToOAE8KXK6VMGV2O
(use -v for more information)
cabal: Leaving directory '/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-21584/tf- random-0.5'
cabal: Error: some packages failed to install:
Euterpea-2.0.6-87WYqltNL8w8teqXOsc4TL depends on Euterpea-2.0.6 which failed
to install.
HCodecs-0.5.1-DrGKEnNk6EBHti2goL6KP5 depends on HCodecs-0.5.1 which. failed to
install.
QuickCheck-2.12.6.1-KuXpgimNOXzF2SmGPEs5LR depends on QuickCheck- 2.12.6.1
which failed to install.
Stream-0.4.7.2-FedzVSwUnWMDxlzmPNWt7x depends on Stream-0.4.7.2 which failed
to install.
arrows-0.4.4.2-EGvZPpby4BcD99TcXDoCg4 depends on arrows-0.4.4.2 which. failed
to install.
tf-random-0.5-ADZoyzEXgHe6hyR0Bycce0 failed during the building phase. The
exception was:
ExitFailure 1
What can I do to install Euterpea?
Installing the Euterpea package
This answer uses LTS 12.26 as I've verified it works, but this should work for most LTS releases (see bottom of step 2 for details).
Make a new Stack project:
stack new euter-test
cd euter-test
Edit stack.yaml and set the LTS to 12.26 and extra-deps to specify the versions of packages that aren't present in the LTS but are present on Hackage:
resolver: lts-12.26
...
extra-deps:
- Euterpea-2.0.6
- PortMidi-0.1.6.1
- arrows-0.4.4.2
- Stream-0.4.7.2
- lazysmallcheck-0.6
The errors you were getting on the Stack install ("PortMidi must match ==0.1.6.1, but the stack configuration has no specified version") indicate that a package you're using requires a particular version of a library, but the package repository (LTS snapshot) doesn't contain that library, so you need to specify it explicitly. Stack then prints which library and version is missing, so you can just keep trying stack build and adding the libraries until the build succeeds.
We use LTS 12.26 here, but by adding the extra-deps packages as described above, you should be able to get it working on any LTS.
Edit package.yaml and add Euterpea to the list of dependencies:
dependencies:
...
- Euterpea
A simple test in app/Main.hs:
module Main where
import Euterpea
main :: IO ()
main = play $ c 4 qn
Run stack build:
lazysmallcheck-0.6: download
heap-1.0.4: download
heap-1.0.4: configure
HCodecs-0.5.1: download
PortMidi-0.1.6.1: download
heap-1.0.4: build
lazysmallcheck-0.6: configure
lazysmallcheck-0.6: build
HCodecs-0.5.1: configure
HCodecs-0.5.1: build
PortMidi-0.1.6.1: configure
heap-1.0.4: copy/register
lazysmallcheck-0.6: copy/register
PortMidi-0.1.6.1: build
Stream-0.4.7.2: download
Stream-0.4.7.2: configure
Stream-0.4.7.2: build
Stream-0.4.7.2: copy/register
PortMidi-0.1.6.1: copy/register
arrows-0.4.4.2: download
arrows-0.4.4.2: configure
arrows-0.4.4.2: build
arrows-0.4.4.2: copy/register
HCodecs-0.5.1: copy/register
Euterpea-2.0.6: download
Euterpea-2.0.6: configure
Euterpea-2.0.6: build
Euterpea-2.0.6: copy/register
Building all executables for `euter' once. After a successful build of all of them, only specified executables will be rebuilt.
euter-0.1.0.0: configure (lib + exe)
Configuring euter-0.1.0.0...
euter-0.1.0.0: build (lib + exe)
Preprocessing library for euter-0.1.0.0..
Building library for euter-0.1.0.0..
[1 of 2] Compiling Lib ( src/Lib.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/Lib.o )
[2 of 2] Compiling Paths_euter ( .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/autogen/Paths_euter.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/Paths_euter.o )
Preprocessing executable 'euter-exe' for euter-0.1.0.0..
Building executable 'euter-exe' for euter-0.1.0.0..
[1 of 2] Compiling Main ( app/Main.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/euter-exe/euter-exe-tmp/Main.o )
[2 of 2] Compiling Paths_euter ( .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/euter-exe/autogen/Paths_euter.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/euter-exe/euter-exe-tmp/Paths_euter.o )
Linking .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/euter-exe/euter-exe ...
euter-0.1.0.0: copy/register
Installing library in <...>
Installing executable euter-exe in <...>
Registering library for euter-0.1.0.0..
Running the executable produced by the project should emit a tone if you're running a MIDI synthesiser:
stack exec euter-test-exe
Troubleshooting
If you get an error like *** Exception: No MIDI outputs!, then you're not running a MIDI synthesiser (see below). Make sure you run it in the background (eg. in another terminal).
If you don't get an error but there's no audio output, try running devices in GHCI to see what outputs are available, and then use playDev x instead of play, where x is the OutputDeviceID of the synth input port. Eg:
> devices
Input devices:
InputDeviceID 1 Midi Through Port-0
Output devices:
OutputDeviceID 0 Midi Through Port-0
OutputDeviceID 2 Synth input port (25952:0)
> playDev 2 $ c 4 qn
If you run devices and don't see any synth input ports, but you have fluidsynth running in the background, then you might need to restart ghci and try again.
Running a MIDI synthesiser
Here's a quick step-by-step to get Fluidsynth running on Debian (with guesses at a Mac setup along the way).
Install fluidsynth:
On Debian this is sudo apt install fluidsynth, on mac it could be brew install fluidsynth - there's quite a few articles on how to do this, just google it if in doubt.
Run fluidsynth:
On Debian using ALSA this is
fluidsynth -s -a alsa -m alsa_seq /usr/share/sounds/sf2/FluidR3_GM.sf2
Instructing fluidsynth to run in server mode, use alsa as the audio driver and alsa_seq as the MIDI driver, and use the soundfont FluidR3_GM.sf2 (should be installed as part of the fluidsynth install).
On Mac, it seems like the correct commandline is:
fluidsynth -s -a coreaudio -m coremidi /usr/share/sounds/sf2/FluidR3_GM.sf2
If you can't find the FluidR3_GM.sf2 file then it's likely it's been installed in a different location. As a last resort, you can just download a soundfont file and use that rather than the one provided by FluidSynth.
After running this, you should be given a prompt and maybe a few warnings, and fluidsynth will be running. Make sure it's running before using Euterpea, and keep it running while using Euterpea.

cabal-install 1.20.0.0 fails to install on OS X

On OS X 10.9.2, I installed the GHC platform fresh. (There was a prior installation, but I believe I wiped it out by deleting /Library/Haskell and /Users/username/Library/Haskell.) The Platform came with Cabal 1.16. I wanted the latest Cabal with sandbox support, so I ran:
cabal update
cabal install cabal --reinstall
That went fine. But then I tried to upgrade cabal-install as well:
cabal install cabal-install -v
It failed with the following output:
Reading available packages...
Choosing modular solver.
Resolving dependencies...
Ready to install cabal-install-1.20.0.0
Waiting for install task to finish...
Extracting
/Users/username/Library/Haskell/repo-cache/hackage.haskell.org/cabal-install/1.20.0.0/cabal-install-1.20.0.0.tar.gz
to
/var/folders/jt/ywln8_hn75q1yfkhnpcs1bzh0000gn/T/cabal-install-1.20.0.0-51744...
Updating cabal-install.cabal with the latest revision from the index.
Configuring cabal-install-1.20.0.0...
Flags chosen: old-directory=False
Dependency Cabal ==1.20.0.0: using Cabal-1.20.0.0
Dependency HTTP ==4000.2.8: using HTTP-4000.2.8
Dependency array ==0.4.0.1: using array-0.4.0.1
Dependency base ==4.6.0.1: using base-4.6.0.1
Dependency bytestring ==0.10.0.2: using bytestring-0.10.0.2
Dependency containers ==0.5.0.0: using containers-0.5.0.0
Dependency directory ==1.2.0.1: using directory-1.2.0.1
Dependency filepath ==1.3.0.1: using filepath-1.3.0.1
Dependency mtl ==2.1.2: using mtl-2.1.2
Dependency network ==2.4.1.2: using network-2.4.1.2
Dependency pretty ==1.1.1.0: using pretty-1.1.1.0
Dependency process ==1.1.0.2: using process-1.1.0.2
Dependency random ==1.0.1.1: using random-1.0.1.1
Dependency stm ==2.4.2: using stm-2.4.2
Dependency time ==1.4.0.1: using time-1.4.0.1
Dependency unix ==2.6.0.1: using unix-2.6.0.1
Dependency zlib ==0.5.4.1: using zlib-0.5.4.1
/var/folders/jt/ywln8_hn75q1yfkhnpcs1bzh0000gn/T/51744.c:1:12:
warning: control reaches end of non-void function [-Wreturn-type]
int foo() {}
^
1 warning generated.
Using Cabal-1.16.0 compiled by ghc-7.6
Using compiler: ghc-7.6.3
Using install prefix:
/Users/username/Library/Haskell/ghc-7.6.3/lib/cabal-install-1.20.0.0
Binaries installed in:
/Users/username/Library/Haskell/ghc-7.6.3/lib/cabal-install-1.20.0.0/bin
Libraries installed in:
/Users/username/Library/Haskell/ghc-7.6.3/lib/cabal-install-1.20.0.0/lib
Private binaries installed in:
/Users/username/Library/Haskell/ghc-7.6.3/lib/cabal-install-1.20.0.0/libexec
Data files installed in:
/Users/username/Library/Haskell/ghc-7.6.3/lib/cabal-install-1.20.0.0/share
Documentation installed in:
/Users/username/Library/Haskell/ghc-7.6.3/lib/cabal-install-1.20.0.0/doc
Using alex version 3.0.5 found on system at: /usr/bin/alex
Using ar found on system at: /usr/bin/ar
No c2hs found
No cpphs found
No ffihugs found
Using gcc version 4.2.1 found on system at: /usr/bin/gcc
Using ghc version 7.6.3 found on system at: /usr/bin/ghc
Using ghc-pkg version 7.6.3 found on system at: /usr/bin/ghc-pkg
No greencard found
Using haddock version 2.13.2 found on system at: /usr/bin/haddock
Using happy version 1.18.10 found on system at: /usr/bin/happy
No hmake found
Using hpc version 0.6 found on system at: /usr/bin/hpc
Using hsc2hs version 0.67 found on system at: /usr/bin/hsc2hs
No hscolour found
No hugs found
No jhc found
Using ld found on system at: /usr/bin/ld
No lhc found
No lhc-pkg found
No nhc98 found
Using pkg-config version 0.28 found on system at: /usr/local/bin/pkg-config
Using ranlib found on system at: /usr/bin/ranlib
Using strip found on system at: /usr/bin/strip
Using tar found on system at: /usr/bin/tar
No uhc found
creating dist/build
creating dist/build/autogen
Building cabal-install-1.20.0.0...
Preprocessing executable 'cabal' for cabal-install-1.20.0.0...
Building executable cabal...
creating dist/build/cabal
creating dist/build/cabal/cabal-tmp
Building C Sources.
creating dist/build/cabal/cabal-tmp
/usr/bin/ghc -c -odir dist/build/cabal/cabal-tmp -Idist/build/cabal/cabal-tmp -optc-O2 -package-db dist/package.conf.inplace -package-id Cabal-1.20.0.0-ed0a7e0a5adc8ca1f9e6d405d3a3d56c -package-id HTTP-4000.2.8-cdf033f9d7051824f52cd5101df67509 -package-id array-0.4.0.1-3b78425c10ff2dad7acf7e8c8ae014c3 -package-id base-4.6.0.1-6c351d70a24d3e96f315cba68f3acf57 -package-id bytestring-0.10.0.2-bf7aaeef3f644374cd7d5a9066cd9017 -package-id containers-0.5.0.0-ab1dae9a94cd3cc84e7b2805636ebfa2 -package-id directory-1.2.0.1-b2c415ae3fe3357f80678150b6da5a3c -package-id filepath-1.3.0.1-b12cbe18566fe1532a1fda4c85e31cbe -package-id mtl-2.1.2-94c72af955e94b8d7b2f359dadd0cb62 -package-id network-2.4.1.2-28b12b2ed8a678ffb29bc07483d3d363 -package-id pretty-1.1.1.0-66181c695e6a2e173ba2088cf55cc396 -package-id process-1.1.0.2-d20d01635195e5ac2ebee73032c7fe84 -package-id random-1.0.1.1-ecb94a9408452ed74f22425077442903 -package-id stm-2.4.2-b5d718b1a5f1fbcdb61a336aef0c2130 -package-id time-1.4.0.1-10dc4804a19dc0000fab79908f1a9f50 -package-id unix-2.6.0.1-1b262a42f35f597365016088e0cde399 -package-id zlib-0.5.4.1-13ba81ac0d7e6f3bdf1ee5ddce4e9aab cbits/getnumcores.c
<command line>: cannot satisfy -package-id HTTP-4000.2.8-cdf033f9d7051824f52cd5101df67509
(use -v for more information)
Failed to install cabal-install-1.20.0.0
World file is already up to date.
cabal: Error: some packages failed to install:
cabal-install-1.20.0.0 failed during the building phase. The exception was:
ExitFailure 1
I'm not especially familiar with Haskell packaging. The error seems to be saying it can't find the package HTTP-4000.2.8-cdf033f9d7051824f52cd5101df67509. I don't know about the checksum, but it's clear from the docs that version 4000.2.8 does exist.
How might I clear this error and get the latest cabal-install?
Edit: Here's the output from ghc-pkg describe HTTP, as requested in the comments:
WARNING: cache is out of date: /Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/lib/ghc-7.6.3/package.conf.d/package.cache
use 'ghc-pkg recache' to fix.
name: HTTP
version: 4000.2.8
id: HTTP-4000.2.8-cdf033f9d7051824f52cd5101df67509
license: BSD3
copyright:
maintainer: Ganesh Sittampalam <http#projects.haskell.org>
stability:
homepage: https://github.com/haskell/HTTP
package-url:
synopsis: A library for client-side HTTP
description: The HTTP package supports client-side web programming in Haskell. It lets you set up
HTTP connections, transmitting requests and processing the responses coming back, all
from within the comforts of Haskell. It's dependent on the network package to operate,
but other than that, the implementation is all written in Haskell.
.
A basic API for issuing single HTTP requests + receiving responses is provided. On top
of that, a session-level abstraction is also on offer (the #BrowserAction# monad);
it taking care of handling the management of persistent connections, proxies,
state (cookies) and authentication credentials required to handle multi-step
interactions with a web server.
.
The representation of the bytes flowing across is extensible via the use of a type class,
letting you pick the representation of requests and responses that best fits your use.
Some pre-packaged, common instances are provided for you (#ByteString#, #String#.)
.
Here's an example use:
.
>
> do
> rsp <- Network.HTTP.simpleHTTP (getRequest "http://www.haskell.org/")
> -- fetch document and return it (as a 'String'.)
> fmap (take 100) (getResponseBody rsp)
>
> do
> (_, rsp)
> <- Network.Browser.browse $ do
> setAllowRedirects True -- handle HTTP redirects
> request $ getRequest "http://www.haskell.org/"
> return (take 100 (rspBody rsp))
category: Network
author: Warrick Gray <warrick.gray#hotmail.com>
exposed: True
exposed-modules: Network.BufferType Network.Stream
Network.StreamDebugger Network.StreamSocket Network.TCP
Network.HTTP Network.HTTP.Headers Network.HTTP.Base
Network.HTTP.Stream Network.HTTP.Auth Network.HTTP.Cookie
Network.HTTP.Proxy Network.HTTP.HandleStream Network.Browser
hidden-modules: Network.HTTP.Base64 Network.HTTP.MD5Aux
Network.HTTP.Utils Paths_HTTP
trusted: False
import-dirs: /Library/Haskell/ghc-7.6.3/lib/HTTP-4000.2.8/lib
library-dirs: /Library/Haskell/ghc-7.6.3/lib/HTTP-4000.2.8/lib
hs-libraries: HSHTTP-4000.2.8
extra-libraries:
extra-ghci-libraries:
include-dirs:
includes:
depends: array-0.4.0.1-3b78425c10ff2dad7acf7e8c8ae014c3
base-4.6.0.1-6c351d70a24d3e96f315cba68f3acf57
bytestring-0.10.0.2-bf7aaeef3f644374cd7d5a9066cd9017
mtl-2.1.2-94c72af955e94b8d7b2f359dadd0cb62
network-2.4.1.2-28b12b2ed8a678ffb29bc07483d3d363
old-time-1.1.0.1-4096e5c0be1f1ff8883115216d1bc5d1
parsec-3.1.3-a8edfa168176dff038c6dcd45a539942
hugs-options:
cc-options:
ld-options:
framework-dirs:
frameworks:
haddock-interfaces: /Library/Haskell/ghc-7.6.3/lib/HTTP-4000.2.8/doc/html/HTTP.haddock
haddock-html: /Library/Haskell/ghc-7.6.3/lib/HTTP-4000.2.8/doc/html
pkgroot: "/Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/lib/ghc-7.6.3"
There are two parts to the solution.
First, I had to do ghc-pkg recache. Then, I had to explicitly request the latest version of cabal-install by running cabal install cabal-install-1.20.0.0. It's not clear to me why either of these steps would be necessary just to get the latest version of something as basic as cabal-install. But there's the solution, at least for now.

Fail to install cairo haskell bindings on windows

I am trying to install cairo-0.12.4 Haskell package on Windows 7. I first downloaded and unpacked Gtk+2 and added its bin subdir to PATH. I then tried to run cabal with extra libs and includes:
cabal --extra-lib-dirs="d:\Program Files (x86)\Gtk+\lib"
--extra-include-dirs="d:\Program Files (x86)\Gtk+\include" install
But I got the following error
Reading available packages...
Choosing modular solver.
Resolving dependencies...
Ready to install cairo-0.12.4
Waiting for install task to finish...
Extracting
C:\Users\abailly\AppData\Roaming\cabal\packages\hackage.haskell.org\cairo\0.12.4\cairo-0.12.4.tar.gz
to C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368...
Updating cairo.cabal with the latest revision from the index.
creating
C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup
creating
C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist
creating
C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup
d:\Program Files (x86)\Haskell Platform\2012.2.0.0\bin\ghc.exe --make C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-
0.12.4\Setup.hs -o C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup\setup.exe -odir C:\Users\abailly\
AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup -hidir C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.
12.4\dist\setup -i -iC:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4 -package Cabal-1.14.0
[1 of 2] Compiling SetupWrapper ( C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\SetupWrapper.hs, C:\Users
\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup\SetupWrapper.o )
[2 of 2] Compiling Main ( C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\Setup.hs, C:\Users\abaill
y\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup\Main.o )
Linking C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup\setup.exe ...
C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup\setup.exe
configure --verbose=2 --ghc --prefix=C:\Users\abailly\AppData\Roaming\cabal
--user --flags=cairo_svg --flags=cairo_ps --flags=cairo_pdf
--extra-include-dirs=D:\Program Files (x86)\Gtk+\include
--extra-lib-dirs=D:\Program Files (x86)\Gtk+\lib --constraint=mtl ==2.1.2
--constraint=bytestring ==0.9.2.1 --constraint=base ==4.5.0.0
--constraint=array ==0.4.0.0 --disable-tests --disable-benchmarks
[1 of 2] Compiling Gtk2HsSetup ( Gtk2HsSetup.hs, dist\setup-wrapper\Gtk2HsSetup.o )
[2 of 2] Compiling Main ( SetupMain.hs, dist\setup-wrapper\Main.o )
Linking dist/setup-wrapper\setup.exe ...
Configuring cairo-0.12.4...
Flags chosen: cairo_svg=True, cairo_ps=True, cairo_pdf=True
Dependency array ==0.4.0.0: using array-0.4.0.0
Dependency base ==4.5.0.0: using base-4.5.0.0
Dependency bytestring ==0.9.2.1: using bytestring-0.9.2.1
Dependency mtl ==2.1.2: using mtl-2.1.2
Dependency cairo-pdf -any: using version 1.10.2
Dependency cairo-ps -any: using version 1.10.2
Dependency cairo-svg -any: using version 1.10.2
Dependency cairo >=1.2.0: using version 1.10.2
Using Cabal-1.14.0 compiled by ghc-7.4
Using compiler: ghc-7.4.1
Using install prefix: C:\Users\abailly\AppData\Roaming\cabal
Binaries installed in: C:\Users\abailly\AppData\Roaming\cabal\bin
Libraries installed in:
C:\Users\abailly\AppData\Roaming\cabal\cairo-0.12.4\ghc-7.4.1
Private binaries installed in:
C:\Users\abailly\AppData\Roaming\cabal\cairo-0.12.4
Data files installed in: C:\Users\abailly\AppData\Roaming\cabal\cairo-0.12.4
Documentation installed in:
C:\Users\abailly\AppData\Roaming\cabal\doc\cairo-0.12.4
Using alex version 3.0.1 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\lib\extralibs\bin\alex.exe
Using ar found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\mingw\bin\ar.exe
No c2hs found
Using cpphs version 1.16 found on system at:
c:\Users\abailly\AppData\Roaming\cabal\bin\cpphs.exe
No ffihugs found
Using gcc version 4.5.2 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\mingw\bin\gcc.exe
Using ghc version 7.4.1 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\bin\ghc.exe
Using ghc-pkg version 7.4.1 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\bin\ghc-pkg.exe
No greencard found
Using gtk2hsC2hs version 0.13.6 found on system at:
c:\Users\abailly\AppData\Roaming\cabal\bin\gtk2hsC2hs.exe
Using gtk2hsHookGenerator found on system at:
c:\Users\abailly\AppData\Roaming\cabal\bin\gtk2hsHookGenerator.exe
Using gtk2hsTypeGen found on system at:
c:\Users\abailly\AppData\Roaming\cabal\bin\gtk2hsTypeGen.exe
Using haddock version 2.10.0 found on system at: d:\Program Files
(x86)\Haskell Platform\2012.2.0.0\bin\haddock.exe
Using happy version 1.18.9 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\lib\extralibs\bin\happy.exe
No hmake found
Using hpc version 0.6 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\bin\hpc.exe
Using hsc2hs version 0.67 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\bin\hsc2hs.exe
Using hscolour version 1.20 found on system at:
c:\Users\abailly\AppData\Roaming\cabal\bin\HsColour.exe
No hugs found
No jhc found
Using ld found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\mingw\bin\ld.exe
No lhc found
No lhc-pkg found
No nhc98 found
Using pkg-config version 0.26 found on system at: d:\Program Files
(x86)\Gtk+\bin\pkg-config.exe
Using ranlib found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\mingw\bin\ranlib.exe
Using strip found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\mingw\bin\strip.exe
Using tar found on system at: D:\Program Files (x86)\Git\bin\tar.exe
No uhc found
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo-pdf
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo-ps
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo-svg
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo
setup.exe: Missing dependencies on foreign libraries:
* Missing C libraries: z, cairo
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
Failed to install cairo-0.12.4
cabal.exe: Error: some packages failed to install:
Chart-0.16 depends on cairo-0.12.4 which failed to install.
cairo-0.12.4 failed during the configure step. The exception was:
ExitFailure 1
splot-0.3.8 depends on cairo-0.12.4 which failed to install.
When I try to install cairo directly, I got the following:
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo-pdf
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo-ps
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo-svg
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo
setup.exe: Missing dependencies on foreign libraries:
* Missing C libraries: z, cairo
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
Failed to install cairo-0.12.4
World file is already up to date.
cabal.exe: Error: some packages failed to install:
cairo-0.12.4 failed during the configure step. The exception was:
ExitFailure 1
I am clueless...
If you read the error message:
* Missing C libraries: z, cairo
It is saying you need to install the libraries (and header files) for the libraries libz and cairo. On *nix systems this usually means just installing the -dev versions of these packages with your package manager. On windows I assume you'd download the source version of the library and install.
I got this problem. In my case it was a mismatch between a 64-bit ghc and a 32-bit cairo dll
I moved the Gtk+ library to D:\soft\gtk+\ and everything runs fine. The path to Gtk+ contain space which does not seem to be correctly interpreted by cabal/ghc, although I double-quoted it:
--extra-lib-dirs="d:\Program Files (x86)\Gtk+\lib"
Solution: Put gtk+ in a space-free location.
Update: Now, it fails to install Chart-0.16 with an even more cryptic error:
Loading package Win32-2.2.2.0 ... linking ... done.
Loading package array-0.4.0.0 ... linking ... done.
Loading package deepseq-1.3.0.0 ... linking ... done.
Loading package old-locale-1.0.0.4 ... linking ... done.
Loading package time-1.4 ... linking ... done.
Loading package containers-0.4.2.1 ... linking ... done.
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package data-accessor-0.2.2.3 ... linking ... done.
Loading package pretty-1.1.1.0 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package utility-ht-0.0.8 ... linking ... done.
Loading package data-accessor-template-0.2.1.10 ... linking ... done.
Loading package colour-2.3.3 ... linking ... done.
Loading package mtl-2.1.2 ... linking ... done.
*** gcc:
"D:\Program Files (x86)\Haskell Platform\2012.2.0.0\lib/../mingw/bin/gcc.exe" "-fno-stack-protector" "-Wl,--hash-size=31" "-Wl,--r
educe-memory-overheads" "-LC:\Users\abailly\AppData\Roaming\cabal\cairo-0.12.4\ghc-7.4.1" "-Ld:/soft/Gtk+/lib" "--print-file-name"
"libz.dll"
*** gcc:
"D:\Program Files (x86)\Haskell Platform\2012.2.0.0\lib/../mingw/bin/gcc.exe" "-fno-stack-protector" "-Wl,--hash-size=31" "-Wl,--r
educe-memory-overheads" "-LC:\Users\abailly\AppData\Roaming\cabal\cairo-0.12.4\ghc-7.4.1" "-Ld:/soft/Gtk+/lib" "--print-file-name"
"libcairo-2.dll"
Loading package cairo-0.12.4 ... d:\Program Files (x86)\Haskell Platform\2012.2.0.0\bin\ghc.exe returned
ExitFailure 1
Failed to install Chart-0.16
cabal.exe: Error: some packages failed to install:
Chart-0.16 failed during the building phase. The exception was:
ExitFailure 1
splot-0.3.8 depends on Chart-0.16 which failed to install.
I suspect this is due to a linking error as the compilation runs fine when I execute the following command which is what cabal outputs in debug mode:
"D:\\Program Files (x86)\\Haskell Platform\\2012.2.0.0\\bin\\ghc.exe"
"--make" "-v" "-fbuilding-cabal-package" "-O" "-odir" "dist\\build"
"-hidir" "dist\\build" "-stubdir" "dist\\build" "-i" "-idist\\build"
"-i." "-idist\\build\\autogen" "-Idist\\build\\autogen"
"-Idist\\build" "-optP-include"
"-optPdist\\build\\autogen\\cabal_macros.h" "-package-name"
"Chart-0.16" "-hide-all-packages" "-package-conf"
"dist\\package.conf.inplace" "-package-id"
"array-0.4.0.0-3cf1bc3f5cd0078adea24752c18081b9" "-package-id"
"base-4.5.0.0-597748f6f53a7442bcae283373264bb6" "-package-id"
"cairo-0.12.4-f04021ea456c901e8d05395a31f7a861" "-package-id"
"colour-2.3.3-4eaa610bb6d825a7334e1b3de448f6c0" "-package-id"
"data-accessor-0.2.2.3-5477c48e3478339fdff299c536a033c6" "-package-id"
"data-accessor-template-0.2.1.10-28ee96821fd908880f3a49417c4da548"
"-package-id" "mtl-2.1.2-7ec8bbada2af74b49c6e4aeea2889fdc"
"-package-id" "old-locale-1.0.0.4-29bd50ed2bb4a20928338f52e4ab1b71"
"-package-id" "time-1.4-01d7bf22d87e70510fe9ee4c4434b3ab"
"-XHaskell98" "Graphics.Rendering.Chart"
"Graphics.Rendering.Chart.Types" "Graphics.Rendering.Chart.Renderable"
"Graphics.Rendering.Chart.Axis"
"Graphics.Rendering.Chart.Axis.Floating"
"Graphics.Rendering.Chart.Axis.Indexed"
"Graphics.Rendering.Chart.Axis.Int"
"Graphics.Rendering.Chart.Axis.LocalTime"
"Graphics.Rendering.Chart.Axis.Types"
"Graphics.Rendering.Chart.Axis.Unit" "Graphics.Rendering.Chart.Layout"
"Graphics.Rendering.Chart.Legend" "Graphics.Rendering.Chart.Simple"
"Graphics.Rendering.Chart.Simple.Internal"
"Graphics.Rendering.Chart.Grid" "Graphics.Rendering.Chart.Plot"
"Graphics.Rendering.Chart.Plot.Types"
"Graphics.Rendering.Chart.Plot.Annotation"
"Graphics.Rendering.Chart.Plot.AreaSpots"
"Graphics.Rendering.Chart.Plot.Bars"
"Graphics.Rendering.Chart.Plot.Candle"
"Graphics.Rendering.Chart.Plot.ErrBars"
"Graphics.Rendering.Chart.Plot.FillBetween"
"Graphics.Rendering.Chart.Plot.Hidden"
"Graphics.Rendering.Chart.Plot.Lines"
"Graphics.Rendering.Chart.Plot.Pie"
"Graphics.Rendering.Chart.Plot.Points"
"Graphics.Rendering.Chart.SparkLine" "-hide-package" "monads-tf"
I am even more puzzled...
Update (2): When I run cabal install > out 2>&1 it succeeds!

Cabal: cabal configure fails

This question is only yak-shaving to try and troubleshoot another problem.
So, in an attempt to diagnose another problem of mine, I was advised to try:
cabal unpack base
cd base-4.3.1.0
cabal haddock
To see what that did.
Only, when I did cabal unpack base, it unpacked base-3.0.3.2. Then cabal haddock complained that I needed to run cabal configure first then that failed (lost the exact error, sadly).
So I decided to install base-4.3.1.0, just so I could reenact the instructions exactly.
Even after install, cabal unpack base unpacks base-3.0.3.2, though cabal unpack base-4.3.1.0 unpacks base-4.3.1.0.
Now I'm can't get either to configure:
% cabal unpack base
Unpacking to base-3.0.3.2/
% cd base-3.0.3.2
% cabal haddock
cabal: Run the 'configure' command first.
% cabal configure
Resolving dependencies...
Configuring base-3.0.3.2...
cabal: At least the following dependencies are missing:
base >=4.0 && <4.3, syb ==0.1.*
% cd ..
%
% cabal unpack base-4.3.1.0
Unpacking to base-4.3.1.0/
% cd base-4.3.1.0
% cabal haddock
cabal: Run the 'configure' command first.
% cabal configure
Resolving dependencies...
Configuring base-4.3.1.0...
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
checking for gcc... gcc
checking whether the C compiler works... yes
...
checking for library containing iconv... -liconv
checking for library containing locale_charset... none required
configure: creating ./config.status
config.status: error: cannot find input file: `base.buildinfo.in'
% cd ..
Also, I can't revert to base-3.0.3.2, because it depends on having
base version >=4.0 <4.3 (WTF?), and I can't install base-4.2.0.2 b/c it fails
b/c it can't find base.buildinfo.in.
% cabal --version
cabal-install version 0.10.2
using version 1.10.1.0 of the Cabal library
% cabal info base
* base (library)
Synopsis: Basic libraries (backwards-compatibility version)
Versions available: 3.0.3.1, 3.0.3.2, (4.0.0.0), (4.1.0.0), (4.2.0.0),
(4.2.0.1), (4.2.0.2), (4.3.0.0), (4.3.1.0)
Versions installed: (4.3.1.0)
Homepage: [ Not specified ]
Bug reports: http://hackage.haskell.org/trac/ghc/newticket?component=libraries/base
Description: This is a backwards-compatible version of the base package.
It depends on a later version of base, and was probably
supplied with your compiler when it was installed.
License: BSD3
Maintainer: libraries#haskell.org
Source repo: http://darcs.haskell.org/packages/base3-compat
Dependencies: base >=4.0 && <4.3, syb ==0.1.*
Documentation: /usr/local/share/doc/ghc/html/libraries/base-4.3.1.0
Cached: Yes
Modules:
...
%
What am I doing wrong and how can I fix it?
Nobody is meant to self-compile base. It's tied to a particular ghc installation, so you couldn't use any other base package if you built it. I'm not surprised that the base package doesn't build from hackage; most likely nobody ever tries to build it.
Anyway, I'd try checking out the ghc source. The base.buildinfo.in file will be in the base package repo. You could copy the file from the repo to your unpacked distribution, but it's probably better to just build from the checked-out source.
Just be sure to only install the docs and not the library.

Resources