When trying to install snap with cabal I get the following, how can I fix this? :
$ cabal install snap
Resolving dependencies...
Configuring snap-0.13.1.2...
Building snap-0.13.1.2...
Preprocessing library snap-0.13.1.2...
[ 1 of 33] Compiling Snap.Snaplet.Internal.RST ( src/Snap/Snaplet/Internal/RST.hs, dist/build/Snap/Snaplet/Internal/RST.o )
[ 2 of 33] Compiling Snap.Snaplet.Internal.Lensed ( src/Snap/Snaplet/Internal/Lensed.hs, dist/build/Snap/Snaplet/Internal/Lensed.o )
[ 3 of 33] Compiling Snap.Snaplet.Internal.LensT ( src/Snap/Snaplet/Internal/LensT.hs, dist/build/Snap/Snaplet/Internal/LensT.o )
[ 4 of 33] Compiling Control.Access.RoleBased.Internal.Role ( src/Control/Access/RoleBased/Internal/Role.hs, dist/build/Control/Access/RoleBased/Internal/Role.o )
[ 5 of 33] Compiling Control.Access.RoleBased.Internal.Rule ( src/Control/Access/RoleBased/Internal/Rule.hs, dist/build/Control/Access/RoleBased/Internal/Rule.o )
[ 6 of 33] Compiling Control.Access.RoleBased.Internal.Types ( src/Control/Access/RoleBased/Internal/Types.hs, dist/build/Control/Access/RoleBased/Internal/Types.o )
[ 7 of 33] Compiling Control.Access.RoleBased.Role ( src/Control/Access/RoleBased/Role.hs, dist/build/Control/Access/RoleBased/Role.o )
[ 8 of 33] Compiling Control.Access.RoleBased.Types ( src/Control/Access/RoleBased/Types.hs, dist/build/Control/Access/RoleBased/Types.o )
[ 9 of 33] Compiling Control.Access.RoleBased.Internal.RoleMap ( src/Control/Access/RoleBased/Internal/RoleMap.hs, dist/build/Control/Access/RoleBased/Internal/RoleMap.o )
[10 of 33] Compiling Control.Access.RoleBased.Checker ( src/Control/Access/RoleBased/Checker.hs, dist/build/Control/Access/RoleBased/Checker.o )
[11 of 33] Compiling Snap.Snaplet.Session.SessionManager ( src/Snap/Snaplet/Session/SessionManager.hs, dist/build/Snap/Snaplet/Session/SessionManager.o )
[12 of 33] Compiling Snap.Snaplet.Session.SecureCookie ( src/Snap/Snaplet/Session/SecureCookie.hs, dist/build/Snap/Snaplet/Session/SecureCookie.o )
[13 of 33] Compiling Snap.Snaplet.Session.Common ( src/Snap/Snaplet/Session/Common.hs, dist/build/Snap/Snaplet/Session/Common.o )
[14 of 33] Compiling Snap.Snaplet.Config ( src/Snap/Snaplet/Config.hs, dist/build/Snap/Snaplet/Config.o )
src/Snap/Snaplet/Config.hs:9:1:
Warning: In the use of `mkTyCon'
(imported from Data.Typeable):
Deprecated: "either derive Typeable, or use mkTyCon3 instead"
[15 of 33] Compiling Snap.Snaplet.Internal.Types ( src/Snap/Snaplet/Internal/Types.hs, dist/build/Snap/Snaplet/Internal/Types.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package bytestring-0.9.2.1 ... linking ... done.
Loading package primitive-0.4.1 ... linking ... done.
Loading package vector-0.9.1 ... linking ... done.
Loading package vector-algorithms-0.5.4.2 ... linking ... done.
Loading package array-0.4.0.0 ... linking ... done.
Loading package stm-2.3 ... linking ... done.
Loading package extensible-exceptions-0.1.1.4 ... linking ... done.
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package MonadCatchIO-transformers-0.3.0.0 ... linking ... done.
Loading package deepseq-1.3.0.0 ... linking ... done.
Loading package containers-0.4.2.1 ... linking ... done.
Loading package text-0.11.2.0 ... linking ... done.
Loading package attoparsec-0.10.4.0 ... linking ... done.
Loading package enumerator-0.4.20 ... linking ... done.
Loading package attoparsec-enumerator-0.3.1 ... linking ... done.
Loading package blaze-builder-0.3.1.1 ... linking ... done.
Loading package blaze-builder-enumerator-0.2.0.5 ... linking ... done.
Loading package hashable-1.1.2.5 ... linking ... done.
Loading package case-insensitive-1.1 ... linking ... done.
Loading package mtl-2.1.1 ... linking ... done.
Loading package parsec-3.1.2 ... linking ... done.
Loading package unix-2.5.1.0 ... linking ... done.
Loading package network-2.3.0.13 ... linking ... done.
Loading package old-locale-1.0.0.4 ... linking ... done.
Loading package HUnit-1.2.4.2 ... linking ... done.
Loading package bytestring-mmap-0.2.2 ... linking ... done.
Loading package filepath-1.3.0.0 ... linking ... done.
Loading package old-time-1.1.0.0 ... linking ... done.
Loading package directory-1.1.0.2 ... linking ... done.
Loading package time-1.4 ... linking ... done.
Loading package random-1.0.1.1 ... linking ... done.
Loading package regex-base-0.93.2 ... linking ... done.
Loading package regex-posix-0.95.1 ... linking ... done.
Loading package unix-compat-0.4.1.1 ... linking ... done.
Loading package unordered-containers-0.2.3.3 ... linking ... done.
Loading package zlib-0.5.3.3 ... linking ... done.
Loading package zlib-bindings-0.1.1.3 ... linking ... done.
Loading package zlib-enum-0.2.3 ... linking ... done.
Loading package snap-core-0.9.4.1 ... linking ... ghc:
unknown symbol `_directoryzm1zi2zi0zi1_SystemziDirectory_doesDirectoryExist2_closure'
ghc: unable to load package `snap-core-0.9.4.1'
Failed to install snap-0.13.1.2
cabal: Error: some packages failed to install:
snap-0.13.1.2 failed during the building phase. The exception was:
ExitFailure 1
My guess is that you have two or more different versions of directory installed. I'd recommend blowing away your package repository with
rm -fr ~/.ghc
and reinstalling. If that doesn't work, then I'd need more information. In that case it would probably be easier to debug this interactively in the #snapframework IRC channel.