LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-19-2021, 02:22 PM   #1
lancsuk
Member
 
Registered: Jul 2019
Location: Burnley / UK
Distribution: Slackware current
Posts: 226

Rep: Reputation: 204Reputation: 204Reputation: 204
Xmonad on Slackware current: haskell-setlocale Ponce failed


Hiya,

I would like to build Xmonad on Slackware current. I had some issues wiht ghc, I guess llvm 11 and ghc 8.10.3 does not work together.

Code:
echo 'export LD_LIBRARY_PATH="/tmp/SBo/ghc-8.4.3/libraries/ghci/dist-install/build:/tmp/SBo/ghc-8.4.3/libraries/transformers/dist-install/build:/tmp/SBo/ghc-8.4.3/libraries/template-haskell/dist-install/build:/tmp/SBo/ghc-8.4.3/libraries/pretty/dist-install/build:/tmp/SBo/ghc-8.4.3/libraries/ghc-boot/dist-install/build:/tmp/SBo/ghc-8.4.3/libraries/ghc-boot-th/dist-install/build:/tmp/SBo/ghc-8.4.3/libraries/directory/dist-install/build:/tmp/SBo/ghc-8.4.3/libraries/unix/dist-install/build:/tmp/SBo/ghc-8.4.3/libraries/filepath/dist-install/build:/tmp/SBo/ghc-8.4.3/libraries/time/dist-install/build:/tmp/SBo/ghc-8.4.3/libraries/binary/dist-install/build:/tmp/SBo/ghc-8.4.3/libraries/containers/dist-install/build:/tmp/SBo/ghc-8.4.3/libraries/bytestring/dist-install/build:/tmp/SBo/ghc-8.4.3/libraries/deepseq/dist-install/build:/tmp/SBo/ghc-8.4.3/libraries/array/dist-install/build:/tmp/SBo/ghc-8.4.3/libraries/base/dist-install/build:/tmp/SBo/ghc-8.4.3/libraries/integer-gmp/dist-install/build:/tmp/SBo/ghc-8.4.3/libraries/ghc-prim/dist-install/build:/tmp/SBo/ghc-8.4.3/rts/dist/build${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"' >> inplace/lib/bin/ghc-iserv
echo 'exec "$executablename" ${1+"$@"}'                     >> inplace/lib/bin/ghc-iserv
chmod +x                                                     inplace/lib/bin/ghc-iserv
"inplace/bin/ghc-stage1" -hisuf p_hi -osuf  p_o -hcsuf p_hc -static -prof -eventlog  -H32m -O -Wall     -hide-all-packages -i -iiserv/src -iiserv/stage2_p/build -Iiserv/stage2_p/build -iiserv/stage2_p/build/iserv/autogen -Iiserv/stage2_p/build/iserv/autogen -Iiserv/. -Iiserv/stage2_p/build/.    -optP-include -optPiserv/stage2_p/build/iserv/autogen/cabal_macros.h -package-id array-0.5.2.0 -package-id base-4.11.1.0 -package-id binary-0.8.5.1 -package-id bytestring-0.10.8.2 -package-id containers-0.5.11.0 -package-id deepseq-1.4.3.0 -package-id ghci-8.4.3 -package-id unix-2.7.2.2 -no-hs-main -XHaskell2010  -threaded -optl-Wl,--export-dynamic -no-hs-main -no-user-package-db -rtsopts      -Wnoncanonical-monad-instances  -odir iserv/stage2_p/build -hidir iserv/stage2_p/build -stubdir iserv/stage2_p/build  -split-sections  -c iserv/stage2_p/build/GHCi/Utils.hs -o iserv/stage2_p/build/GHCi/Utils.p_o 
ld.lld: error: -r and --export-dynamic may not be used together
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
make[1]: *** [iserv/ghc.mk:104: iserv/stage2_p/build/GHCi/Utils.p_o] Error 1
make: *** [Makefile:127: all] Error 2

ghc:
Would you like to continue processing the rest of the
queue or would you like to abort?  If this failed
package is a dependency of another package in the queue
then it may not make sense to continue.

(Y)es to continue, (N)o to abort, (R)etry the build?:
I have customized the SlackBuild for 8.10.4 and to build ghc 8.10.4 was a success.

