How do I install elm-repl despite these errors? - ubuntu-18.04

I'm brand new to elm and web development generally. I'm working through the guide here. I installed Sublime Text and the elm compiler. I'd like to use a REPL to play around with things easily. I tried installing it through the instructions here, where I run this:
cabal update ; cabal install elm-repl
But I get this error:
Resolving dependencies...
Configuring http-client-0.5.8...
Building http-client-0.5.8...
Failed to install http-client-0.5.8
Build log ( /home/matt/.cabal/logs/http-client-0.5.8.log ):
cabal: Entering directory '/tmp/cabal-tmp-9068/http-client-0.5.8'
Configuring http-client-0.5.8...
Building http-client-0.5.8...
Preprocessing library http-client-0.5.8...
[ 1 of 19] Compiling Network.PublicSuffixList.Types ( publicsuffixlist/Network/PublicSuffixList/Types.hs, dist/build/Network/PublicSuffixList/Types.o )
[ 2 of 19] Compiling Network.PublicSuffixList.Serialize ( publicsuffixlist/Network/PublicSuffixList/Serialize.hs, dist/build/Network/PublicSuffixList/Serialize.o )
[ 3 of 19] Compiling Network.PublicSuffixList.DataStructure ( publicsuffixlist/Network/PublicSuffixList/DataStructure.hs, dist/build/Network/PublicSuffixList/DataStructure.o )
[ 4 of 19] Compiling Network.PublicSuffixList.Lookup ( publicsuffixlist/Network/PublicSuffixList/Lookup.hs, dist/build/Network/PublicSuffixList/Lookup.o )
[ 5 of 19] Compiling Network.HTTP.Client.Util ( Network/HTTP/Client/Util.hs, dist/build/Network/HTTP/Client/Util.o )
[ 6 of 19] Compiling Data.KeyedPool ( Data/KeyedPool.hs, dist/build/Data/KeyedPool.o )
[ 7 of 19] Compiling Network.HTTP.Client.Types ( Network/HTTP/Client/Types.hs, dist/build/Network/HTTP/Client/Types.o )
[ 8 of 19] Compiling Network.HTTP.Client.Connection ( Network/HTTP/Client/Connection.hs, dist/build/Network/HTTP/Client/Connection.o )
[ 9 of 19] Compiling Network.HTTP.Client.Body ( Network/HTTP/Client/Body.hs, dist/build/Network/HTTP/Client/Body.o )
[10 of 19] Compiling Network.HTTP.Client.Cookies ( Network/HTTP/Client/Cookies.hs, dist/build/Network/HTTP/Client/Cookies.o )
Network/HTTP/Client/Cookies.hs:152:38: error:
• Couldn't match expected type ‘Builder’
with actual type ‘Data.ByteString.Builder.Internal.Builder’
NB: ‘Data.ByteString.Builder.Internal.Builder’
is defined in ‘Data.ByteString.Builder.Internal’
in package ‘bytestring-0.10.8.1’
‘Builder’
is defined in ‘Blaze.ByteString.Builder.Internal.Types’
in package ‘blaze-builder-0.3.3.4’
• In the second argument of ‘($)’, namely
‘renderCookies $ output_cookies’
In the expression: toByteString $ renderCookies $ output_cookies
In an equation for ‘output_line’:
output_line = toByteString $ renderCookies $ output_cookies
cabal: Leaving directory '/tmp/cabal-tmp-9068/http-client-0.5.8'
cabal: Error: some packages failed to install:
Elm-0.12.3 depends on http-client-0.5.8 which failed to install.
elm-repl-0.2.2.1 depends on http-client-0.5.8 which failed to install.
http-client-0.5.8 failed during the building phase. The exception was:
ExitFailure 1
http-client-tls-0.3.5.3 depends on http-client-0.5.8 which failed to install.
pandoc-2.1 depends on http-client-0.5.8 which failed to install.

If you've already installed the Elm compiler, you already have the REPL. Try typing elm repl in the shell. Note that there is no hyphen in this command.
The instructions you are following to install a separate REPL are long out of date.

Related

Unable to compile PnetCDF: 'tst_rec_vars' test fails

