If you're sti having trouble with cpp, please read <span></span><br><a href="https://gist.github.com/cartazio/7131371">https://gist.github.com/cartazio/7131371</a><br>On Saturday, May 17, 2014, Haskell Beginner <<a href="javascript:_e(%7B%7D,'cvml','haskell.beginner@gmail.com');" target="_blank">haskell.beginner@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">This is the error message which started it all off:  <a href="http://lpaste.net/104242" rel="nofollow" target="_blank">http://lpaste.net/104242</a><br><br>Then the following conversation happened:<div>==============================================================================<br>


</div><div><div>--- JPMoresmau ------</div><div><br></div><div>First package to fail is exceptions. Just open a console and type in</div><div><br></div><div><font face="courier new, monospace">    cabal install exceptions</font></div>


<div><br></div><div>EclipseFP tries to put some parallel install flags that may make the errors less visible (a Cabal thing, not an EclipseFP thing). I really don't like the look of getting warnings in c code, though...</div>


<div><br></div><div>--- haskell_beginner ------</div><div><br></div><div><font face="courier new, monospace">    $ cabal install exceptions</font></div><div><font face="courier new, monospace">    Resolving dependencies...</font></div>


<div><font face="courier new, monospace">    Configuring exceptions-0.6.1...</font></div><div><font face="courier new, monospace">    </font></div><div><font face="courier new, monospace">    /var/folders/3r/gvk584k50jb253024p4wxy3r0000gn/T/5187.c:1:12:</font></div>


<div><font face="courier new, monospace">         warning: control reaches end of non-void function [-Wreturn-type]</font></div><div><font face="courier new, monospace">    int foo() {}</font></div><div><font face="courier new, monospace">               ^</font></div>


<div><font face="courier new, monospace">    1 warning generated.</font></div><div><font face="courier new, monospace">    Building exceptions-0.6.1...</font></div><div><font face="courier new, monospace">    Preprocessing library exceptions-0.6.1...</font></div>


<div><font face="courier new, monospace">    <command line>: cannot satisfy -package-id mtl-2.1.2-94c72af955e94b8d7b2f359dadd0cb62</font></div><div><font face="courier new, monospace">        (use -v for more information)</font></div>


<div><font face="courier new, monospace">    Failed to install exceptions-0.6.1</font></div><div><font face="courier new, monospace">    cabal: Error: some packages failed to install:</font></div><div><font face="courier new, monospace">    exceptions-0.6.1 failed during the building phase. The exception was:</font></div>


<div><font face="courier new, monospace">    ExitFailure 1</font></div><div><font face="courier new, monospace">    $ </font></div><div><br></div><div>What flags can I add to that to get a better error message?</div><div>


<br></div><div>EDIT TO ADD:</div><div>Again if there is another layer automatically adding flags to the above command, I know nothing about it. This includes if Haskell or cabal uses a config file. I am on a — to my knowledge — completely stock install of Haskell for Mac OS.</div>


<div><br></div><div>--- JPMoresmau ------</div><div><br></div><div><font face="courier new, monospace">    cabal install -v exceptions</font></div><div><br></div><div>May give more info about why the mtl package cannot be satisfied when it seems to have been installed.</div>


<div><br></div><div>--- haskell_beginner ------</div><div><br></div><div><font face="courier new, monospace">    $ cabal install -v exceptions</font></div><div><font face="courier new, monospace">    Reading available packages...</font></div>


<div><font face="courier new, monospace">    Choosing modular solver.</font></div><div><font face="courier new, monospace">    Resolving dependencies...</font></div><div><font face="courier new, monospace">    Ready to install exceptions-0.6.1</font></div>


<div><font face="courier new, monospace">    Waiting for install task to finish...</font></div><div><font face="courier new, monospace">    Extracting</font></div><div><font face="courier new, monospace">    /Users/person/Library/Haskell/repo-cache/<a href="http://hackage.haskell.org/exceptions/0.6.1/exceptions-0.6.1.tar.gz" target="_blank">hackage.haskell.org/exceptions/0.6.1/exceptions-0.6.1.tar.gz</a></font></div>


