Reputation: 4440
I can compile Hakyll, but when I try to run it I get a linking error.
First I install Hakyll in a sandbox:
cabal sandbox init
cabal install Hakyll
This completes successfully.
Then I create a plain site using hakyll-init
and move the files up a directory:
.cabal-sandbox/bin/hakyll-init mysite
mv mysite/* .
rm -rf mysite
Then I try to run it with cabal exec -- runghc site.hs build
and I get:
site.hs: <command line>: can't load .so/.DLL for: /Users/john/repositories/CP/principles-of-concurrent-programming/Website/.cabal-sandbox/lib/x86_64-osx-ghc-8.2.1/libHSpandoc-citeproc-0.10.5.1-97wWmtk04v65Etcjop52Rs-ghc8.2.1.dylib (dlopen(/Users/john/repositories/CP/principles-of-concurrent-programming/Website/.cabal-sandbox/lib/x86_64-osx-ghc-8.2.1/libHSpandoc-citeproc-0.10.5.1-97wWmtk04v65Etcjop52Rs-ghc8.2.1.dylib, 5): no suitable image found. Did find:
/Users/john/repositories/CP/principles-of-concurrent-programming/Website/.cabal-sandbox/lib/x86_64-osx-ghc-8.2.1/libHSpandoc-citeproc-0.10.5.1-97wWmtk04v65Etcjop52Rs-ghc8.2.1.dylib: malformed mach-o: load commands size (32992) > 32768
/Users/john/repositories/CP/principles-of-concurrent-programming/Website/.cabal-sandbox/lib/x86_64-osx-ghc-8.2.1/libHSpandoc-citeproc-0.10.5.1-97wWmtk04v65Etcjop52Rs-ghc8.2.1.dylib: malformed mach-o: load commands size (32992) > 32768)
site.hs
are completely standard. I've uploaded the file to gist.Any help would be appreciated!
Upvotes: 1
Views: 269
Reputation: 4440
Although not exactly a solution to my problem, I managed to get around this by installing Hakyll through stack instead. For the record, these were my steps:
brew install haskell-stack
stack setup
stack install hakyll
Then to build the website:
stack exec -- runghc site.hs build
Upvotes: 2