PARI/GP Bug report logs -
#1239
./Configure issue with GMP ABI selection on HPux 11iv3(B.11.31) ia64
Reported by: Bill.Glessner@cwu.EDU
Date: Wed, 7 Sep 2011 20:18:02 UTC
Severity: normal
Done: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
Bug is archived. No further changes may be made.
Full log
Message #15 received at 1239@pari.math.u-bordeaux.fr (full text, mbox, reply):
Package: pari
Version: 2.5.0
Hello Bill,
I have had a chance to do some more research into the environment on the
HPux rx4640 Itanium /HPux 11iv3 platofrm in which I am trying to install
pari 2.5.0.
The gmplib.org documentation site in the section
http://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA for IA-64 shows
two possibilities: IA-64 under HP-UX and other IA-64 systems, basically
Linux implementations.
The HP-UX specifics show that GMP can have either
an ABI=32 environment where pointers, ints and longs are 32 bits and GMP
uses a 64 bit long long for a limb or
an ABI=64 environment where pointers and longs are 32 bits and GMP uses
a long for a limb.
The initial GMP statement showing 2 possible HP-UX ABI environments says
that peformance is the same in both.
When I built the gcc 4.5.3 environment at our site, I did not specify a
special ABI for GMP, mpfr, mpc, etc when building them so that their ABIs
are the default ABI=32.
In the PARI GP version 2.5.0 config/ directory there is a program
gmp_version.c
#include <stdio.h>
#include <gmp.h>
void f(void) { mpn_gcdext(NULL,NULL, NULL, NULL, 0, NULL, 0); }
main()
{
if (sizeof(mp_limb_t) == sizeof(long))
printf("%s", gmp_version);
else
printf("unsupported");
}
The code will not return a gmp_version for the HP-UX / GMP ABI=32
environment where sizeof(mp_limb_t) would need to match sizeof(long long).
The code will return a gmp_version for the Linux environments where longs
are 64 bits.
If the gmp_version.c code is modified to
#include <stdio.h>
#include <gmp.h>
void f(void) { mpn_gcdext(NULL,NULL, NULL, NULL, 0, NULL, 0); }
main()
{
if (sizeof(mp_limb_t) == sizeof(long long))
printf("%s", gmp_version);
else
printf("unsupported");
}
the ./Configure process returns
...
Given the previous choices, sizeof(long) is 4 chars.
The internal word representation of a double is l[0], l[1].
==========================================================================
Building for: Itanium running hpux (portable C/GMP kernel) 32-bit version
==========================================================================
...
Checking for optional libraries and headers...
...Found libgmp in /usr/local/GNU/lib
...Found gmp header in /usr/local/GNU/include
Using GNU MP, version 5.0.2
...
which would seem to be correct for our site. I realize that just
bending the ./Configure process to pass for our site's GMP environment
doesn't mean that doing that won't introduce other problems during the
build and use of pari later on. I will try a build and check to see what
the consequences are. Perhaps a more elegant patch could be put into
gmp_version.c (and pari, if necessary) to accomodate the HP-UX / GMP
peculiarity for IA-64 platforms. My other alternative is to build a
separate environment for ABI=64 GMP and its associated libraries so that
it functions essentially like the Linux IA-64 environments. Since I
currently don't need a separate ABI=64 GMP environment for anything else
besides pari, I guess I would prefer that pari change, if possible.
The build, /usr/local/bin/gmake gp, of pari 2.5.0 on HP-UX 11iv3 with
the change to gmp_version.c does fail with the following:
...
gcc -c -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer -I. -I../src/head
ers -fPIC -o hash.o ../src/language/hash.c
../src/language/hash.c:171:1: error: conflicting types for 'compound'
/usr/include/math.h:379:23: note: previous declaration of 'compound' was here
gmake[1]: *** [hash.o] Error 1
gmake[1]: Leaving directory `/DreamLand/JunqueYard_gccN/pari-2.5.0/Ohpux-ia64'
gmake: *** [gp] Error 2
Thanks for your assistance
Bill
>Return-path: <Bill.Allombert@math.u-bordeaux1.fr>
>Date: Sun, 11 Sep 2011 21:06:17 +0200
>From: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
>Subject: Re: Bug#1239: ./Configure issue with GMP ABI selection on HPux 11iv3(B.11.31) ia64
>To: Bill.Glessner@cwu.edu, 1239@pari.math.u-bordeaux.fr
>
>Hello Bill.
>
>My understanding is the opposite:
>GMP choose the ABI with the best performance, which is ABI=64.
>(Fundamentally GMP assume that people are building GMP program that are not linked
>with any other libraries).
>
>The log shows clearly that PARI is configured for the default 32bit ABI.
>
>> Does the message
>> "### Your GMP library ABI is unsupported."
>> mean that if I build a GMP library environment with ABI = 64, PARI/GP's
>> ./Configure will be able to use that to create a PARI/GP with GMP support?
>
>This means that you should build GMP with ABI=32, or PARI with the 64bit ABI.
>
>If you want the best performance, choose the later. However this will require you
>to have 64bit version of the other libraries used by PARI.
>
>Cheers,
>Bill.
>>On Wed, Sep 07, 2011 at 01:10:05PM -0700, Bill.Glessner@cwu.EDU wrote:
>>
>> Package: pari
>> Version: 2.5.0
>>
>> On HP Itanium Server rx4640 running HPux 11iv3, running ./Configure produces
>>
>> ./Configure --prefix=/usr/local/PARI \
>> --with-gmp --with-readline --with-ncurses-lib=/usr/local/lib
>>
>> Configuring pari-2.5.0 (STABLE)
>> Checking echo to see how to suppress newlines...
>> ...using \c
>> Looking for some tools first ...
>> ...ld is /usr/bin/ld
>> ...zcat is /usr/local/bin/zcat
>> ...gzip is /usr/local/bin/gzip
>> ...ranlib is /usr/local/GNU/bin/ranlib
>> ...perl is /usr/bin/perl
>> GNU compiler version 4.5.3 (GCC)
>> Given the previous choices, sizeof(long) is 4 chars.
>> The internal word representation of a double is l[0], l[1].
>> ==========================================================================
>> Building for: Itanium running hpux (portable C/GMP kernel) 32-bit version
>> ==========================================================================
>> C compiler is gcc -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer
>> -fPIC
>> Executable linker is gcc -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer
>> -Wl,-E
>> Dynamic Lib linker is gcc -shared $(CFLAGS) $(DLCFLAGS) -Wl,-b
>> Looking in C lib for some symbols...
>> ...Found exp2.
>> ...Found log2.
>> ...Found strftime.
>> ...Found getrusage.
>> ...Found sigaction.
>> ...Found TIOCGWINSZ.
>> ...Found getrlimit.
>> ...Found stat.
>> ...Found vsnprintf.
>> ...Found waitpid.
>> ...Found setsid.
>> ...Found getenv.
>> ...Found isatty.
>> ...Found alarm.
>> ...Found dlopen.
>> Checking for optional libraries and headers...
>> ...Found libgmp in /usr/local/GNU/lib
>> ...Found gmp header in /usr/local/GNU/include
>> ### Your GMP library ABI is unsupported.
>> ### Building without GNU MP support
>> ...Found libX11 in /usr/lib/X11R6
>> ...Found X11 header files in /usr/include/X11R6/X11
>> Hi-Res Graphics: X11
>> ...Found libreadline in /usr/local/GNU/lib
>> ...Found readline header in /usr/local/GNU/include/readline
>> ...Found history header in /usr/local/GNU/include/readline
>> ...Found libncurses in /usr/local/GNU/lib
>> ...Library ncurses needed by readline
>> Using GNU readline, version 6.2
>> Installation prefix ? [/usr/local/GNU/PARI]
>> ...for architecture-independent files (share-prefix) ? [/usr/local/GNU/PARI/shar
>> e]
>> Installation directories for:
>> ...executables (gp, gphelp) ? [/usr/local/GNU/PARI/bin]
>> ...libraries (libpari) ? [/usr/local/GNU/PARI/lib]
>> ...include files ? [/usr/local/GNU/PARI/include]
>> ...manual pages ? [/usr/local/GNU/PARI/share/man/man1]
>> ...other system-dependent data ? [/usr/local/GNU/PARI/lib/pari]
>> ...other system-independent data ? [/usr/local/GNU/PARI/share/pari]
>> Default is dynamic executable and shared library
>> ==========================================================================
>> Extracting examples/Makefile.hpux-ia64
>> Extracting Ohpux-ia64/Makefile
>> Extracting Makefile
>> Extracting Ohpux-ia64/paricfg.h
>> Extracting Ohpux-ia64/../Odos/paricfg.h
>> Extracting scripts and macros
>> ...in doc
>> ...in misc
>> ==========================================================================
>> Shall we try to build pari 2.5.0 (released) now (y/n)? [n]
>> Ok. Type "make install" when you are ready
>> Bye !
>>
>> Since I didn't specifically set the ABI environment variable before
>> building the GMP library for supporting the gcc 4.5.3 local install, I
>> believe the GMP library was created with its default ABI of 32 for HPux IA64.
Send a report that this bug log contains spam.
Bill Allombert <allomber@math.u-bordeaux.fr>.
Last modified:
Sat Aug 26 17:16:41 2023;
Machine Name:
pari
PARI/GP Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.