<div><font face="courier new, monospace">    to /var/folders/3r/gvk584k50jb253024p4wxy3r0000gn/T/exceptions-0.6.1-5256...</font></div><div><font face="courier new, monospace">    Updating exceptions.cabal with the latest revision from the index.</font></div>


<div><font face="courier new, monospace">    Configuring exceptions-0.6.1...</font></div><div><font face="courier new, monospace">    Dependency base ==<a href="http://4.6.0.1" target="_blank">4.6.0.1</a>: using base-4.6.0.1</font></div>


<div><font face="courier new, monospace">    Dependency mtl ==2.1.2: using mtl-2.1.2</font></div><div><font face="courier new, monospace">    Dependency transformers ==<a href="http://0.3.0.0" target="_blank">0.3.0.0</a>: using transformers-0.3.0.0</font></div>


<div><font face="courier new, monospace">    </font></div><div><font face="courier new, monospace">    /var/folders/3r/gvk584k50jb253024p4wxy3r0000gn/T/5256.c:1:12:</font></div><div><font face="courier new, monospace">         warning: control reaches end of non-void function [-Wreturn-type]</font></div>


<div><font face="courier new, monospace">    int foo() {}</font></div><div><font face="courier new, monospace">               ^</font></div><div><font face="courier new, monospace">    1 warning generated.</font></div><div>


<font face="courier new, monospace">    Using Cabal-1.16.0 compiled by ghc-7.6</font></div><div><font face="courier new, monospace">    Using compiler: ghc-7.6.3</font></div><div><font face="courier new, monospace">    Using install prefix:</font></div>


<div><font face="courier new, monospace">    /Users/person/Library/Haskell/ghc-7.6.3/lib/exceptions-0.6.1</font></div><div><font face="courier new, monospace">    Binaries installed in:</font></div><div><font face="courier new, monospace">    /Users/person/Library/Haskell/ghc-7.6.3/lib/exceptions-0.6.1/bin</font></div>


<div><font face="courier new, monospace">    Libraries installed in:</font></div><div><font face="courier new, monospace">    /Users/person/Library/Haskell/ghc-7.6.3/lib/exceptions-0.6.1/lib</font></div><div><font face="courier new, monospace">    Private binaries installed in:</font></div>


<div><font face="courier new, monospace">    /Users/person/Library/Haskell/ghc-7.6.3/lib/exceptions-0.6.1/libexec</font></div><div><font face="courier new, monospace">    Data files installed in:</font></div><div><font face="courier new, monospace">    /Users/person/Library/Haskell/ghc-7.6.3/lib/exceptions-0.6.1/share</font></div>


<div><font face="courier new, monospace">    Documentation installed in:</font></div><div><font face="courier new, monospace">    /Users/person/Library/Haskell/ghc-7.6.3/lib/exceptions-0.6.1/doc</font></div><div><font face="courier new, monospace">    Using alex version 3.0.5 found on system at: /usr/bin/alex</font></div>


<div><font face="courier new, monospace">    Using ar found on system at: /usr/bin/ar</font></div><div><font face="courier new, monospace">    No c2hs found</font></div><div><font face="courier new, monospace">    Using cpphs version 1.18.1 found on system at:</font></div>


<div><font face="courier new, monospace">    /Users/person/Library/Haskell/bin/cpphs</font></div><div><font face="courier new, monospace">    No ffihugs found</font></div><div><font face="courier new, monospace">    Using gcc version 4.2.1 found on system at: /usr/bin/gcc</font></div>


<div><font face="courier new, monospace">    Using ghc version 7.6.3 found on system at: /usr/bin/ghc</font></div><div><font face="courier new, monospace">    Using ghc-pkg version 7.6.3 found on system at: /usr/bin/ghc-pkg</font></div>


<div><font face="courier new, monospace">    No greencard found</font></div><div><font face="courier new, monospace">    Using haddock version 2.13.2 found on system at: /usr/bin/haddock</font></div><div><font face="courier new, monospace">    Using happy version 1.18.10 found on system at: /usr/bin/happy</font></div>


