Problems installing gmp

Herve Pages hpages at fhcrc.org
Mon Jul 24 22:45:56 CEST 2006


Torbjorn Granlund wrote:
>
> so I'm wondering why the flags shown by 'configure' don't match those 
> given
> in your "Suggested read" page.
>
> Is that a big problem? We're trying to keep the descriptions
> terse and nly mention really relevant information there.

Since 'make check' fails for me with the flags used by 'configure' and since
you pointed me to a page where they suggest different flags, then I naively
deduced that 'configure' might be using the wrong flag... But if you say 
this
is not relevant then fine. I'm not an expert.

>
> Surely, you can also copy the options used in the build, since
> you know them.
>
> Then when I run 'make check', I can see that the tests are indeed compiled
> with the flags shown above by 'configure' but I get an ld warning
> for each compiled test, e.g for the "t-count_zeros" test:
>
> gcc -DHAVE_CONFIG_H -I. -I/usr/local/src/gmp-4.2.1/tests -I..
> -I/usr/local/src/gmp-4.2.1 -O2 -m64 -mptr64 -mcpu=ultrasparc3 -c
> /usr/local/src/gmp-4.2.1/tests/t-count_zeros.c
> /usr/local/bin/bash ../libtool --mode=link gcc -O2 -m64 -mptr64
> -mcpu=ultrasparc3 -o t-count_zeros t-count_zeros.o libtests.la
> ../libgmp.la
> gcc -O2 -m64 -mptr64 -mcpu=ultrasparc3 -o .libs/t-count_zeros
> t-count_zeros.o ./.libs/libtests.a
> /usr/local/src/gmp-build/.libs/libgmp.so ../.libs/libgmp.so
> -R/usr/local/lib
> ld: warning: file ../.libs/libgmp.so: linked to
> /usr/local/src/gmp-build/.libs/libgmp.so: attempted multiple
> inclusion of file
> creating t-count_zeros
>
> and then an ld fatal error at run time for each test too:
>
> ld.so.1: t-count_zeros: fatal: /usr/local/lib/libgcc_s.so.1: wrong
> ELF class: ELFCLASS32
> /usr/local/bin/bash: line 1: 26990 Killed ${dir}$tst
> FAIL: t-count_zeros
>
> This we already know, that you get a ELFCLASS32 and ELFCLASS64
> clash. I don't know why that happens, and I will not try to
> debug that remotely.
>
> Can you compile and link a plain hello.c using both -m32 and
> -m64?
Yes it works:

    hpages at churchill:~> gcc -m32 hello.c
    hpages at churchill:~> file a.out
    a.out:          ELF 32-bit MSB executable SPARC Version 1,
    dynamically linked, not stripped
    hpages at churchill:~> ./a.out
    hi
    hpages at churchill:~> gcc -m64 hello.c
    hpages at churchill:~> file a.out
    a.out:          ELF 64-bit MSB executable SPARCV9 Version 1,
    dynamically linked, not stripped
    hpages at churchill:~> ./a.out
    hi

>
> I have the feeling that after reading your "Suggested read" the
> solution to my problem should be just obvious to me... but I'm
> affraid this is not the case :-/
> Is there anything else you can suggest me?
> Thank you,
>
> Well, have you tried ".../configure ABI=32" as I tried to suggest
> in the last mail?
OK this worked too and "make check" was clearly much faster than
with ".../configure --build=sparc-sun-solaris2.9".
Thanks!

H.




More information about the gmp-bugs mailing list