I was trying to install the threadscope package using cabal but got an error about cabal being too outdated:
cabal: Error: some packages failed to install:
cairo-0.13.8.0 failed during the configure step. The exception was:
user error (The package 'cairo' requires Cabal library version -any && >=1.24
but no suitable version is installed.)
gio-0.13.8.0 depends on glib-0.13.8.0 which failed to install.
glib-0.13.8.0 failed during the configure step. The exception was:
user error (The package 'glib' requires Cabal library version -any && >=1.24
but no suitable version is installed.)
gtk-0.14.7 depends on glib-0.13.8.0 which failed to install.
pango-0.13.8.0 depends on glib-0.13.8.0 which failed to install.
threadscope-0.2.11.1 depends on glib-0.13.8.0 which failed to install.
but when I try cabal install cabal-install I get:
Resolving dependencies...
Configuring Cabal-3.0.0.0...
Failed to install Cabal-3.0.0.0
Build log ( /home/ignacio/.cabal/logs/Cabal-3.0.0.0.log ):
cabal: Error: some packages failed to install:
Cabal-3.0.0.0 failed during the configure step. The exception was:
user error ('/usr/bin/ghc' exited with an error:
/tmp/cabal-tmp-19678/Cabal-3.0.0.0/Distribution/Parsec.hs:134:0:
error: missing binary operator before token "("
#if !(MIN_VERSION_base(4,13,0))
^
)
cabal-install-3.0.0.0 depends on Cabal-3.0.0.0 which failed to install.
hackage-security-0.5.3.0 depends on Cabal-3.0.0.0 which failed to install.
I'm on ubuntu 16.04
cabal-install version 1.22.6.0 using version 1.22.5.0 of the Cabal library
I would be very thankful if you could provide any help. (Sorry if I wrote something weird, english is not my native language and I'm kind of new to ubuntu)
The error you saw...
error: missing binary operator before token "(" #if !(MIN_VERSION_base(4,13,0)) ^ )
... mentioned one of the MIN_VERSION_
CPP macros](https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/phases.html#standard-cpp-macros), which are only available for GHC 8 and above. Presumably you had an older version in your system, which is why updating solved the problem. For a similar report elsewhere, see cabal issue #4092.