Troubles compiling pulp
I'm having troubles compiling pulp on my Arch Linux machine:
[pulp]$ cabal install .
cabal: Could not resolve dependencies:
[__0] trying: pulp-0.0 (user goal)
[__1] next goal: regex-posix (dependency of pulp)
[__1] rejecting: regex-posix-0.96.0.0 (conflict: pulp => regex-posix>=0.95 &&
<0.96)
[__1] trying: regex-posix-0.95.2
[__2] next goal: base (dependency of pulp)
[__2] rejecting: base-4.13.0.0/installed-4.13.0.0 (conflict: regex-posix
+/-newbase +/-splitbase => base<4.13)
[__2] rejecting: base-4.12.0.0, base-4.11.1.0, base-4.11.0.0, base-4.10.1.0,
base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0, base-4.8.1.0,
base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0, base-4.6.0.1,
base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0, base-4.4.0.0,
base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1, base-4.2.0.0,
base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1 (constraint from
non-upgradeable package requires installed instance)
[__2] fail (backjumping, conflict set: base, pulp, regex-posix)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, pulp, regex-posix
Versions of regex-posix <0.96 have a bound on base <4.13, but the GHC I got in both cases is version 8.8.3 and base-4.13.0.0.
Tried removing the regex-posix <0.96 bound, but then things fail:
bin/Config.hs:318:9: error:
• No instance for (MonadFail (Either [String]))
arising from a do statement
with the failable pattern ‘Regex r’
• In a stmt of a 'do' block: Regex r <- satisfy "a regex" isRegex
In the expression:
do Regex r <- satisfy "a regex" isRegex
return . Atom . f $ r
In an equation for ‘regex’:
regex f
= do Regex r <- satisfy "a regex" isRegex
return . Atom . f $ r
|
318 | Regex r <- satisfy "a regex" isRegex
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
So I tried downgrading GHC to 8.6.1 (from Sept 2018), thus base 4.12.
ghcup install 8.6.1
ghcup set 8.6.1
However, even this doesn't seem enough. This installs regex-posix-0.95.2, which causes the build of pulp to fail in the same way as 0.96.0.0:
[pulp]$ cabal install .
[...]
Completed regex-posix-0.95.2 (all, legacy fallback)
[...]
bin/Config.hs:318:9: error:
• No instance for (Control.Monad.Fail.MonadFail (Either [String]))
arising from a do statement
with the failable pattern ‘Regex r’
• In a stmt of a 'do' block: Regex r <- satisfy "a regex" isRegex
In the expression:
do Regex r <- satisfy "a regex" isRegex
return . Atom . f $ r
In an equation for ‘regex’:
regex f
= do Regex r <- satisfy "a regex" isRegex
return . Atom . f $ r
|
318 | Regex r <- satisfy "a regex" isRegex
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Unfortunately regex-posix-0.95.1 would require base<4.6, so GHC 7.4.2 (Jun 2012). There's no way I can still go back so much back in time, sorry.
Fortunately didn't need to go back all the way to GHC 7.4.2 (Jun 2012), but only to GHC 8.4.4 (2018), which seems to compile pulp just fine.
[pulp]$ cabal install .
Wrote tarball sdist to
/home/hritcu/Apps/pulp/dist-newstyle/sdist/pulp-0.0.tar.gz
Resolving dependencies...
Build profile: -w ghc-8.4.4 -O1
In order, the following will be built (use -v for more details):
- regex-base-0.93.2 (lib:regex-base) (requires build)
- split-0.2.3.4 (lib) (requires build)
- universe-base-1.0.2.1 (lib) (requires build)
- void-0.7.3 (lib) (requires build)
- regex-posix-0.95.2 (lib:regex-posix) (requires build)
- universe-instances-base-1.0 (lib) (requires build)
- pulp-0.0 (lib) (requires build)
- universe-reverse-instances-1.0 (lib) (requires build)
- pulp-0.0 (exe:pulp) (requires build)
Starting regex-base-0.93.2 (all, legacy fallback)
Starting universe-base-1.0.2.1 (lib)
Starting void-0.7.3 (lib)
Starting split-0.2.3.4 (lib)
Building regex-base-0.93.2 (all, legacy fallback)
Building void-0.7.3 (lib)
Building universe-base-1.0.2.1 (lib)
Building split-0.2.3.4 (lib)
Installing void-0.7.3 (lib)
Installing universe-base-1.0.2.1 (lib)
Completed void-0.7.3 (lib)
Completed universe-base-1.0.2.1 (lib)
Starting universe-instances-base-1.0 (lib)
Installing split-0.2.3.4 (lib)
Building universe-instances-base-1.0 (lib)
Completed split-0.2.3.4 (lib)
Installing regex-base-0.93.2 (all, legacy fallback)
Completed regex-base-0.93.2 (all, legacy fallback)
Starting regex-posix-0.95.2 (all, legacy fallback)
Installing universe-instances-base-1.0 (lib)
Completed universe-instances-base-1.0 (lib)
Starting universe-reverse-instances-1.0 (lib)
Building regex-posix-0.95.2 (all, legacy fallback)
Building universe-reverse-instances-1.0 (lib)
Installing universe-reverse-instances-1.0 (lib)
Completed universe-reverse-instances-1.0 (lib)
Installing regex-posix-0.95.2 (all, legacy fallback)
Completed regex-posix-0.95.2 (all, legacy fallback)
Starting pulp-0.0 (lib)
Building pulp-0.0 (lib)
Installing pulp-0.0 (lib)
Completed pulp-0.0 (lib)
Starting pulp-0.0 (exe:pulp)
Building pulp-0.0 (exe:pulp)
Installing pulp-0.0 (exe:pulp)
Completed pulp-0.0 (exe:pulp)
Symlinking 'pulp'