Probably an FAQ: GMP version vs. library version

David Gillies daggillies at gmail.com
Wed Apr 4 08:12:01 CEST 2007


This probably belongs in the FAQ section on the website: why did GMP
library versions stick at 3 when GMP itself is at v4.2.x?

This trivial program

--- gmpver.c:

#include<stdio.h>
#include<gmp.h>

int main(void)
{
	printf("%s\n",gmp_version);
}

gives me 4.2.1 (yay!)

gcc gmpver.c -lgmp -o gmpver

but a look at its linkage gives me:

ldd ./gmpver
        linux-gate.so.1 =>  (0xffffe000)
        libgmp.so.3 => /usr/local/lib/libgmp.so.3 (0xb7fa6000) <--- three? Why?
        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7e77000)
        /lib/ld-linux.so.2 (0xb7fde000)

Is this just an artefact of dependency hell? I can see this disparity
confusing a lot of newbies.

-- 
David Gillies
San Jose
Costa Rica


More information about the gmp-discuss mailing list