From owner-freebsd-current@FreeBSD.ORG Tue Jun 12 08:49:29 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3908B1065672; Tue, 12 Jun 2012 08:49:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id AD1518FC14; Tue, 12 Jun 2012 08:49:28 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q5C8nH41009828; Tue, 12 Jun 2012 11:49:17 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q5C8nHQc003386; Tue, 12 Jun 2012 11:49:17 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q5C8nHhI003385; Tue, 12 Jun 2012 11:49:17 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 12 Jun 2012 11:49:17 +0300 From: Konstantin Belousov To: Jan Sieka Message-ID: <20120612084917.GL2337@deviant.kiev.zoral.com.ua> References: <4FCE211D.10204@semihalf.com> <0FE5C5BF-FADE-49BA-BF38-00018A752F14@kientzle.com> <4FD6FB72.10900@semihalf.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xtmLDbP6TiKhntQb" Content-Disposition: inline In-Reply-To: <4FD6FB72.10900@semihalf.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: gjb@semihalf.com, Rafal Jaworowski , freebsd-arm@freebsd.org, freebsd-current@freebsd.org, Ian Lepore Subject: Re: Possible fix for Perl failing with ../lib/auto/POSIX/POSIX.so: Undefined symbol "__flt_rounds" on ARM X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jun 2012 08:49:29 -0000 --xtmLDbP6TiKhntQb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 12, 2012 at 10:18:58AM +0200, Jan Sieka wrote: > On 2012.06.09 18:11, Tim Kientzle wrote: > >=20 > > On Jun 5, 2012, at 8:09 AM, Jan Sieka wrote: > >=20 > >> Hello Ian! > >> > >> I tried recently to compile and run Perl 5.12 on ARM (SheevaPlug) using > >> HEAD from 22.05.2012 and got the following error while trying to run: > >> /usr/ports/lang/perl5.12 # make test > >> [...] > >> ../lib/auto/POSIX/POSIX.so: Undefined symbol "__flt_rounds > >> [...] > >> > >> After investigating the issue it appeared that __flt_rounds symbol is > >> not exported by libc. Applying the following patch, recompilling world > >> and Perl fixed the problem and allowed to use Perl on SheevaPlug: > >> > >> diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map > >> index e8c7f1d..8cdcdaf 100644 > >> --- a/lib/libc/arm/Symbol.map > >> +++ b/lib/libc/arm/Symbol.map > >> @@ -70,6 +70,7 @@ FBSDprivate_1.0 { > >> __divdf3; > >> __floatsisf; > >> __floatsidf; > >> + __flt_rounds; > >> __fixsfsi; > >> __fixdfsi; > >> __fixunssfsi; > >> > >> Can you comment whether this is a correct solution? > >=20 > > Great! I had the same problem compiling Python last > > week and had planned to track it down. > >=20 > > I just committed this to -CURRENT and will also > > merge it to the armv6 tree. > Hello Tim! >=20 > Thanks for committing this but unfortunately that patch wasn't correct. > I had another discussion on freebsd-current@ (I forgot to do a > cross-list CC - now fixed) about how to add symbols to Symbols.map files > (see this thread: > http://lists.freebsd.org/pipermail/freebsd-current/2012-June/034511.html)= and > from the answer and hints given by Konstantin Belousov I have prepared > another patch that adheres to library versioning guidelines. If nobody > objects this patch then feel free to commit it: >=20 > diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map > index dc46013..48f6747 100644 > --- a/lib/libc/arm/Symbol.map > +++ b/lib/libc/arm/Symbol.map > @@ -33,6 +33,10 @@ FBSD_1.0 { > sbrk; > }; >=20 > +FBSD_1.3 { > + __flt_rounds; > +}; > + > FBSDprivate_1.0 { > /* PSEUDO syscalls */ > __sys_getlogin; >=20 > I have verified the above patch is working on SheevaPlug on FreeBSD > 10-CURRENT from 2012-05-15 and Perl 5.12.4. Perl has to be recompiled > after applying this patch. Well, both committed version and this version should work, the question is which fix is right. Is __flt_rounds supposed to be linked to by applications ? If the symbols are used by normal programs, that I think we should indeed guarantee ABI stability for them, and FBSD_1.3 namespace is the right namespace to use. I noted that the commit in question added the __flt_rounds symbol to the existing group of symbols probably related to FPU handling. The same question stands for that symbols too, is their placement into FBSDprivate namespace right ? --xtmLDbP6TiKhntQb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/XAowACgkQC3+MBN1Mb4gvyQCg9GhSvloZUIX3QoZKXlj1BGx8 wsIAoKJyzvLY6m8byxWDmvbpHXgaTD22 =0Awn -----END PGP SIGNATURE----- --xtmLDbP6TiKhntQb--