I am trying to install PnetCDF from source. I used the 1.12.2 version for installation. MPICH, Zlib, Szip, HDF5 and NetCDF-4 have been installed from source successfully (HDF5 and NetCDF-4 have been built with parallel I/O support).
MPICH is installed as follows (v3.4.2):
./configure --prefix=${DIR}/mpich --with-device=ch4:ofi CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" --enable-fortran
make
make check
make install
export PATH=${DIR}/mpich/bin:${PATH}
Where DIR is the root directory all the libraries are installed to (with their own directory).
Zlib (v1.2.11):
./configure --prefix=${DIR}/grib2
make
make check
make install
export CPPFLAGS="-I${DIR}/grib2/include"
export LDFLAGS="-L${DIR}/grib2/lib"
export LD_LIBRARY_PATH="${DIR}/grib2/lib:$LD_LIBRARY_PATH"
Szip (v2.1.1):
./configure --prefix=${DIR}/szip
CC=mpicc
make
make check
make install
export LD_LIBRARY_PATH="${DIR}/szip/lib:$LD_LIBRARY_PATH"
export CPPFLAGS="-I${DIR}/szip/include ${CPPFLAGS}"
export LDFLAGS="-L${DIR}/szip/lib ${LDFLAGS}"
HDF5 (v1.8.22):
export HDF5=${DIR}/hdf5
./configure --prefix=${HDF5} --with-szlib=${DIR}/szip --with-zlib=${DIR}/grib2 --enable-parallel CC=mpicc --enable-fortran FC=mpifort
make
make check
make install
export LD_LIBRARY_PATH="${HDF5}/lib:$LD_LIBRARY_PATH"
export CPPFLAGS="-I${HDF5}/include ${CPPFLAGS}"
export LDFLAGS="-L${HDF5}/lib ${LDFLAGS}"
export PATH="${HDF5}/bin:${PATH}"
NetCDF4-C (v4.8.0):
./configure --prefix=${DIR}/netcdf --disable-dap --enable-parallel-tests --enable-large-file-tests --disable-extreme-numbers CC=mpicc
make
make check
make install
export PATH="${NETCDF}/bin:${PATH}"
export LD_LIBRARY_PATH="${NETCDF}/lib:${LD_LIBRARY_PATH}"
export CPPFLAGS="-I${NETCDF}/include ${CPPFLAGS}"
export LDFLAGS="-L${NETCDF}/lib ${LDFLAGS}"
export LIBS="$(nc-config --libs) ${LIBS}"
NetCDF4-Fortran (v4.5.3):
./configure --prefix=${NETCDF} --enable-large-file-tests --enable-parallel-tests CC=${DIR}/mpich/bin/mpicc FC=mpifort F77=mpif77
make
make check
make install
The HDF5 configuration shown by h5pcc -showconfig is given below (only the part I think relevant is included):
Features:
---------
Parallel HDF5: yes
High-level library: yes
Build HDF5 Tests: yes
Build HDF5 Tools: yes
Threadsafety: no
Default API mapping: v18
With deprecated public symbols: yes
I/O filters (external): deflate(zlib),szip(encoder)
MPE:
Direct VFD: no
(Read-Only) S3 VFD: no
(Read-Only) HDFS VFD: no
dmalloc: no
Clear file buffers before write: yes
Using memory checker: no
Function stack tracing: no
Strict file format checks: no
Optimization instrumentation: no
And the output of nc-config --all:
--cc -> /media/case/work/hwrf/libraries/mpich/bin/mpicc
--cflags -> -I/media/case/work/hwrf/libraries/netcdf/include -I/media/case/work/hwrf/libraries/hdf5/include -I/media/case/work/hwrf/libraries/szip/include -I/media/case/work/hwrf/libraries/grib2/include
--libs -> -L/media/case/work/hwrf/libraries/netcdf/lib -lnetcdf
--static -> -lhdf5_hl -lhdf5 -lm -ldl -lz -lcurl
--has-c++ -> no
--cxx ->
--has-c++4 -> no
--cxx4 ->
--has-fortran -> yes
--fc -> mpifort
--fflags -> -I/media/case/work/hwrf/libraries/netcdf/include -I/media/case/work/hwrf/libraries/netcdf/include
--flibs -> -L/media/case/work/hwrf/libraries/netcdf/lib -lnetcdff
--has-f90 ->
--has-f03 -> yes
--has-dap -> no
--has-dap2 -> no
--has-dap4 -> no
--has-nc2 -> yes
--has-nc4 -> yes
--has-hdf5 -> yes
--has-hdf4 -> no
--has-logging -> no
--has-pnetcdf -> no
--has-szlib -> yes
--has-cdf5 -> yes
--has-parallel4 -> yes
--has-parallel -> yes
--has-nczarr -> no
--prefix -> /media/case/work/hwrf/libraries/netcdf
--includedir -> /media/case/work/hwrf/libraries/netcdf/include
--libdir -> /media/case/work/hwrf/libraries/netcdf/lib
--version -> netCDF 4.8.0
So far, so good. Everything was installed without any failure. All make checks have been passed.
The trouble arises when I try to compile PnetCDF from source. I tried PnetCDF version 1.11.2 for installation (in fact, I triedd several older versions as well, more on that later). The installation is attempted as following:
./configure --prefix=${DIR}/pnetcdf --enable-large-single-req --enable-netcdf4 --enable-shared=yes --with-netcdf4="${DIR}/netcdf" MPICC=mpicc MPIF77=mpif77 MPIF90=mpif90 MPICC=mpicc MPIF77=mpif77 MPIF90=mpif90
make
make tests
make check
make ptest
make ptests
But, it fails at make ptest. The failed test is tst_rec_vars.c and the error message is:
Error at line 78 of tst_rec_vars.c: expect dim X len 4 but got 3
Error at line 78 of tst_rec_vars.c: expect dim X len 4 but got 3 fail with 2 mismatches
make[2]: *** [Makefile:1354: ptest4] Error 1
make[2]: Leaving directory '/media/case/work/hwrf/libraries/source/pnetcdf-1.12.2/test/nc4'
make[1]: *** [Makefile:780: ptests] Error 1
make[1]: Leaving directory '/media/case/work/hwrf/libraries/source/pnetcdf-1.12.2/test'
make: *** [Makefile:965: ptests] Error 1
Heres the test that is failing (GitHub link): tst_rec_vars.c
It seems that the test is checking a NetCDF file for the lenth of dimension in it. I assume the NetCDF file it is checking is tst_rec_vars.nc. The output of ncdump -h on this file is given below:
netcdf tst_rec_vars {
dimensions:
X = UNLIMITED ; // (4 currently)
variables:
int U(X) ;
int V(X) ;
}
That is, the NetCDF file's X dimension indeed has a length 4, although the test program beleives it is only 3. But, if I were to run the test manually as ./tst_rec_vars, it runs correctly.
*** TESTING C tst_rec_vars for record variables to NetCDF4 file ------ pass
Could it be due to parallel processing/threading? The test in question is run under a section titled test/nc4: Parallel testing on 4 MPI processes. I assume the NetCDF file was tested before it was formed completely, which could explain why I got a length 1 X dimension in the NetCDF file from ncdump at one point.
>>>ncdump -h tst_rec_vars.nc
netcdf tst_rec_vars {
dimensions:
X = UNLIMITED ; // (1 currently)
variables:
int U(X) ;
int V(X) ;
}
What exactly is going on here? How do I fix it?
Edit:
I'm trying to install it on CentOS 7, since I was encountering the above mentioned issue, I tried to install it on a Debian 11 system. But I am getting the very exact error in both systems.

