Installing tidal from source on archlinux


Recently I tried to install tidal from sources in order to test unreleased features (looking at you, extract).

Unfortunately I could not make it work. Apparently, the way haskell libraries are packaged on archlinux is rather involved (and way above my head). Here is a snippet from the official haskell-tidal package:

  runhaskell Setup configure -O \
                             --enable-shared \
                             --enable-executable-dynamic \
                             --disable-library-vanilla \
                             --prefix=/usr \
                             --docdir="/usr/share/doc/${pkgname}" \
                             --enable-tests \
                             --dynlibdir=/usr/lib \

So I've made a few modifications to the official haskell-tidal arch package so it installs from git master instead of realease 1.6.1. It is here, if anyone is interested.

For further reference, here is the error I get when trying to install from source:

$ cabal install --lib
cabal: Could not resolve dependencies:
[__0] trying: tidal-1.6.2 (user goal)
[__1] trying: bifunctors-5.5.8/installed-G2ohmCwfIb36bk3sGXZFKJ (dependency of
[__2] trying: template-haskell- (dependency of
[__3] trying: base- (dependency of tidal)
[__4] next goal: tidal-parse (user goal)
[__4] rejecting: tidal-parse-0.0.1 (conflict: bifunctors =>
template-haskell==, tidal-parse =>
template-haskell>= && <2.15)
[__4] fail (backjumping, conflict set: bifunctors, tidal-parse)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: tidal, base, bifunctors,
template-haskell, tidal-parse
Try running with --minimize-conflict-set to improve the error message.
1 Like

Could you resolve this? Is this about how to modify the arch linux package (then: can you build the unmodified package?) or how to build on your own? (then: try adding --allow-newer to cabal install --lib)

Of course that's risky (not reproducible) because it will use libary versions that cabal thinks are "newest" at build time. In fact, not necessarily "use" but "consider for dependency resolution".

No I could not solve the problem. My haskell knowledge is old and rusty, and my cabal knowledge completely inexistent ...

Arch has the issue where it packages Haskell stuff to compile dynamically. The only way I found around it back when I was installing Tidal from source on it (before there was an offcial package) was to install ghc-pristine from the AUR and point cabal to use the ghc symlink as the compiler. I basically did it straight out of the wiki.

thanks for the info, it explains a lot!