bug-gmp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

solaris link problem


From: Ed Thomas
Subject: solaris link problem
Date: Wed, 20 Dec 2000 02:06:47 +0000 (GMT)

Hi everyone

I'm having trouble building gmp-3.1.1 on sparc. Here are my system
details:

libra$ uname -a
SunOS libra.cus.cam.ac.uk 5.6 Generic_105181-23 sun4u sparc SUNW,Ultra-60
libra$ gcc -v
Reading specs from /opt/gnu/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/specs
gcc version 2.8.1

Here's what I do:
  1) ./configure
  2) I change `define(<GSYM_PREFIX>, <>)' to `define(<GSYM_PREFIX>, <_>)'
     in config.m4
  3) make
  4) ranlib .libs/libgmp.a 
This all seems to work fine. (Steps 2 and 4 come from the section `SunOS
4 Native Tools' in gmp.info-1.)

I then try to compile a test program:

libra$ cat go.c
#include <stdio.h>
#include "gmp.h"
int main() {
  char ts[100];
  mpz_t x;
  mpz_t y;
  mpz_init_set_str(x, "1000", 10);
  mpz_init_set_str(y, "1023", 10);
  mpz_add(x, x, y);
  mpz_get_str(ts, 10, x);
  printf("\n%s", ts);
  return 0;
}
libra$ gcc -Wa,-xarch=v8plus -mcpu=v9 -o go -L. -lgmp go.c
Undefined                       first referenced
 symbol                             in file
__gmpz_init_set_str                 /var/tmp/ccP1aqQo1.o
__gmpz_get_str                      /var/tmp/ccP1aqQo1.o
__gmpz_add                          /var/tmp/ccP1aqQo1.o
ld: fatal: Symbol referencing errors. No output written to go

(I get the same link errors irrespective of whether or not I do Steps 2 or
4. gmp.info-1 suggests I compile with gcc -mv8plus, but gcc says that's an
invalid option. I get the same results if I compile with
gcc -o go -L. -lgmp go.c
)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]