1

This is on Mac OS X with brew installed ghc and cabal-install. latest versions. ghc 7.8.3

When I run cabal install lens I get this error output:

Resolving dependencies...
[1 of 1] Compiling Main             ( /var/folders/23/1yjxv_x14f1g817x9fz3wy500000gp/T/distributive-0.4.4-83867/distributive-0.4.4/dist/setup/setup.hs, /var/folders/23/1yjxv_x14f1g817x9fz3wy500000gp/T/distributive-0.4.4-83867/distributive-0.4.4/dist/setup/Main.o )
Linking /var/folders/23/1yjxv_x14f1g817x9fz3wy500000gp/T/distributive-0.4.4-83867/distributive-0.4.4/dist/setup/setup ...
Configuring distributive-0.4.4...
Building distributive-0.4.4...
Preprocessing library distributive-0.4.4...
[1 of 2] Compiling Data.Distributive.Generic ( src/Data/Distributive/Generic.hs, dist/build/Data/Distributive/Generic.o )
[2 of 2] Compiling Data.Distributive ( src/Data/Distributive.hs, dist/build/Data/Distributive.o )
ld: library not found for -lHStransformers-compat-0.3.3.4-ghc7.8.3
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Failed to install distributive-0.4.4
<snip>
Loading package primitive-0.5.3.0 ... <command line>: can't load .so/.DLL for: libHSprimitive-0.5.3.0.dylib (dlopen(libHSprimitive-0.5.3.0.dylib, 9): image not found)
Failed to install vector-0.10.12.2
cabal: Error: some packages failed to install:
<snip>

cabal -V yields:

cabal-install version 1.20.0.3
using version 1.20.0.2 of the Cabal library 
clay
  • 18,138
  • 28
  • 107
  • 192
  • Do you have `transformers-compat` installed? Try running `cabal update && cabal install transformers-compat` first. If you already have it installed, make sure that the library paths are in your `PATH` environment variable. – Arnon Dec 11 '14 at 05:46
  • Works fine here from OSX Yosemite and a clean install. Sorry :( – OmnipotentEntity Dec 11 '14 at 05:59
  • already did `cabal update` and I already have `transformers-compat` installed. I'm using OS X Yosemite as well. – clay Dec 11 '14 at 11:15

1 Answers1

0

GHC 7.8.3 distributes transformers-0.3.0.0 as a boot package, so you'll want to use these two packages:

transformers-0.3.0.0
transformers-compat-0.3.3.3

This this command when installing lens

cabal install --constraint=transformers\ installed lens

You can avoid replacing boot packages by adding global constraints to your ~/.cabal/config file by adding this line to the end of that file.

constraint: transformers installed
glguy
  • 1,090
  • 7
  • 8