better solution for problem with Haskell libgmp build error

Other talk about Salix
Post Reply
User avatar
mimosa
Salix Warrior
Posts: 3096
Joined: 25. May 2010, 17:02
Contact:

better solution for problem with Haskell libgmp build error

Post by mimosa » 9. Aug 2012, 01:06

The 13.37 ghc Slackbuild (needed for XMonad) fails because it requires an outdated library at build time. A symlink works:

Code: Select all

# ln -s /usr/lib/libgmp.so.10 /usr/lib/libgmp.so.3
but that's ugly, and indeed, my research suggests it may create problems (though it never has for me using XMonad).

An alternative approach is to build the old library (gmp-4.3.2.tar.bz2), available here:

http://ftp.gnu.org/gnu/gmp/

but obviously without installing it:

Code: Select all

$wget http://ftp.gnu.org/gnu/gmp/gmp-4.3.2.tar.bz2
$tar -xvf gmp-4.3.2.tar.bz2
$cd gmp-4.3.2
$./configure
$make
$make check
The needed files are in the .libs directory, and should be placed in /usr/lib:

Code: Select all

#cp -P ./.libs/libgmp.so.3* /usr/lib # -P to copy the symlink and not the file it points at
#ls -la /usr/lib | grep libgmp.so.3

lrwxrwxrwx   1 root root       24 Aug  8 15:02 libgmp.so.3 -> /usr/lib/libgmp.so.3.5.2
-rwxr-xr-x   1 root root   325278 Aug  8 13:19 libgmp.so.3.5.2
Then get the Glasgow Haskell compiler from slapt-src.

I've also put libgmp.so.3.5.2 here, in case anyone prefers not to bother compiling an outdated library:

http://people.salixos.org/mimosa/misc/libgmp.so.3.5.2

Just put the file in /usr/lib and create the (legit) symlink:

Code: Select all

#ln -s /usr/lib/libgmp.so.3.5.2 /usr/lib/libgmp.so.3

Post Reply