PARI/GP Bug report logs - #1022
FreeBSD/amd64 not detected correctly

Package: pari; Maintainer for pari is Aurel Page <aurel.page@normalesup.org>; Source for pari is src:pari.

Reported by: Peter Jeremy <peterjeremy@acm.org>

Date: Sun, 3 Jan 2010 03:03:03 UTC

Severity: normal

Tags: patch

Done: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>

Bug is archived. No further changes may be made.

Full log


🔗 View this message in rfc822 format

X-Loop: allomber@math.u-bordeaux.fr
From: allomber@math.u-bordeaux.fr (PARI/GP Bug Tracking System)
To: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
Cc: Karim.Belabas@math.u-bordeaux.fr
Subject: Bug#1022: marked as done (FreeBSD/amd64 not detected correctly)
Message-ID: <handler.1022.D1022.126547381717457.ackdone@pari.math.u-bordeaux.fr>
In-Reply-To: <20100206162953.GE31602@yellowpig>
References: <20100206162953.GE31602@yellowpig> <20100103025217.GE32012@server.vk2pj.dyndns.org>
Precedence: bulk
X-PARI/GP-PR-Message: closed 1022
X-PARI/GP-PR-Package: pari
X-PARI/GP-PR-Keywords: patch
Your message dated Sat, 6 Feb 2010 17:29:53 +0100
with message-id <20100206162953.GE31602@yellowpig>
and subject line Bug#1022: FreeBSD/amd64 not detected correctly
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Bill Allombert
(administrator, PARI/GP bugs database)

--------------------------------------
Received: (at submit) by pari.math.u-bordeaux.fr; 3 Jan 2010 02:52:30 +0000
From peterjeremy@acm.org Sun Jan 03 03:52:30 2010
Received: from mail36.syd.optusnet.com.au ([211.29.133.76])
	by pari with esmtp (Exim 4.63)
	(envelope-from <peterjeremy@acm.org>)
	id 1NRGZx-00076w-MV
	for submit@pari.math.u-bordeaux.fr; Sun, 03 Jan 2010 03:52:30 +0100
Received: from server.vk2pj.dyndns.org (c122-106-232-83.belrs3.nsw.optusnet.com.au [122.106.232.83])
	by mail36.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o032qNqX022864
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <submit@pari.math.u-bordeaux.fr>; Sun, 3 Jan 2010 13:52:26 +1100
X-Bogosity: Ham, spamicity=0.000000
Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1])
	by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id o032qIgo004638
	for <submit@pari.math.u-bordeaux.fr>; Sun, 3 Jan 2010 13:52:18 +1100 (EST)
	(envelope-from peter@server.vk2pj.dyndns.org)
Received: (from peter@localhost)
	by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id o032qI7M004637
	for submit@pari.math.u-bordeaux.fr; Sun, 3 Jan 2010 13:52:18 +1100 (EST)
	(envelope-from peter)
Date: Sun, 3 Jan 2010 13:52:18 +1100
From: Peter Jeremy <peterjeremy@acm.org>
To: submit@pari.math.u-bordeaux.fr
Subject: FreeBSD/amd64 not detected correctly
Message-ID: <20100103025217.GE32012@server.vk2pj.dyndns.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="AjmyJqqohANyBN/e"
Content-Disposition: inline
X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc
User-Agent: Mutt/1.5.20 (2009-06-14)


--AjmyJqqohANyBN/e
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Package: pari
Version: 2.3.4
Tags: patch

FreeBSD refers to the x86_64 architecture under its original name of
'amd64'.  Since pari is only looking for x86_64, it fails to correctly
recognize that it needs to add '-fPIC' to the shared library compilation.

This is reported during ./Configure:
        Warning ! architecture amd64 not tested

When (eg) "make bench" is then attempted, it fails with:

/usr/bin/gcc  -o libpari.so.2.3.4 -shared  -O3 -Wall -fno-strict-aliasing -=
fomit-frame-pointer  -Wl,-shared,-soname=3Dlibpari.so.2 mp.o mpinl.o Flx.o =
Qfb.o RgX.o alglin1.o alglin2.o arith1.o arith2.o base1.o base2.o base3.o b=
ase4.o base5.o bibli1.o bibli2.o buch1.o buch2.o buch3.o buch4.o galconj.o =
gen1.o gen2.o gen3.o ifactor1.o perm.o polarit1.o polarit2.o polarit3.o roo=
tpol.o subcyclo.o subgroup.o trans1.o trans2.o trans3.o anal.o compat.o def=
ault.o errmsg.o es.o init.o intnum.o members.o sumiter.o aprcl.o elldata.o =
elliptic.o galois.o groupid.o kummer.o mpqs.o nffactor.o part.o stark.o sub=
field.o thue.o -lc -lm=20
/usr/bin/ld: mp.o: relocation R_X86_64_32S can not be used when making a sh=
ared object; recompile with -fPIC
mp.o: could not read symbols: Bad value
*** Error code 1

