xmonad/xmonad-extras

Cabal failed install

Closed this issue · 9 comments

Usually when install xmonad-extras, it just works.
This time it did not.
Was able to make is work in the end but perhaps something to look into:

OS: 4.7.1-1-ARCH

cabal install xmonad-extras/
Resolving dependencies...
Downloading alsa-core-0.5.0.1...
Downloading regex-posix-0.95.2...
Configuring regex-posix-0.95.2...
Configuring alsa-core-0.5.0.1...
Building regex-posix-0.95.2...
Building alsa-core-0.5.0.1...
Installed alsa-core-0.5.0.1
Downloading alsa-mixer-0.2.0.3...
Configuring alsa-mixer-0.2.0.3...
Failed to install alsa-mixer-0.2.0.3
Build log ( /home/dvmacias/.cabal/logs/alsa-mixer-0.2.0.3.log ):
cabal: Entering directory '/tmp/cabal-tmp-30318/alsa-mixer-0.2.0.3'
Configuring alsa-mixer-0.2.0.3...
cabal: The program 'c2hs' is required but it could not be found.
cabal: Leaving directory '/tmp/cabal-tmp-30318/alsa-mixer-0.2.0.3'
Installed regex-posix-0.95.2
cabal: Error: some packages failed to install:
alsa-mixer-0.2.0.3 failed during the configure step. The exception was:
ExitFailure 1
xmonad-extras-0.12.1 depends on alsa-mixer-0.2.0.3 which failed to install.

So attempted to install alsa-mixer-0.2.0.3:

cabal install alsa-mixer-0.2.0.3
Resolving dependencies...
Configuring alsa-mixer-0.2.0.3...
Failed to install alsa-mixer-0.2.0.3
Build log ( /home/dvmacias/.cabal/logs/alsa-mixer-0.2.0.3.log ):
cabal: Entering directory '/tmp/cabal-tmp-32293/alsa-mixer-0.2.0.3'
Configuring alsa-mixer-0.2.0.3...
cabal: The program 'c2hs' is required but it could not be found.
cabal: Leaving directory '/tmp/cabal-tmp-32293/alsa-mixer-0.2.0.3'
cabal: Error: some packages failed to install:
alsa-mixer-0.2.0.3 failed during the configure step. The exception was:
ExitFailure 1

So then installed c2hs:

cabal install c2hs
Resolving dependencies...
Downloading syb-0.6...
Configuring syb-0.6...
Building syb-0.6...
Installed syb-0.6
Downloading language-c-0.5.0...
Configuring language-c-0.5.0...
Building language-c-0.5.0...
Installed language-c-0.5.0
Downloading c2hs-0.28.1...
Configuring c2hs-0.28.1...
Building c2hs-0.28.1...
Installed c2hs-0.28.1

after that xmonad-extras installed properly:

cabal install xmonad-extras/
Resolving dependencies...
Configuring alsa-mixer-0.2.0.3...
Building alsa-mixer-0.2.0.3...
Installed alsa-mixer-0.2.0.3
Configuring xmonad-extras-0.12.1...
Building xmonad-extras-0.12.1...
Installed xmonad-extras-0.12.1

Thanks!

-Dave

Thanks for the report. If only we could do something about it, but alas, cabal cannot keep track of or automatically install executable dependencies, so there is not really anything we can do to improve things. Glad you got it figured out though.

Er, that's not entirely true. It is possible to declare c2hs as a required tool, and cabal will try to install it. The usual failure mode is that, if $HOME/.cabal/bin is not already on $PATH, it will install it and then fail to find it afterward because it only searches $PATH.

Ah, thanks for the clarification. But in that case I don't understand what's going on here. alsa-mixer does already declare c2hs as a required build tool: see http://hackage.haskell.org/package/alsa-mixer-0.2.0.3/alsa-mixer.cabal . But since @davama fixed it by just cabal install c2hs, apparently without needing to fiddle with $PATH, based on what you said I don't understand why cabal couldn't do that itself in the first place.

So, I just went digging and found out this is even less well defined than I thought; it's not in general smart enough to install these packages, you need to also list them in build-depends or use the sort of setup-depends hackery that gtk2hs does (which is overkill for xmonad stuff; we don't generate source as part of Setup).

Thanks for all the updates.
Just FYI my path does point to .cabal/bin. It has always been this way since i build xmonad from source.

PATH =

/home/dvmacias/.cabal/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

Thanks

Why am I getting this error:

xmonad-0.12 depends on X11-1.6.1.2 which failed to install.
xmonad-contrib-0.12 depends on X11-1.6.1.2 which failed to install.
xmonad-extras-0.12.1 depends on X11-1.6.1.2 which failed to install.

Hi @IgorGanapolsky , it's hard to say, we would need to see the rest of the log to see why installation of X11-1.6.1.2 failed.

On Mon, Oct 24, 2016 at 2:08 PM, Igor Ganapolsky notifications@github.com
wrote:

Why am I getting this error:

xmonad-0.12 depends on X11-1.6.1.2 which failed to install.
xmonad-contrib-0.12 depends on X11-1.6.1.2 which failed to install.
xmonad-extras-0.12.1 depends on X11-1.6.1.2 which failed to install.

Something went wrong earlier. You'd have to provide the full build logs
somewhere.

brandon s allbery kf8nh sine nomine associates
allbery.b@gmail.com ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Hi,

I'm getting similar errors, but after installing all the packages, I still get a 'not in scope' error.

I've installed happy, alex, language-c, c2hs, alsa-mixer. Then, with
sudo cabal install xmonad-extras
I'm still getting

Resolving dependencies...
Configuring xmonad-extras-0.15.2...
Building xmonad-extras-0.15.2...
Failed to install xmonad-extras-0.15.2
Build log ( /home/yige/.cabal/logs/xmonad-extras-0.15.2.log ):
cabal: Entering directory '/tmp/cabal-tmp-9758/xmonad-extras-0.15.2'
Configuring xmonad-extras-0.15.2...
Building xmonad-extras-0.15.2...
Preprocessing library xmonad-extras-0.15.2...
[1 of 7] Compiling XMonad.Util.WindowPropertiesRE ( XMonad/Util/WindowPropertiesRE.hs, dist/build/XMonad/Util/WindowPropertiesRE.o )

XMonad/Util/WindowPropertiesRE.hs:51:20: error:
    Not in scope: data constructor ‘Tagged’
cabal: Leaving directory '/tmp/cabal-tmp-9758/xmonad-extras-0.15.2'
cabal: Error: some packages failed to install:
xmonad-extras-0.15.2 failed during the building phase. The exception was:
ExitFailure 1

I'm not quite sure what should I do to fix it.

Thanks!