Problems installing gmp

Torbjorn Granlund tege at
Mon Jul 24 21:22:05 CEST 2006

  > Suggested read:

  Interesting reading. It tells me how to compile applications that I want to
  link with a 64-bit build of GMP on my Solaris system (Solaris 2.9 + gcc 
  i.e. with:
    gcc -m64 -mptr64 -Wa,-xarch=v9 -mcpu=v9
  However, when I run 'configure' I get:
      checking build system type... ultrasparc3-sun-solaris2.9
      checking host system type... ultrasparc3-sun-solaris2.9
      checking compiler gcc -O2 -m64 -mptr64  -mcpu=ultrasparc3... yes
  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.

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/bin/bash ../libtool --mode=link gcc  -O2 -m64 -mptr64
      -mcpu=ultrasparc3   -o t-count_zeros  t-count_zeros.o
      gcc -O2 -m64 -mptr64 -mcpu=ultrasparc3 -o .libs/t-count_zeros
      t-count_zeros.o  ./.libs/libtests.a
      /usr/local/src/gmp-build/.libs/ ../.libs/
      ld: warning: file ../.libs/ linked to
      /usr/local/src/gmp-build/.libs/ attempted multiple
      inclusion of file
      creating t-count_zeros
  and then an ld fatal error at run time for each test too: t-count_zeros: fatal: /usr/local/lib/ 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

  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?


More information about the gmp-bugs mailing list