AOSP Build TARGET_PRODUCT fails

I'm trying to build an external tool with AOSP. My OS is Linux, Distribution ArchLinux (i3wm), but to compile AOSP I use Ubuntu in Docker (https://android.googlesource.com/platform/build/+/master/tools/docker)
First step:
# init repo
repo init -u https://android.googlesource.com/platform/manifest -b android-8.0.0_r36 --depth=1
repo sync
. build/envsetup.sh # set up environment
lunch aosp_arm-eng # select target to build
Second step: select tool and build
cd external/selinux
mma -j48
Output:
ninja: error: unknown target 'MODULES-IN-'
15:41:55 ninja failed with: exit status 1
make: *** [run_soong_ui] Error 1
make: Leaving directory `/home/user/aosp'
#### make failed to build some targets (6 seconds) ###
Another tool
cd external/wpa_supplicant_8
mma -j48
Output:
ninja: error: unknown target 'MODULES-IN-external-wpa_supplicant_8'
15:41:55 ninja failed with: exit status 1
make: *** [run_soong_ui] Error 1
make: Leaving directory `/home/user/aosp'
#### make failed to build some targets (2 seconds) ###
This happens with any aosp generic target:
Lunch menu... pick a combo:
1. aosp_arm-eng # fails
2. aosp_arm64-eng # fails
3. aosp_mips-eng # fails
4. aosp_mips64-eng # fails
5. aosp_x86-eng # fails
6. aosp_x86_64-eng # fails
7. full_fugu-userdebug # works
8. aosp_fugu-userdebug # works
9. car_emu_arm64-userdebug # fails
10. car_emu_arm-userdebug # fails
11. car_emu_x86_64-userdebug # fails
12. car_emu_x86-userdebug # fails
13. mini_emulator_arm64-userdebug # fails
14. m_e_arm-userdebug # fails
15. m_e_mips64-eng # fails
16. m_e_mips-userdebug # fails
17. mini_emulator_x86_64-userdebug # fails
18. mini_emulator_x86-userdebug # fails
19. aosp_dragon-userdebug # works
20. aosp_dragon-eng # works
21. aosp_marlin-userdebug # works
22. aosp_marlin_svelte-userdebug # works
23. aosp_sailfish-userdebug # works
24. aosp_angler-userdebug # works
25. aosp_bullhead-userdebug # works
26. aosp_bullhead_svelte-userdebug # works
27. hikey-userdebug # works
I want to compile some binary tools in all arch: arm, arm64, x86 and x86_64.
Why aosp_arm-eng does not work? Or how can I change the CPU architecture from non generic aosp target?
Using tapas does not work.
You probably need to make a full AOSP build before trying to use mm... shortcuts - looks like some build script files were not generated yet.
clear all the binaries from /out dir with make clean command & then try to make a full build
Actually there is no need to do a full build. Just open your Android.mk or Android.bp of the module you want to build, and look for variable MODULE_NAME.
Then from the root of the project make
mm $MODULE_NAME
It should build all the dependencies you need first.
I suggest that use the mmm command for building. Also make sure that the directory you are pointing to contains a Android.bp or Android.mk
mmm /external/selinux
Also I suggest to clean the outputs by remove the out directory or simply run:
make clean
If still you have that problem, remove the --depth=1 argument on repo init and sync it again. that argument limits the commit fetching from remote branch.
Use below commands to compile module from root dir
Goto root dir
make clean
source build/envsetup.sh
lunch "select option"
make "module name" -j8

