I'm also using Arch Linux on x86_64. I would strongly recommend *not*
using the Arch packages for most Haskell things. I use hsenv instead.
The arch-haskell effort is well-intentioned, but I'm not convinced
that it's the right way to go -- it's just too much work for a few
people to maintain Arch versions of all the Haskell packages.
To use hsenv, install just the Arch packages for ghc and cabal-install
(and happy too, in case it's needed for anything you use
subsequently), then do a cabal update, cabal install hsenv, and from
then on, do everything in hsenv sandboxes. For example, if your blog
code is in directory blog, you do something like:
# Create the hsenv sandbox.
cd blog
hsenv
# Activate the sandbox.
source .hsenv_blog/bin/activate
# Install Hakyll (and all its dependencies) in the sandbox.
cabal install hakyll
# Build your code.
cabal configure hakyllx
cabal install hakyllx
I went through quite a few rounds of "install GHC, install Cabal,
install lots of inconsistent packages until things are completely
screwed up, blow everything away, start again" before I discovered
hsenv. I suffer no more pain from Haskell dependency hell, which
leaves me much more free time to cause my own problems...
If you have any questions about hsenv, drop me a line.
Cheers,
Ian.
On 11 October 2012 20:15, <
hx....@gmail.com> wrote:
> I can't install Hakyll in my computer using the cabal install method and I
> tried with the [haskell] and [haskell-extra] repositories.
> It seems like it works, but when I try to compile the file hakyll.hs in the
> brochure example, ghc can't link it.
> The cabal method doesn't work too, saying:
>
> $ cabal install hakyllx
> Resolving dependencies...
> In order, the following would be installed:
> pandoc-1.9.4.2 +blaze_html_0_5 (reinstall) changes: HTTP-4000.2.4 ->
> 4000.2.5,
> tagsoup-0.12.7 -> 0.12.8
> hakyll-3.4.2.1 (reinstall) changes: blaze-markup-0.5.1.1 -> 0.5.1.0,
> hamlet-1.0.1.4 -> 1.1.0.2, snap-core-0.9.2.1 -> 0.8.1, snap-server-0.9.2.3
> ->
> 0.8.1.1
> cabal: The following packages are likely to be broken by the reinstalls:
> hakyll-3.4.2.0
> hakyll-3.4.1.0
> gitit-0.10.0.1
> Use --force-reinstalls if you want to install anyway.
>
> I tried again with --force-reinstalls option:
> $ cabal install hakyll --force-reinstalls
> Resolving dependencies...
> Warning: The following packages are likely to be broken by the reinstalls:
> hakyll-3.4.2.0
> hakyll-3.4.1.0
> gitit-0.10.0.1
> Continuing even though the plan contains dangerous reinstalls.
> [1 of 1] Compiling Main (
> /tmp/pandoc-1.9.4.2-12598/pandoc-1.9.4.2/Setup.hs,
> /tmp/pandoc-1.9.4.2-12598/pandoc-1.9.4.2/dist/setup/Main.o )
>
> /tmp/pandoc-1.9.4.2-12598/pandoc-1.9.4.2/Setup.hs:1:1:
> Warning: In the use of `catch'
> (imported from Prelude, but defined in System.IO.Error):
> Deprecated: "Please use the new exceptions variant,
> Control.Exception.catch"
>
> /tmp/pandoc-1.9.4.2-12598/pandoc-1.9.4.2/Setup.hs:1:1:
> Warning: In the use of `runTests'
> (imported from Distribution.Simple, but defined in
> Distribution.Simple.UserHooks):
> Deprecated: "Please use the new testing interface instead!"
> Linking /tmp/pandoc-1.9.4.2-12598/pandoc-1.9.4.2/dist/setup/setup ...
> Configuring pandoc-1.9.4.2...
> Warning: This package indirectly depends on multiple versions of the same
> package. This is highly likely to cause a compile failure.
> package citeproc-hs-0.3.4 requires HTTP-4000.2.4
> package pandoc-1.9.4.2 requires HTTP-4000.2.5
> Building pandoc-1.9.4.2...
> Preprocessing executable 'pandoc' for pandoc-1.9.4.2...
>
> src/pandoc.hs:60:8:
> Could not find module `Text.CSL.Reference'
> There are files missing in the `citeproc-hs-0.3.4' package,
> try running 'ghc-pkg check'.
> Use -v to see a list of the files searched for.
> Failed to install pandoc-1.9.4.2
> cabal: Error: some packages failed to install:
> hakyll-3.4.2.1 depends on pandoc-1.9.4.2 which failed to install.
> pandoc-1.9.4.2 failed during the building phase. The exception was:
> ExitFailure 1
>
> This is the message that ghc returns when I try to compile hakyll.hs
>
> $ ghc --make hakyll.hs
>
> hakyll.hs:4:8:
> Could not find module `Hakyll'
> There are files missing in the `hakyll-3.4.2.0' package,
> try running 'ghc-pkg check'.
> Use -v to see a list of the files searched for.
>
> Running a ghc-pkg check returns a long, long output with missing files.
>
> I'm using ghc 7.4.2 from [haskell] repository, in [extra] ghc is in version
> 7.6.1. The package haskell-platform is not available since the update to
> 7.6.1, and I tried to build haskell-platform with the binary tarball. I
> couldn't. Compiling errors in some libraries.
>
> I think it's a problem with the ghc version, but I can't build ghc. When I
> do this, I get a output saying that I don't have libgmp.so and fails.
> For more details, I'm in ArchLinux x86_64. It seems like hakyll is the only
> package that fails, because I can run pandoc as always.
>
> Thanks.
>
--
Ian Ross Tel:
+43(0)6804451378 i...@skybluetrades.net www.skybluetrades.net