Code:
Glasgow Haskell Compiler, Version 8.10.4, stage 2 booted by GHC version 8.10.4
*** initializing package database:
Using binary package database: /usr/lib64/ghc-8.10.4/package.conf.d/package.cache
package flags []
loading package database /usr/lib64/ghc-8.10.4/package.conf.d
wired-in package ghc-prim mapped to ghc-prim-0.6.1
wired-in package integer-wired-in mapped to integer-gmp-1.0.3.0
wired-in package base mapped to base-4.14.1.0
wired-in package rts mapped to rts
wired-in package template-haskell mapped to template-haskell-2.16.0.0
wired-in package ghc mapped to ghc-8.10.4
!!! initializing package database: finished in 11.83 milliseconds, allocated 7.596 megabytes
Let's be honest, I have no clue about haskell and I'm stuck to build haskell-setlocale.

Code:
Processing haskell-setlocale

haskell-setlocale:
Found setlocale-1.0.0.8.tar.gz in /var/cache/sbopkg.
Checking MD5SUM:
  MD5SUM check for setlocale-1.0.0.8.tar.gz ... OK
Building package for haskell-setlocale...
setlocale-1.0.0.8/System/
setlocale-1.0.0.8/System/Locale/
setlocale-1.0.0.8/System/Locale/SetLocale.hsc
setlocale-1.0.0.8/LICENSE
setlocale-1.0.0.8/Setup.hs
setlocale-1.0.0.8/setlocale.cabal
Configuring setlocale-1.0.0.8...
Setup: Encountered missing or private dependencies:
base >=4.6 && <4.13


haskell-setlocale:
Would you like to continue processing the rest of the
queue or would you like to abort?  If this failed
package is a dependency of another package in the queue
then it may not make sense to continue.

(Y)es to continue, (N)o to abort, (R)etry the build?:
 
Old 02-21-2021, 05:08 AM   #2
gattocarlo
Member
 
Registered: Jan 2020
Posts: 63

Rep: Reputation: Disabled
Quote:
Originally Posted by lancsuk View Post
Hiya,

I would like to build Xmonad on Slackware current. ...

Let's be honest, I have no clue about haskell and I'm stuck to build haskell-setlocale.

Code:
Processing haskell-setlocale

haskell-setlocale:
Found setlocale-1.0.0.8.tar.gz in /var/cache/sbopkg.
Checking MD5SUM:
  MD5SUM check for setlocale-1.0.0.8.tar.gz ... OK
Building package for haskell-setlocale...
setlocale-1.0.0.8/System/
setlocale-1.0.0.8/System/Locale/
setlocale-1.0.0.8/System/Locale/SetLocale.hsc
setlocale-1.0.0.8/LICENSE
setlocale-1.0.0.8/Setup.hs
setlocale-1.0.0.8/setlocale.cabal
Configuring setlocale-1.0.0.8...
Setup: Encountered missing or private dependencies:
base >=4.6 && <4.13


haskell-setlocale:
Would you like to continue processing the rest of the
queue or would you like to abort?  If this failed
package is a dependency of another package in the queue
then it may not make sense to continue.

(Y)es to continue, (N)o to abort, (R)etry the build?:
If you have ghc installed and working you should probably use cabal to install xmonad, otherwise you'll have issues with dependencies (a typical Haskell nightmare). You can grab a statically linked binary of cabal from here:
https://www.haskell.org/cabal/download.html

and then run

Code:
cabal install xmonad
and you should be done. the xmonad binary should show up in:

Code:
~/.cabal/bin/xmonad
hope this helps.
 
1 members found this post helpful.
Old 02-21-2021, 05:58 AM   #3
M0M0
Member
 
Registered: Sep 2020
Location: Germany
Distribution: Slackware
Posts: 230

Rep: Reputation: 20
You can also use ghcup to install ghc and cabal. Compiling it takes forever.

Just a little warning: even with cabal you can find yourself in dependency hell: On my machine I get warnings that the module name Xmonad is ambiguous since it is part of the xmonad-0.15 package and the xmonad-0.15 package... Yes, it sees xmonad-0.15 as two packages even if it is installed only once and I don't know why. I just ignore these errors and everything works fine, at least sometimes.. Other problems: it ignores changes in the xmonad.hs file and recognizes them only after several reboots. You often do not even get error messages, it just doesn't do it. I really like Xmonad as a window manger (the multiple monitor support is awesome, way better than dwm) but the whole installation and changing settings in haskell is a huge pain.

