Search code examples
haskellwxwidgetscabalwxhaskell

Is wxHaskell unusable for the moment?


I'm on Ubuntu 21.04 "Hirsute Hippo", GHC 8.8.4, and Cabal 3.0.0.0. I cannot install the wx package.

When I tried cabal install wx --lib directly, the following messages were outputted:

Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: wx-0.92.3.0 (user goal)
[__1] trying: wxcore-0.92.3.0 (dependency of wx +/-splitbase)
[__2] trying: wxdirect-0.92.3.0 (dependency of wxcore)
[__3] trying: strict-0.4.0.1 (dependency of wxdirect)
[__4] trying: text-1.2.4.0/installed-1.2... (dependency of strict)
[__5] next goal: binary (dependency of strict)
[__5] rejecting: binary-0.8.7.0/installed-0.8... (conflict: wxcore
+/-splitbase => containers>=0.1 && <0.6, binary =>
containers==0.6.2.1/installed-0.6...)
[__5] rejecting: binary-0.8.8.0, binary-0.8.7.0, binary-0.8.6.0,
binary-0.8.5.1, binary-0.8.5.0, binary-0.8.4.1, binary-0.8.4.0,
binary-0.8.3.0, binary-0.8.2.1, binary-0.8.2.0, binary-0.8.1.0,
binary-0.8.0.1, binary-0.8.0.0, binary-0.7.6.1, binary-0.7.6.0,
binary-0.7.5.0, binary-0.7.4.0, binary-0.7.3.0, binary-0.7.2.3,
binary-0.7.2.2, binary-0.7.2.1, binary-0.7.2.0, binary-0.7.1.0,
binary-0.7.0.1, binary-0.7.0.0, binary-0.6.4.0, binary-0.6.3.0,
binary-0.6.2.0, binary-0.6.1.0, binary-0.6.0.0, binary-0.5.1.1,
binary-0.5.1.0, binary-0.5.0.2, binary-0.5.0.1, binary-0.5, binary-0.4.5,
binary-0.4.4, binary-0.4.3.1, binary-0.4.3, binary-0.4.2, binary-0.4.1,
binary-0.4, binary-0.3, binary-0.2, binary-0.10.0.0, binary-0.9.0.0 (conflict:
text => binary==0.8.7.0/installed-0.8...)
[__5] fail (backjumping, conflict set: binary, strict, text, wxcore)
Backjump limit reached (currently 4000, change with --max-backjumps or try to
run with --reorder-goals).

So I tried cabal install wx --lib --max-backjumps 8192 instead. It didn't help:

Resolving dependencies...
Build profile: -w ghc-8.8.4 -O1
In order, the following will be built (use -v for more details):
- old-locale-1.0.0.7 (lib) (requires build)
- old-time-1.1.0.3 (lib:old-time) (requires build)
- wxcore-0.11.1.2 (lib:wxcore) (requires build)
- wx-0.11.1.2 (lib:wx) (requires build)
Starting     old-locale-1.0.0.7 (lib)
Building     old-locale-1.0.0.7 (lib)
Installing   old-locale-1.0.0.7 (lib)
Completed    old-locale-1.0.0.7 (lib)
Starting     old-time-1.1.0.3 (all, legacy fallback)
Building     old-time-1.1.0.3 (all, legacy fallback)
Installing   old-time-1.1.0.3 (all, legacy fallback)
Completed    old-time-1.1.0.3 (all, legacy fallback)
Starting     wxcore-0.11.1.2 (all, legacy fallback)
cabal: Failed to build wxcore-0.11.1.2 (which is required by wx-0.11.1.2). The
failure occurred during the configure step. The build process terminated with
exit code 2

It seems that wx is no longer updated since containers went to version 0.6. That's the major culprit of this dependency hell.

Does anyone know how to resolve this? Or is wx unusable for now? I sent a message to wxHaskell mailing list, but they didn't respond.


Solution

  • Or is wx unusable for now?

    Yes, it's currently unmaintained, and the version bounds are more or less correct. The code on the GitHub repository is a bit more up to date than the code on Hackage, and compiles with a more recent GHC version, but still fails on the current one.

    Unless you're willing to to bring wxHaskell up to date with the ecosystem (well, or to use an old GHC), you're probably better off trying another UI library.