From owner-freebsd-python@FreeBSD.ORG Sun Feb 23 05:47:56 2014 Return-Path: Delivered-To: python@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62EBE84E for ; Sun, 23 Feb 2014 05:47:56 +0000 (UTC) Received: from ainaz.pair.com (ainaz.pair.com [209.68.2.66]) by mx1.freebsd.org (Postfix) with ESMTP id 37CA41A6A for ; Sun, 23 Feb 2014 05:47:55 +0000 (UTC) Received: from [149.44.171.213] (nat.nue.novell.com [195.135.221.2]) by ainaz.pair.com (Postfix) with ESMTPSA id CFB6E3F472; Sun, 23 Feb 2014 00:47:51 -0500 (EST) Date: Sun, 23 Feb 2014 06:48:05 +0100 (CET) From: Gerald Pfeifer To: William Grzybowski , python@freebsd.org Subject: Re: python packages struggling with GCC 4.7 In-Reply-To: Message-ID: References: <201311060508.rA658XmR012155@svn.freebsd.org> <20131106063906.GA1385@medusa.sysfault.org> <20131106070255.GE60770@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 05:47:56 -0000 On Thu, 5 Dec 2013, Gerald Pfeifer wrote: > On Wed, 4 Dec 2013, William Grzybowski wrote: >> It looks like the build is not respecting FFLAGS, so no -Wl,rpath= for >> gfortran. As far as it working for gcc46, it looks like it fails to >> detect gfortran46 as a compiler and uses gcc46, which respects CFLAGS. > > That is, hmm, interesting. =:-) Nice analysis. > >> Can you try http://people.freebsd.org/~wg/py-numpy.patch ? > > Thanks for the patch! > > Is there any chance that someone on python@ can give it a try? That > would be great since I am traveling right now and hardly can test. No takers? :-) With some unplanned offline-ness on my side, this has now taken far longer than I had hoped for, but I managed to test this patch now (reproducing both the original failure and then a build without) -- and this patch, once I got it to apply, works! Thanks a lot. Shall I go ahead and commit it, or would you prefer to? Gerald Index: math/py-numpy/files/patch-numpy-distutils-fcompiler-gnu.py =================================================================== --- math/py-numpy/files/patch-numpy-distutils-fcompiler-gnu.py (revision 345690) +++ math/py-numpy/files/patch-numpy-distutils-fcompiler-gnu.py (working copy) @@ -17,7 +17,16 @@ + g2c = '%%FC%%' suggested_f90_compiler = 'gnu95' + +@@ -101,6 +101,8 @@ + def get_flags_linker_so(self): + opt = self.linker_so[1:] ++ if 'FFLAGS' in os.environ: ++ opt.append(os.environ['FFLAGS']) + if sys.platform=='darwin': + target = os.environ.get('MACOSX_DEPLOYMENT_TARGET', None) + # If MACOSX_DEPLOYMENT_TARGET is set, we simply trust the value @@ -249,7 +249,7 @@ # GNU Fortran 95 (GCC) 4.2.0 20060218 (experimental) # GNU Fortran (GCC) 4.3.0 20070316 (experimental)