<div><font face="courier new, monospace">    No hmake found</font></div><div><font face="courier new, monospace">    Using hpc version 0.6 found on system at: /usr/bin/hpc</font></div><div><font face="courier new, monospace">    Using hsc2hs version 0.67 found on system at: /usr/bin/hsc2hs</font></div>


<div><font face="courier new, monospace">    Using hscolour version 1.20 found on system at:</font></div><div><font face="courier new, monospace">    /Users/person/Library/Haskell/bin/HsColour</font></div><div><font face="courier new, monospace">    No hugs found</font></div>


<div><font face="courier new, monospace">    No jhc found</font></div><div><font face="courier new, monospace">    Using ld found on system at: /usr/bin/ld</font></div><div><font face="courier new, monospace">    No lhc found</font></div>


<div><font face="courier new, monospace">    No lhc-pkg found</font></div><div><font face="courier new, monospace">    No nhc98 found</font></div><div><font face="courier new, monospace">    No pkg-config found</font></div>


<div><font face="courier new, monospace">    Using ranlib found on system at: /usr/bin/ranlib</font></div><div><font face="courier new, monospace">    Using strip found on system at: /usr/bin/strip</font></div><div><font face="courier new, monospace">    Using tar found on system at: /usr/bin/tar</font></div>


<div><font face="courier new, monospace">    No uhc found</font></div><div><font face="courier new, monospace">    creating dist/build</font></div><div><font face="courier new, monospace">    creating dist/build/autogen</font></div>


<div><font face="courier new, monospace">    Building exceptions-0.6.1...</font></div><div><font face="courier new, monospace">    Preprocessing library exceptions-0.6.1...</font></div><div><font face="courier new, monospace">    Building library...</font></div>


<div><font face="courier new, monospace">    creating dist/build</font></div><div><font face="courier new, monospace">    /usr/bin/ghc --make -fbuilding-cabal-package -O -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 exceptions-0.6.1 -hide-all-packages -package-db dist/package.conf.inplace -package-id base-4.6.0.1-6c351d70a24d3e96f315cba68f3acf57 -package-id mtl-2.1.2-94c72af955e94b8d7b2f359dadd0cb62 -package-id transformers-0.3.0.0-ff2bb6ac67241ebb987351a3db564af0 -XHaskell98 Control.Monad.Catch Control.Monad.Catch.Pure -Wall -fwarn-tabs -O2</font></div>


<div><font face="courier new, monospace">    <command line>: cannot satisfy -package-id mtl-2.1.2-94c72af955e94b8d7b2f359dadd0cb62</font></div><div><font face="courier new, monospace">        (use -v for more information)</font></div>


<div><font face="courier new, monospace">    Failed to install exceptions-0.6.1</font></div><div><font face="courier new, monospace">    World file is already up to date.</font></div><div><font face="courier new, monospace">    cabal: Error: some packages failed to install:</font></div>


<div><font face="courier new, monospace">    exceptions-0.6.1 failed during the building phase. The exception was:</font></div><div><font face="courier new, monospace">    ExitFailure 1</font></div><div><font face="courier new, monospace">    $ </font></div>


<div><br></div><div>Hope that helps. I don't know what to make of it. :-/</div><div><br></div><div>--- JPMoresmau ------</div><div><br></div><div>Neither do I! It seems cabal finds a mtl package to use, but when it passes the exact reference of the package (with a trailing hash to indicate the specifics of your install), ghc doesn't find it. At least it's nothing to do with EclipseFP, which is a relief (for me :-p). I suggest you post that to the Haskell-Cafe mailing list if nobody has any clue here. I know that MacOS is a bit weird sometimes with PATH and such.</div>


<div>==============================================================================<br><br>Thus with the history of this error now told (TL;DR: read JPMoresmau's last comment above), the question I pose to this mailing list is:</div>


<div><br></div><div>Why is ghc failing to find mtl?<br><br>Thanks,<br>~Haskell Beginner<br><br></div></div></div>
</blockquote>