To stay sane I decided to use the defaults.
 
1 members found this post helpful.
Old 02-21-2021, 01:47 PM   #4
lancsuk
Member
 
Registered: Jul 2019
Location: Burnley / UK
Distribution: Slackware current
Posts: 226

Original Poster
Rep: Reputation: 204Reputation: 204Reputation: 204
@gattocarlo @MOMO

You are both right, haskell is a bloody nightmare. But I would like to know why the configuration works on 14.2 but not in current. Anyway, the best results I had to install xmonad was with stack followed by cabal.

Thanks for the gnucup suggestion....I will test it. :-)

Last edited by lancsuk; 02-21-2021 at 02:03 PM.
 
Old 02-21-2021, 01:53 PM   #5
M0M0
Member
 
Registered: Sep 2020
Location: Germany
Distribution: Slackware
Posts: 230

Rep: Reputation: 20
Quote:
Originally Posted by lancsuk View Post

Thanks for the gnucup suggestion....I will test it. :-)
If you are referring to my answer: I meant a program that is spelled ghcup which automates the installation of ghc and cabal.

Regarding the question why it is not building: I'm sure you know that but there is a thread for exactly these problems:

https://www.linuxquestions.org/quest...ls-4175561999/

Last edited by M0M0; 02-21-2021 at 01:55 PM.
 
Old 02-21-2021, 01:58 PM   #6
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,118

Rep: Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192
Quote:
Originally Posted by lancsuk View Post
But I would like to know why the configuration works on 14.2 but not in current.
because:
- the ghc version on SBo for 14.2 is incompatible with llvm in current;
- some of the xmonad dependencies on SBo for 14.2 are incompatible with a newer ghc;
- the build system for some haskell SlackBuilds must be revised for the newer ghc;
- (more that I haven't spotted yet)

if useful I'll link a post from the thread M0M0 linked above

https://www.linuxquestions.org/quest....php?p=6202432

Last edited by ponce; 02-21-2021 at 02:02 PM.
 
1 members found this post helpful.
Old 06-13-2021, 05:09 AM   #7
Zihen
Member
 
Registered: Apr 2019
Distribution: Slackware64-current
Posts: 45

Rep: Reputation: Disabled
Quote:
Originally Posted by M0M0 View Post
You can also use ghcup to install ghc and cabal. Compiling it takes forever.

Just a little warning: even with cabal you can find yourself in dependency hell: On my machine I get warnings that the module name Xmonad is ambiguous since it is part of the xmonad-0.15 package and the xmonad-0.15 package... Yes, it sees xmonad-0.15 as two packages even if it is installed only once and I don't know why. I just ignore these errors and everything works fine, at least sometimes.. Other problems: it ignores changes in the xmonad.hs file and recognizes them only after several reboots. You often do not even get error messages, it just doesn't do it. I really like Xmonad as a window manger (the multiple monitor support is awesome, way better than dwm) but the whole installation and changing settings in haskell is a huge pain.
Have been trying to get xmonad work. Sbopkg still doesn't build at the time of writing.

ghcup handles the dependencies for both ghc and cabal really well, however the two packages bug persists.

I realize sbopkg installs haskell-setlocale-1.0.0.8 while ghcup uses haskell-setlocale-1.0.0.10. I wonder whether the two packages bug will be gone if xmonad is built from sbopkg.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackware current: SlackBuild ( ponce ) vala-panel-appemenu failed lancsuk Slackware 10 11-18-2019 04:25 PM
[SOLVED] A cpl of issues with sbopkg/ponce on slackware current however Slackware 26 01-22-2019 04:59 PM
[SOLVED] How To setup sbotools.conf for ponce's -current repository and slackpkg+ config. bamunds Slackware 4 09-24-2016 10:45 PM
No xmonad.hs file provided by xmonad wiindow manager derek.m Linux - Newbie 1 02-05-2014 06:46 PM
[SOLVED] Haskell in xmonad Snark1994 Linux - Desktop 2 09-07-2011 10:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration