[Haskell-cafe] Problems with libgmp on Amazon Linux

Nicu Ionita nicu.ionita at acons.at
Sat Jan 7 14:18:16 CET 2012


Am 07.01.2012 06:04, schrieb Yucheng Zhang:
> On Sat, Jan 7, 2012 at 8:08 AM, Nicu Ionita<nicu.ionita at acons.at>  wrote:
>> It seemed to work pretty well, with some problems when configuring HP,
>> because although libgmp was already installed, it was not recognized. I
>> installed the newer version 5.0.2 (from sources) [4], did some tricks (cp
>> /usr/lib/lib/libgmp* /usr/lib), then configure worked and HP was built and
>> installed.
> I think you should get the installed libgmp recognized, but not doing tricks
> like this. It is no problem as a temporary solution, but you should always
> try to make use of a package manager.
>
>> Loading package integer-gmp ...<command line>: can't load .so/.DLL for: gmp
>> (libgmp.so: cannot open shared object file: No such file or directory)
> I have no experience with AWS, but it seems that you need to run a ldconfig
> to rebuild the cache, since you installed libgmp just by copying into /usr/lib.
>
> ldconfig -n /usr/bin

Thank you, a good point.

Just to let a trace for the posterity, here is what I did:

I now deleted libgmp* from /usr/lib (which I copied from /usr/lib/lib, 
where gmp did intstall, although I configured it with 
--prefix=/usr/lib), then ran:

sudo ldconfig /usr/lib/lib

which updated also the ld cache, and then I defined (in .bash_profile)

LD_LIBRARY_PATH=/usr/lib/lib

After a new login everything could be installed (I installed aws and 
criterion, after which half of Hackage was on my machine ;-) This 
installation point of gmp is a bit odd, but I don't want now to find out 
why the gmp intallation procedure doesn't honor --prefix.

After this I made an AMI (image) of it, which could be used as a start 
point for further installations.

I did not test the installation extesively yet, but by so many 
succefully installed packages, I'm confident that everything is ok. Next 
days I'll play with it.

By the way, I let gmp 5.0.2 there, it looks that HP 2011.04 likes it.

Nicu



More information about the Haskell-Cafe mailing list