List Info

Thread: gmp 4.2.1 version




gmp 4.2.1 version
country flaguser name
Israel
2007-07-30 05:50:07

Hi

My name is Orit Harel, Amdocs.

 

We have upgraded from 4.1.4 to 4.2.1 version.

 

During our link time when gmp library is an input to this link command, we got the following:

 

ld: fatal: relocation error: R_SPARC_H44: file /usr/local64/gmp-4.2.1/lib/libgmp.a(mp_set_fns.o): symbol __gmp_default_allocate: relocations

 based on the ABS44 coding model can not be used in building a shared object

 

Adding the –K PIC flag to gmp library build has solved the problem.

 

 

My question is:

 

Is this the correct solution? How it will affect on the gmp usage ?

 

 

 

Thanks in advance!!!

 

 

Thanks and regards,

Orit Harel

972-9-7767513

OritGAmdocs.com

 

Re: gmp 4.2.1 version
country flaguser name
France
2007-07-31 05:12:52
On Mon, 30 Jul 2007, Orit Harel wrote:

> During our link time when gmp library is an input to
this link command,
> we got the following:
>
> ld: fatal: relocation error: R_SPARC_H44: file
> /usr/local64/gmp-4.2.1/lib/libgmp.a(mp_set_fns.o):
symbol
> __gmp_default_allocate: relocations
>
> based on the ABS44 coding model can not be used in
building a shared
> object
>
> Adding the -K PIC flag to gmp library build has solved
the problem.
>
> My question is:
>
> Is this the correct solution? How it will affect on the
gmp usage ?

It is not the best way. There are two types of libraries:
static and 
shared. For gmp you can build both (see the configure
options). Linking 
with a shared library (lib*.so) means adding a runtime
dependancy on this 
library. Linking with a static library or archive (lib*.a)
means including 
relevant portions of this library in the object that is
produced. To make 
it simple, only link the executable file with the static
libraries. Here 
you are building a shared object so you should not link with
a static 
library, you can either not link with gmp at all (and
remember to link 
with gmp when you create an executable file using this
shared object) or 
link with a shared version of libgmp.

-- 
Marc Glisse
_______________________________________________
gmp-bugs mailing list
gmp-bugsswox.com
http://swox
.com/mailman/listinfo/gmp-bugs

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )