Profiling support

Torsten Bonde Christiansen torsten at bondechristiansen.dk
Tue Jan 15 21:19:49 CET 2008


Torbjorn Granlund wrote:
> I suspect you're not linking to the newly compiler version of the
> library.
>
> There is probably other libgmp.{a,so} on your system, which your
> linker chooses.
>
>   

I'm afaid there isn't. This is the output i get when trying to locate
any libgmp

mcbain at bellini:~$ locate libgmp
/usr/local/lib/libgmp.so
/usr/local/lib/libgmp.a
/usr/local/lib/libgmp.la
/usr/local/lib/libgmp.so.3
/usr/local/lib/libgmp.so.3.4.2
/usr/lib/ssl/engines/libgmp.so
/opt/gmp-4.2.2/.libs/libgmp.so
/opt/gmp-4.2.2/.libs/libgmp.a
/opt/gmp-4.2.2/.libs/libgmp.la
/opt/gmp-4.2.2/.libs/libgmp.so.3
/opt/gmp-4.2.2/.libs/libgmp.so.3.4.2
/opt/gmp-4.2.2/.libs/libgmp.lai
/opt/gmp-4.2.2/libgmp.la
mcbain at bellini:~$


and the ls -l also:
mcbain at bellini:/usr/local/lib$ ls -l
total 1164
drwxrwsr-x 2 root staff   4096 2008-01-10 10:57 eclipse
-rw-r--r-- 1 root root  835644 2008-01-15 20:28 libgmp.a
-rwxr-xr-x 1 root root     785 2008-01-15 20:28 libgmp.la
lrwxrwxrwx 1 root root      15 2008-01-15 20:28 libgmp.so -> libgmp.so.3.4.2
lrwxrwxrwx 1 root root      15 2008-01-15 20:28 libgmp.so.3 ->
libgmp.so.3.4.2
-rwxr-xr-x 1 root root  327909 2008-01-15 20:28 libgmp.so.3.4.2
drwxrwsr-x 3 root staff   4096 2007-11-26 10:16 python2.5
mcbain at bellini:/usr/local/lib$

This time i did the following to make sure everything was in place and
from scratch. (all done as root):

make clean
./configure --enable-profiling=gprof
make && make check && make install

then compiling my own little program:
gcc -pg test.c -lgmp

running:
./a.out

and finally:
gprof a.out


the output from gprof is locate at pastebin:
http://pastebin.com/f7a041444

and as you can see it does not contain any information on the mpz_...
function calls.

So I'm pretty sure that I'm not linking to a "wrong" version of the
libgmp as it only exists in /usr/local/lib - and the  LD_LIBRARY_PATH
point only to this file:
mcbain at bellini:~/tmp$ echo $LD_LIBRARY_PATH
:/usr/local/lib

any other suggestions?

Kind regards,
Torsten Bonde Christiansen




More information about the gmp-bugs mailing list