XLConnect, rJava and package building

I am writing a function that i want to include in a user-defined package (MYPACKAGE). The function is a follows:
readSchedule <- function(FILE){
WB = loadWorkbook(FILE)
WS= readWorksheet(WB, sheet = 'Sheet1',header = TRUE)
return(WS)
}
where FILE is the name of the Excel file i want to read. When writing this function, I want it to import XLConnect, since that is the package it uses. I placed header code defining the function:
#param FILE Excel file
#return Excel data
#export
#import XLConnect
I have also added import(XLConnect) to the NAMESPACE and the DESCRIPTION file of MYPACKAGE. The package builds fine (or at least at first cut it appears to build OK) but when i run "Check Package" it fails and gives me the following error:
* installing *source* package 'MYPACKAGE' ...
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: No CurrentVersion entry in Software/JavaSoft registry! Try re-installing Java and make sure R and Java have matching architectures.
Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'
I have the correct version of Java and can load rJava just fine. i've tried importing rJava (similar to XLConnect) but i get the same error. Below is my sessionInfo:
R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] MYPACKAGE
loaded via a namespace (and not attached):
[1] chron_2.3-45 data.table_1.9.4 digest_0.6.8 lubridate_1.3.3 memoise_0.2.1 plyr_1.8.1
[7] Rcpp_0.11.1 reshape2_1.4 rJava_0.9-6 stringr_0.6.2 tools_3.1.2 XLConnect_0.2-7
It looks like you are building your package on a Windows 64-bit machine with a 64-bit version of Java installed. When checking your package using R CMD check, R by default also attempts to check your package on other sub-architectures (i386, 32-bit) which in your case would in addition require a 32-bit installation of Java.
If you want to check your package also for i386 you may just additionally install Java 32-bit. The other option is to pass the option --no-multiarch to your R CMD check call, e.g. R CMD check --no-multiarch MYPACKAGE.

Problems with mod_auth_token installation

TOOLS
apache2 -v : Server version: Apache/2.4.7 (Ubuntu)
ubuntu 14.04 LTS
I'd like to install mod_auth_token to secure some of my files but I'm having problems with the first command I need to run:
Command
./configure
Error message
configure: error: APXS not found in $PATH, please use with-apxs to specify the location of the apxs binary
Except that locate apxs returns none so I guess it's nowhere and
echo $PATH -> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
Any ideas ?
UPDATE1
Found it, apxs2 was missing, to add it apt-get install apache2-dev
But now when I run make or make check or make install I get a warning and the installation stops:
mod_auth_token.c:65:3: warning: missing sentinel in funcgtion call [ -Wformat=]
ap_set_string_slot(cmd, config, apr_pstrcat(cmd->pool, arg, '/'));
^
Code
if (arg[len -1] != '/') {
/*here*/ ap_set_string_slot(cmd, config, apr_pstrcat(cmd->pool, arg, '/'));
conf->prefix_len = len + 1;
....
I was having this issue and developer here figured this for me (thanks Bill!).
According to Apache Docs https://apr.apache.org/docs/apr/1.6/group__apr__strings.html#ga7bd80c95ffb7b3f96bc78e7b5b5b0045 "The final string must be NULL"
He changed that line to:
ap_set_string_slot(cmd, config, apr_pstrcat(cmd->pool, arg, '/', NULL));
and it compiled.

ghc: unable to load package `snap-core-0.9.4.1'

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.

Resources