bug-gmp
[Top][All Lists]
Advanced

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

Re: [MPFR] mpfr-3.0.0 on Solaris Intel and Mac OS X Intel


From: Nelson H. F. Beebe
Subject: Re: [MPFR] mpfr-3.0.0 on Solaris Intel and Mac OS X Intel
Date: Tue, 3 Aug 2010 16:50:51 -0600 (MDT)

[This posting is to both the mpfr and bug-gmp lists because of the content 
overlap.]

Thanks to clues from respondents to my problem report of Sat, 31 Jul
2010 11:22:37 -0600 (MDT) on the mpfr list, I've tracked down and
resolved the problems building mpfr-3.0.0 on Solaris Intel and Mac OS
X Intel.  I now have mpfr-3.0.0 passing all of its tests and
successfully installed on about 20 flavors of Unix.

The problem explanation is this: on those two systems, and also
Solaris SPARC, gmp by default builds with ABI=64, even though the
normal build environment in all three cases is the 32-bit world, with
64-bit companions being optional, but unusual.

I've therefore often built both 32-bit and 64-bit gmp installations on
those machines, but the problem that turned up with mpfr this time has
to do with the installation order: if the 64-bit version is installed
last, then /usr/local/include/gmp.h contains

        #define GMP_LIMB_BITS                      64

instead of

        #define GMP_LIMB_BITS                      32

The result is that the default libraries in /usr/local/lib are 32-bit
(the 64-bit ones reside in /usr/local/lib64 on Mac OS X, and
/usr/local/lib/64 on Solaris), and they get used in the mpfr build
with the 64-bit gmp.h header file, causing the massive confusion,
compilation warnings, and test failures that I reported.

It would be nice if the gmp folks could get their configure script to
pick the default nn-bit world correctly on all systems, but it is also
important to be able have both 32-bit and 64-bit software installed in
parallel directories on those many platforms that support dual worlds.

While separate 32-bit and 64-bit library paths are well-understood on
those platforms, as far as I can tell, there is no good convention for
handling such a dependence in header files, since the GNU standards
for "make install" have only ${prefix}/include for the location.

Ideally, one would like the installed header files to be
ABI-size-independent, with the desired size chosen at compile time by
an ABI option, or, perhaps better, by the kind of link library found,
such as this pair on Mac OS X Intel:

% file /usr/local/lib64/libgmp.3.5.0.dylib
/usr/local/lib64/libgmp.3.5.0.dylib: Mach-O 64-bit dynamically linked shared 
library x86_64

% file /usr/local/lib/libgmp.3.5.0.dylib
/usr/local/lib/libgmp.3.5.0.dylib: Mach-O dynamically linked shared library i386

Comments?

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: address@hidden  -
- 155 S 1400 E RM 233                       address@hidden  address@hidden -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------



reply via email to

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