From owner-freebsd-sparc64@FreeBSD.ORG Sun Dec 26 23:07:17 2010 Return-Path: Delivered-To: freebsd-sparc64@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CB50106564A; Sun, 26 Dec 2010 23:07:17 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id 7F74B8FC15; Sun, 26 Dec 2010 23:07:16 +0000 (UTC) Received: from ncsc.bris.ac.uk ([137.222.10.41]) by dirg.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1PWzgI-0005wx-En; Sun, 26 Dec 2010 23:07:15 +0000 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncsc.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1PWzgI-0002cq-4J; Sun, 26 Dec 2010 23:07:14 +0000 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.4/8.14.4) with ESMTP id oBQN7DOS098319; Sun, 26 Dec 2010 23:07:13 GMT (envelope-from mexas@bristol.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.4/8.14.4/Submit) id oBQN7DAe098318; Sun, 26 Dec 2010 23:07:13 GMT (envelope-from mexas@bristol.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bristol.ac.uk using -f Date: Sun, 26 Dec 2010 23:07:13 +0000 From: Anton Shterenlikht To: Marius Strobl Message-ID: <20101226230713.GA98255@mech-cluster241.men.bris.ac.uk> References: <20101115105450.GA27736@mech-cluster241.men.bris.ac.uk> <20101115184820.GL1517@funkthat.com> <20101116093136.GD69044@mech-cluster241.men.bris.ac.uk> <20101117134849.GB5988@mech-cluster241.men.bris.ac.uk> <20101117212624.GA90049@alchemy.franken.de> <20101118110725.GA83468@mech-cluster241.men.bris.ac.uk> <20101119162052.GH80343@alchemy.franken.de> <20101122084206.GA45104@mech-cluster241.men.bris.ac.uk> <20101224223216.GA23150@mech-cluster241.men.bris.ac.uk> <20101224225516.GS61199@alchemy.franken.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101224225516.GS61199@alchemy.franken.de> User-Agent: Mutt/1.4.2.3i Cc: freebsd-sparc64@FreeBSD.org, ale@FreeBSD.org Subject: SOLVED: Re: port math/gmp fails regression tests [WAS: port lang/gcc45 - not sure how to interpret GCC developers' advice] X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Dec 2010 23:07:17 -0000 On Fri, Dec 24, 2010 at 11:55:16PM +0100, Marius Strobl wrote: > On Fri, Dec 24, 2010 at 10:32:16PM +0000, Anton Shterenlikht wrote: > > On Mon, Nov 22, 2010 at 08:42:06AM +0000, Anton Shterenlikht wrote: > > > On Fri, Nov 19, 2010 at 05:20:52PM +0100, Marius Strobl wrote: > > > > On Thu, Nov 18, 2010 at 11:07:25AM +0000, Anton Shterenlikht wrote: > > > > > On Wed, Nov 17, 2010 at 10:26:24PM +0100, Marius Strobl wrote: > > > > > > On Wed, Nov 17, 2010 at 01:48:49PM +0000, Anton Shterenlikht wrote: > > > > > > > On Tue, Nov 16, 2010 at 09:31:37AM +0000, Anton Shterenlikht wrote: > > > > > > > > On Mon, Nov 15, 2010 at 10:48:20AM -0800, John-Mark Gurney wrote: > > > > > > > > > Anton Shterenlikht wrote this message on Mon, Nov 15, 2010 at 10:54 +0000: > > > > > > > > > > On sparc64 -current r212302 I'm having trouble > > > > > > > > > > building port lang/gcc45. > > > > > > > > > > > > > > > > > > > > Before I go any further, let me just check if anybody > > > > > > > > > > on this list has built gcc45 successfully? > > > > > > > > > > > > > > > > > > > > Here's my GCC bug submission: > > > > > > > > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46086 > > > > > > > > > > > > > > > > > > > > I just can't understand what the GCC folks tell me to do. > > > > > > > > > > > > > > > > > > > > They referred me to this page: > > > > > > > > > > http://gcc.gnu.org/install/specific.html#sparc-x-x > > > > > > > > > > > > > > > > > > > > and apparently to this paragraph: > > > > > > > > > > > > > > > > > > > > *quote* > > > > > > > > > > Newer versions of the GNU Multiple Precision Library (GMP), > > > > > > > > > > the MPFR library and the MPC library are known to be > > > > > > > > > > miscompiled by earlier versions of GCC on these platforms. > > > > > > > > > > We therefore recommend the use of the exact versions of > > > > > > > > > > these libraries listed as minimal versions in the prerequisites. > > > > > > > > > > *end quote* > > > > > > > > > > > > > > > > > > > > The prerequisites link lists: > > > > > > > > > > > > > > > > > > > > GNU Multiple Precision Library (GMP) version 4.3.2 (or later) > > > > > > > > > > MPFR Library version 2.4.2 (or later) > > > > > > > > > > > > > > > > > > > > I've installed: > > > > > > > > > > > > > > > > > > > > gmp-5.0.1 > > > > > > > > > > gmp-ecm-6.3 > > > > > > > > > > mpfr-3.0.0 > > > > > > > > > > > > > > > > > > > > So do they mean to say that I should downgrade to GMP 4.3.2 and > > > > > > > > > > MPFR 2.4.2? > > > > > > > > > > > > > > > > > > Yes, I believe that they do. I think the important phrase is: > > > > > > > > > exact versions of these libraries listed as minimal versions > > > > > > > > > > > > > > > > > > which isn't very clear, but saying use the minimal version listed on > > > > > > > > > the page... They probably had someone try w/ 4.3.3 and wonder why it > > > > > > > > > wasn't working so they added the exact verbage... > > > > > > > > > > > > > > > > ok, I get it. However, the ports above were pulled up and > > > > > > > > installed when I was building gcc45. So downgrading might > > > > > > > > break ports interdependency. I'll try instead to build GMP > > > > > > > > and MPFR with gcc44. > > > > > > > > > > > > > > I've rebuilt GMP with gcc 4.4.6 20101026, > > > > > > > and discovered that it fails regression tests. > > > > > > > Here's my log: > > > > > > > > > > > > > > http://seis.bris.ac.uk/~mexas/gmp-5.0.1-regression-test.log > > > > > > > > > > > > > > Can anybody on this list confirm (or otherwise) this. > > > > > > > > > > > > > > I also checked that GMP passes all tests fine on amd64 and ia64, > > > > > > > so the issue indeed seems to be sparc64 specific. > > > > > > > > > > > > > > > > > > > You seem to be building the gmp port with a non-base compiler but the > > > > > > regression test of the port is picking up the base libstdc++. Likely > > > > > > you need fix your search path for the dynamic linker to include the > > > > > > directory of the libraries of the gcc port you are using (I think for > > > > > > the gcc* ports this is intended to be done via ldconfig(8), i.e. the > > > > > > `ldconfig -r` output needs to include the libstdc++.so.6 of that gcc > > > > > > port) or to include it before the base counterparts. If that doesn't > > > > > > solve your problem you should talk to the port maintainer. > > > > > > > > > > That seems to be the case: > > > > > > > > > > # pwd > > > > > /usr/ports/math/gmp > > > > > # ldconfig -r | grep stdc > > > > > 85:-lstdc++.6 => /usr/lib/libstdc++.so.6 > > > > > 251:-lstdc++.6 => /usr/local/lib/gcc44/libstdc++.so.6 > > > > > > > > > > Perhaps the order is wrong? > > > > > > > > If `nm -D /usr/local/lib/gcc44/libstdc++.so.6 | grep GLIBCXX_3.4.11` > > > > returns a hit then it most likely is. In that case I'm not sure how > > > > the gcc ports are expected to be usable out-of-the-box though as > > > > /etc/rc.d/ldconfig always adds /usr/lib before any local paths. The > > > > only way I see then is to always set LD_LIBRARY_PATH to something > > > > like "/usr/local/lib/gcc44 /lib /usr/lib /usr/local/lib" in the > > > > environment. I think (but may be wrong) that there was also a way > > > > to tell ld(1) to record the path to the library but that likely > > > > wouldn't be usable with every port being built with a non-base gcc. > > > > > > # nm -D /usr/local/lib/gcc44/libstdc++.so.6 | grep GLIBCXX_3.4.11 > > > 0000000000000000 A GLIBCXX_3.4.11 > > > # > > > > > > > I advanced no further in this. > > Setting LD_LIBRARY_PATH as above didn't help - still failed the tests. > > > > I didn't get anything from the GMP folks either: > > http://gmplib.org/list-archives/gmp-bugs/2010-November/002100.html > > > > I just can't see any difference between amd64 and ia64, where > > the tests pass, and sparc, where the tests fail: > > > > http://seis.bris.ac.uk/~mexas/gmp-5.0.1/ > > > > According to your logs on amd64 and ia64 you are compiling gmp with > the system gcc where as on sparc64 you are using the gcc44 port, > which ships with a conflicting libstdc++.so.6. I'd suggest to ask > the maintainer of the gcc port how this is supposed to work, i.e. > what's the right way to actually use the C++ programs built with > the gcc port. So far I don't see any gmp or sparc64 specific problem > here and building gmp with the gcc44 port on amd64 and ia64 should > result in the same problem. This is really strange. I switched back to the default system complier, gcc4.2.1, and now gmp pass all tests, gcc45 builds fine, and I can build and use math/lapack. I'm sure I started with the default compiler initially. So, perhaps something changed in math/gmp in the meantime.. I apologise for wasting everybody's time. anton -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423