AIX Questions

Perry Smith pedzsan at gmail.com
Tue Jul 22 16:07:00 CEST 2008


I downloaded and compiled GMP 4.2.2 in AIX 5.3.  That went fine.

I them downloaded and tried to configure mpfr-2.3.1.  The configure  
script says that it can not find libgmp.a.  Actually it says that it  
can not find __gmpz_init.  I am just now tracking down how and why but  
I am pretty sure that GMP is compiled only in 64 bit mode while the  
configure script of MPFR is looking for __gmpz_init in 32 bit mode.   
If I do:

nm /usr/local/lib/libgmp.a | grep __gmpz_init

I get no hits.  But if I dod:

nm -X64 /usr/local/lib/libgmp.a | grep __gmpz_init
.__gmpz_init         T   268487276
.__gmpz_init2        T   268487104
.__gmpz_init_set     T   268486864
.__gmpz_init_set_d   T   268597508
.__gmpz_init_set_si  T   268597676
.__gmpz_init_set_str T   268479604
.__gmpz_init_set_ui  T   268547336
__gmpz_init          D   536874152
__gmpz_init          d   536874152          24
__gmpz_init2         D   536874128
__gmpz_init2         d   536874128          24
__gmpz_init_set      D   536874104
__gmpz_init_set      d   536874104          24
__gmpz_init_set_d    D   536878784
__gmpz_init_set_d    d   536878784          24
__gmpz_init_set_si   D   536878808
__gmpz_init_set_si   d   536878808          24
__gmpz_init_set_str  D   536873840
__gmpz_init_set_str  d   536873840          24
__gmpz_init_set_ui   D   536876816
__gmpz_init_set_ui   d   536876816          24

I found similar threads asking questions on the ClamAV mailing list.

So, my initial question is I assume that GMP is compiled only in 64  
bit mode for a reason but I wanted to make sure.

Usually, what IBM libraries do is they create two shared objects.  I  
see that libgmp.a ha libgmp.so.3 which is a 64 bit object.  Usually a  
library will have foo.so and foo64.so with foo.so being the 32 bit  
version and foo64.so being the 64 bit version.  These are archived  
(ar) into foo.a.  Then -lfoo will discover both shared objects and  
pick out the one to use at link time based upon various conditions.

My ultimate goal is to compile gcc 4.3.1.

Thank you,
Perry
Ease Software, Inc. ( http://www.easesoftware.com )

Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems



More information about the gmp-discuss mailing list