LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Trying to get xmonad to compile on slack (https://www.linuxquestions.org/questions/slackware-14/trying-to-get-xmonad-to-compile-on-slack-4175626557/)

vesperto 03-28-2018 04:48 PM

Trying to get xmonad to compile on slack
 
There's little to no information regarding this and most is outdated.

Yes, there's a slackbuild. The problem is that it doesn't quite work (or i'm doing something wrong). Once i start working through the dependencies, i install data-default-instances-base, but it depends on data-default-class-any. Well, i just installed data-default-class-any using pkgtool and the package generated in /tmp, it's in /usr/lib64/ghc-8.4.1/data-default-class-0.0.1. Some other haskell-* packages install ok, but i'm stuck here.

Then i saw this tutorial, but it breaks on haskell-syb with:
Code:

    Building library for syb-0.6..
    [ 1 of 16] Compiling Data.Generics.Aliases ( src/Data/Generics/Aliases.hs, dist/build/Data/Generics/Aliases.o )
    [ 2 of 16] Compiling Data.Generics.Basics ( src/Data/Generics/Basics.hs, dist/build/Data/Generics/Basics.o )
    [ 3 of 16] Compiling Data.Generics.Builders ( src/Data/Generics/Builders.hs, dist/build/Data/Generics/Builders.o )
    [ 4 of 16] Compiling Data.Generics.Instances ( src/Data/Generics/Instances.hs, dist/build/Data/Generics/Instances.o )

    src/Data/Generics/Instances.hs:73:10: error:
        * Illegal instance declaration for `Data TypeRep'
            (All instance types must be of the form (T t1 ... tn)
            where T is not a synonym.
            Use TypeSynonymInstances if you want to disable this.)
        * In the instance declaration for `Data TypeRep'
      |
    73 | instance Data TypeRep where
      |          ^^^^^^^^^^^^

So i'm stuck too.

Any less troublesome way of having xmonad on slack?

Didier Spaier 03-28-2018 05:02 PM

According to the sqg command from sbopkg you need to build and install one at a time, from top to bottom:
ghc
haskell-utf8-string
haskell-setlocale
haskell-mtl
haskell-extensible-exceptions
haskell-old-locale
haskell-data-default-class
haskell-data-default-instances-old-locale
haskell-dlist
haskell-data-default-instances-dlist
haskell-data-default-instances-containers
haskell-data-default-instances-base
haskell-data-default
haskell-X11
xmonad

vesperto 03-28-2018 05:55 PM

Quote:

Originally Posted by Didier Spaier (Post 5836675)
According to the sqg command from sbopkg you need to build and install one at a time, from top to bottom:

Thanks, but i barely get past the first package:
Code:

haskell-utf8-string
    requires base >=4.3 && <4.9

Installed haskell-base-compat-0.9.3, it was the closest i could find.
Code:

haskell-setlocale
    requires base >=4.6 && <4.11
haskell-mtl
    requires transformers ==0.4.*


Didier Spaier 03-28-2018 06:07 PM

I suggest that you email the maintainers of the SlackBuilds in concern about these issues then.

Also I am puzzled, as the build && install order according to sqg ciputed from the READMEs differs from the one mentioned in the tutorial.

musicfan 03-28-2018 07:02 PM

Your ghc version seems to be 8.4.1. ghc on Slackbuilds is 7.10.3. You will have either to downgrade it or change versions in SlackBuilds. Reading info on hackage might help. Someone even reported that xmonad 0.13 won't build on ghc 8.4.1. If you got your ghc by using haskell stack, then you can use it to build xmonad, as well. Keep in mind that xmonad installed in such manner, won't let you use xmonad --recompile and xmonad --restart, unless you write build file and put it inside ~/.xmonad directory. I'd gladly provide links, but as this is my first post, I am not allowed to do so.

If you never used xmonad before I'd like to make a suggestion: install xmonad-contrib and dmenu. I am also using xmobar(bar), unclutter(hide mouse when idle) and xdotool(allows you to make xmobar 'clickable'). All of these are available via slackbuilds.org. Also, ghc takes some time to compile (about four hours on my eight years old PC). Also for wrong dependency list, it was correct for xmonad 0.11 and ghc 7.8.4. Good luck.

vesperto 03-29-2018 03:04 AM

Quote:

Originally Posted by musicfan (Post 5836695)
Your ghc version seems to be 8.4.1. ghc on Slackbuilds is 7.10.3. You will have either to downgrade it or change versions in SlackBuilds. Reading info on hackage might help. Someone even reported that xmonad 0.13 won't build on ghc 8.4.1. If you got your ghc by using haskell stack, then you can use it to build xmonad, as well. Keep in mind that xmonad installed in such manner, won't let you use xmonad --recompile and xmonad --restart, unless you write build file and put it inside ~/.xmonad directory. I'd gladly provide links, but as this is my first post, I am not allowed to do so.

Actually i don't remember how i installed ghc. Either way i want to install xmonad, doesn't really matter how. Considering it's heavily based on haskell and compilation is sometimes required, using xmonad --recompile would be a plus.

Quote:

Originally Posted by musicfan (Post 5836695)
If you never used xmonad before I'd like to make a suggestion: install xmonad-contrib and dmenu. I am also using xmobar(bar), unclutter(hide mouse when idle) and xdotool(allows you to make xmobar 'clickable'). All of these are available via slackbuilds.org. Also, ghc takes some time to compile (about four hours on my eight years old PC). Also for wrong dependency list, it was correct for xmonad 0.11 and ghc 7.8.4. Good luck.

I've used it before, on gentoo, and it Just Worked™. I had dmenu and xmobar, i'll checkout the others (someday), thanks.

55020 03-29-2018 06:38 AM

versperto, you are doing it wrong. You need to use the exact versions in the SlackBuilds, and then it will Just Work on Slackware™.

To provide a consistent and stable build, we are on Haskell Platform 7.10.3 until the next Slackware release.

As Didier explained, you need to build and install these SlackBuilds in this order. There are lots of SlackBuilds tools (for example sbopkg with sqg) to help you do this.

ghc-7.10.3
haskell-utf8-string-1.0.1.1
haskell-setlocale-1.0.0.6
haskell-mtl-2.2.1
haskell-extensible-exceptions-0.1.1.4
haskell-old-locale-1.0.0.7
haskell-data-default-class-0.0.1
haskell-data-default-instances-old-locale-0.0.1
haskell-dlist-0.7.1
haskell-data-default-instances-dlist-0.0.1
haskell-data-default-instances-containers-0.0.1
haskell-data-default-instances-base-0.1.0
haskell-data-default-0.6.0
haskell-X11-1.6.1.2
xmonad-0.12

Edit: the Slackdocs tutorial is badly out of date and needs fixing :(

vesperto 04-01-2018 09:37 PM

After fighting with the installation of ghc proper (i had previously installed it through packages), and following this sequence, i got xmonad to work.
Thanks!


All times are GMT -5. The time now is 02:24 PM.