Hi Sean,<br><br>I suspected sandboxing was involved!<br>Thanks for the pointer :)<br><br>Alfredo<br><br>On Tuesday, 14 October 2014, Sean Leather <<a href="mailto:sean.leather@gmail.com">sean.leather@gmail.com</a>> wrote:<br>> Hi Alfredo,<br>>><br>>> I will let this gist talk for me:<br>>><br>>> <a href="https://gist.github.com/adinapoli/d4c33a9d1ea85bcaebdf">https://gist.github.com/adinapoli/d4c33a9d1ea85bcaebdf</a><br>>><br>>> 1) Shed some light on my specific use case: Can I do better here? (aka have GHC figure out automatically all the nitty gritty details)<br>><br>> You're installing into a cabal sandbox and compiling directly with ghc (not cabal), but ghc doesn't know anything about the sandbox. You need to point it to the package database with -package-db and tell it the package for linking with -package [2].<br>> $ ghc -package-db .cabal-sandbox/x86_64-osx-ghc-7.8.3-packages.conf.d -package snappy HelloSnappy.hs<br>> Linking HelloSnappy ...<br>> $ ./HelloSnappy<br>> HelloSnappy: foo.jpg: openBinaryFile: does not exist (No such file or directory)<br>> [1] <a href="http://www.haskell.org/ghc/docs/latest/html/users_guide/packages.html#package-databases">http://www.haskell.org/ghc/docs/latest/html/users_guide/packages.html#package-databases</a><br>> [2] <a href="http://www.haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#options-linker">http://www.haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#options-linker</a><br>> Regards,<br>> Sean