You are not logged in.

#1 2017-10-23 12:56:44

ljwall
Member
Registered: 2017-10-10
Posts: 10

[solved] xmonad trouble following update (missing haskell packages)

Hello,

Last night I did `pacman -Syu`, with the following upgrades:

[2017-10-22 21:21] [PACMAN] Running 'pacman -Syu'
[2017-10-22 21:21] [PACMAN] synchronizing package lists
[2017-10-22 21:22] [PACMAN] starting full system upgrade
[2017-10-22 21:22] [ALPM] transaction started
[2017-10-22 21:22] [ALPM] upgraded ncurses (6.0+20170902-1 -> 6.0+20170902-2)
[2017-10-22 21:22] [ALPM] upgraded ghc-libs (8.2.1-2 -> 8.2.1-3)
[2017-10-22 21:22] [ALPM] upgraded ghc (8.2.1-2 -> 8.2.1-3)
[2017-10-22 21:22] [ALPM] upgraded linux (4.13.7-1 -> 4.13.8-1)

Following this, `xmonad --recompile` seems to be no longer working. Fairly sure I've not done anything else that would have broken this.

I get this:

➜  ~ xmonad --recompile
Error detected while loading xmonad configuration file: /home/liam/.xmonad/xmonad.hs

xmonad.hs:1:1: error:
    Could not find module ‘XMonad’
    Use -v to see a list of the files searched for.
  |
1 | import XMonad
  | ^^^^^^^^^^^^^

xmonad.hs:2:1: error:
    Could not find module ‘XMonad.StackSet’
    Use -v to see a list of the files searched for.
  |
2 | import XMonad.StackSet
  | ^^^^^^^^^^^^^^^^^^^^^^

xmonad.hs:3:1: error:
    Could not find module ‘XMonad.Config.Desktop’
    Use -v to see a list of the files searched for.
  |
3 | import XMonad.Config.Desktop
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

xmonad.hs:4:1: error:
    Could not find module ‘XMonad.Hooks.DynamicLog’
    Use -v to see a list of the files searched for.
  |
4 | import XMonad.Hooks.DynamicLog
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

xmonad.hs:5:1: error:
    Could not find module ‘XMonad.Hooks.ManageDocks’
    Use -v to see a list of the files searched for.
  |
5 | import XMonad.Hooks.ManageDocks
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

xmonad.hs:6:1: error:
    Could not find module ‘XMonad.Util.Run’
    Use -v to see a list of the files searched for.
  |
6 | import XMonad.Util.Run(spawnPipe)
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

xmonad.hs:7:1: error:
    Could not find module ‘XMonad.Util.EZConfig’
    Use -v to see a list of the files searched for.
  |
7 | import XMonad.Util.EZConfig (additionalKeys)
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Please check the file for errors.

xmonad: xmessage: executeFile: does not exist (No such file or directory)

I've tried compiling my xmonad.hs directly with ghc (in order to be able to use -v option) and get this (clipped for brevity). Without the -dynamic flag it also does not fin Prelude or System.IO, but it was like this before anyway, so don't think this is the issue.

➜  ~ ghc -dynamic -v ~/.xmonad/xmonad.hs
Glasgow Haskell Compiler, Version 8.2.1, stage 2 booted by GHC version 8.2.1
Using binary package database: /usr/lib/ghc-8.2.1/package.conf.d/package.cache
package flags []
loading package database /usr/lib/ghc-8.2.1/package.conf.d
wired-in package ghc-prim mapped to ghc-prim-0.5.1.0
wired-in package integer-gmp mapped to integer-gmp-1.0.1.0
wired-in package base mapped to base-4.10.0.0
wired-in package rts mapped to rts
wired-in package template-haskell mapped to template-haskell-2.12.0.0
wired-in package ghc mapped to ghc-8.2.1
wired-in package dph-seq not found.
wired-in package dph-par not found.
package flags []
loading package database /usr/lib/ghc-8.2.1/package.conf.d
wired-in package ghc-prim mapped to ghc-prim-0.5.1.0
wired-in package integer-gmp mapped to integer-gmp-1.0.1.0
wired-in package base mapped to base-4.10.0.0
wired-in package rts mapped to rts-1.0
wired-in package template-haskell mapped to template-haskell-2.12.0.0
wired-in package ghc mapped to ghc-8.2.1
wired-in package dph-seq not found.
wired-in package dph-par not found.
*** Chasing dependencies:
Chasing modules from: *xmonad.hs
!!! Chasing dependencies: finished in 1.09 milliseconds, allocated 0.843 megabytes
Stable obj: []
Stable BCO: []
Ready for upsweep
  [NONREC
      ModSummary {
         ms_hs_date = 2017-10-23 12:31:57.417791492 UTC
         ms_mod = Main,
         ms_textual_imps = [(Nothing, Prelude), (Nothing, Data.List),
                            (Nothing, System.IO), (Nothing, XMonad.Util.EZConfig),
                            (Nothing, XMonad.Util.Run), (Nothing, XMonad.Hooks.ManageDocks),
                            (Nothing, XMonad.Hooks.DynamicLog),
                            (Nothing, XMonad.Config.Desktop), (Nothing, XMonad.StackSet),
                            (Nothing, XMonad)]
         ms_srcimps = []
      }]