Stop in /home/peter/pari-2.3.4/Ofreebsd-amd64.

A suitable patch
--- config/get_kernel.orig	2008-01-17 02:56:55.000000000 +1100
+++ config/get_kernel	2010-01-03 13:47:23.793813344 +1100
@@ -12,7 +12,7 @@
            4) asmarch=3Dix86;;
            8) asmarch=3Dx86_64;;
            esac;                        pretty=3D$arch ;;
-  x86_64)  case "$sizeof_long" in  =20
+  x86_64|amd64)  case "$sizeof_long" in  =20
            4) asmarch=3Dix86;;
            8) asmarch=3Dx86_64;;
            esac;                        pretty=3D'amd64';;
--- config/get_dlcflags.orig	2008-01-17 02:57:08.000000000 +1100
+++ config/get_dlcflags	2010-01-03 13:48:42.292305797 +1100
@@ -4,7 +4,7 @@
   # *-i?86|*-sparc*|*-powerpc|*-s390|*-mips) DLCFLAGS=3D
   case "$osname-$arch" in
     *-hppa|*-ia64|*-alpha|*-arm|*-m68k) DLCFLAGS=3D-fPIC ;;
-    *-x86_64|*-sparc*) case "$sizeof_long" in=20
+    *-x86_64|*-sparc*|*-amd64) case "$sizeof_long" in=20
               8) DLCFLAGS=3D-fPIC;;
               esac;;
     darwin-*) DLCFLAGS=3D-fno-common;;


--=20
Peter Jeremy

--AjmyJqqohANyBN/e
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAktABmEACgkQ/opHv/APuIcdQgCgsDxd8CTxzm6xVKzVF+lDXjTs
mXoAn3w0b/sdP3A4q3AXDHzl4H9B37yu
=52Ke
-----END PGP SIGNATURE-----

--AjmyJqqohANyBN/e--

---------------------------------------
Received: (at 1022-done) by pari.math.u-bordeaux.fr; 6 Feb 2010 16:30:17 +0000
From Bill.Allombert@math.u-bordeaux1.fr Sat Feb 06 17:30:17 2010
Received: from smtp5-g21.free.fr ([212.27.42.5])
	by pari with esmtp (Exim 4.69)
	(envelope-from <Bill.Allombert@math.u-bordeaux1.fr>)
	id 1NdnY1-0004XV-By
	for 1022-done@pari.math.u-bordeaux.fr; Sat, 06 Feb 2010 17:30:17 +0100
Received: from smtp5-g21.free.fr (localhost [127.0.0.1])
	by smtp5-g21.free.fr (Postfix) with ESMTP id 89D0ED4818A;
	Sat,  6 Feb 2010 17:30:13 +0100 (CET)
Received: from yellowpig (bur91-3-82-239-212-167.fbx.proxad.net [82.239.212.167])
	by smtp5-g21.free.fr (Postfix) with ESMTP id 6913AD48129;
	Sat,  6 Feb 2010 17:30:11 +0100 (CET)
Received: from bill by yellowpig with local (Exim 4.69)
	(envelope-from <Bill.Allombert@math.u-bordeaux1.fr>)
	id 1NdnXd-00057e-NV; Sat, 06 Feb 2010 17:29:53 +0100
Date: Sat, 6 Feb 2010 17:29:53 +0100
From: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
To: Peter Jeremy <peterjeremy@acm.org>, 1022-done@pari.math.u-bordeaux.fr
Subject: Re: Bug#1022: FreeBSD/amd64 not detected correctly
Message-ID: <20100206162953.GE31602@yellowpig>
References: <20100103025217.GE32012@server.vk2pj.dyndns.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20100103025217.GE32012@server.vk2pj.dyndns.org>
User-Agent: Mutt/1.5.18 (2008-05-17)

On Sun, Jan 03, 2010 at 01:52:18PM +1100, Peter Jeremy wrote:
> Package: pari
> Version: 2.3.4
> Tags: patch
> 
> FreeBSD refers to the x86_64 architecture under its original name of
> 'amd64'.  Since pari is only looking for x86_64, it fails to correctly
> recognize that it needs to add '-fPIC' to the shared library compilation.
> 
> This is reported during ./Configure:
>         Warning ! architecture amd64 not tested

Hello Peter,
this issue should be fixed in PARI version 2.3.5, released yesterday.

Cheers,
Bill.


Send a report that this bug log contains spam.


Bill Allombert <allomber@math.u-bordeaux.fr>. Last modified: Sat Aug 26 17:13:32 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.