Building Yesod on FreeBSD

Posted Tuesday, April 8th 2014 in FreeBSD - Permalink

As of this writing, building Yesod on FreeBSD is kind of a pain. The problem comes from some dependencies of Yesod being out-of-date when installed from ports. I would get errors saying that I should install some dependencies by installing them from system packages. Doing this would not resolve the problem, since the packages were several version out-of-date.

These packages are lifted-base, primitive, and skein. After I tried installing Yesod, and I saw the error messages, trying to install them would always fail. You need to cabal install these three dependencies after a clean Haskell install.

I also noticed that using an updated version of cabal-install caused the code to fail. The version in FreeBSD Ports is 1.16, while the current version from cabal is 1.18. Do not install the update version.

To clean your install and install these libraries, you can run

# pkg delete ghc hs-\*
% rm -r ~/.ghc ~/.cabal
# pkg install hs-cabal-install
% cabal update
% cabal install lifted-base
% cabal install primitive
% cabal install skein
% cabal install yesod-bin

List Posts Newest Posts Page 1Next Page