*** Deleting temp files:
Deleting: 
compile: input file xmonad.hs
*** Checking old interface for Main (use -ddump-hi-diffs for more details):
[1 of 1] Compiling Main             ( xmonad.hs, xmonad.o )
*** Parser [Main]:
!!! Parser [Main]: finished in 12.00 milliseconds, allocated 1.882 megabytes
*** Renamer/typechecker [Main]:
!!! Renamer/typechecker [Main]: finished in 2.00 milliseconds, allocated 2.443 megabytes

xmonad.hs:1:1: error:
    Could not find module ‘XMonad’
    Locations searched:
      XMonad.hs
      XMonad.lhs
      XMonad.hsig
      XMonad.lhsig
  |
1 | import XMonad
  | ^^^^^^^^^^^^^

Relavant packages I have on my system are:

➜  ~ pacman -Q | grep xmonad         
xmonad 0.13-9
xmonad-contrib 0.13-7
xmonad-utils 0.1.3.3-3
➜  ~ pacman -Q | grep ghc   
ghc 8.2.1-3
ghc-libs 8.2.1-3
➜  ~ pacman -Q | grep haskell
haskell-async 2.1.1.1-4
haskell-attoparsec 0.13.2.0-4
haskell-cereal 0.5.4.0-4
haskell-data-default 0.7.1.1-9
haskell-data-default-class 0.1.2.0-5
haskell-data-default-instances-containers 0.0.1-17
haskell-data-default-instances-dlist 0.0.1-22
haskell-data-default-instances-old-locale 0.0.1-17
haskell-dbus 0.10.13-6
haskell-dlist 0.8.0.3-3
haskell-extensible-exceptions 0.1.1.4-17
haskell-hashable 1.2.6.1-3
haskell-hinotify 0.3.9-5
haskell-http 4000.3.7-5
haskell-integer-logarithms 1.0.2-3
haskell-libmpd 0.9.0.7-1
haskell-libxml-sax 0.7.5-9
haskell-mtl 2.2.1-9
haskell-network 2.6.3.2-4
haskell-network-uri 2.6.1.0-7
haskell-old-locale 1.0.0.7-11
haskell-old-time 1.1.0.3-11
haskell-parsec 3.1.11-6
haskell-primitive 0.6.2.0-4
haskell-random 1.1-9
haskell-regex-base 0.93.2-29
haskell-regex-compat 0.95.1-9
haskell-regex-posix 0.95.2-18
haskell-scientific 0.3.5.2-2
haskell-setlocale 1.0.0.5-3
haskell-stm 2.4.4.1-6
haskell-text 1.2.2.2-4
haskell-utf8-string 1.0.1.1-5
haskell-vector 0.12.0.1-4
haskell-x11 1.8-5
haskell-x11-xft 0.3.1-29
haskell-xml-types 0.3.6-9

Any help much appreciated!

Thanks,

Last edited by ljwall (2017-10-23 21:59:49)

Offline

#2 2017-10-23 21:58:01

ljwall
Member
Registered: 2017-10-10
Posts: 10

Re: [solved] xmonad trouble following update (missing haskell packages)

Okay, in case anyone else experiences similar issues, this is what the issue seemed to be: The arch package ghc-libs (8.2.1) updates the file /usr/lib/ghc-8.2.1/package.conf.d/package.cache, which is used by ghc to know what Haskell packages are available.

`ghc-pkg list` will list the packages ghc thinks are available to use. xmonad should be listed there. It was not there for me.

Running `sudo ghc-pkg recache` to regenerate /usr/lib/ghc-8.2.1/package.conf.d/package.cache fixed the issue.

`ghc-pkg list` now lists xmonad and xmonad-contrib, and `xmonad --recompile` works as expected.

Offline

#3 2017-10-28 12:04:05

Maeda
Member
Registered: 2015-02-17
Posts: 44

Re: [solved] xmonad trouble following update (missing haskell packages)

Thanks. Fixes my problem too.
My xmonad compilation failed just after updating to latest ghc 8.2.1-3.
Solved by a

ghc-pkg recache

Offline

Board footer

Powered by FluxBB