From owner-freebsd-python@FreeBSD.ORG Mon Feb 15 15:30:05 2010 Return-Path: Delivered-To: freebsd-python@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 947C31065670 for ; Mon, 15 Feb 2010 15:30:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2CCBE8FC1A for ; Mon, 15 Feb 2010 15:30:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o1FFU5C1099509 for ; Mon, 15 Feb 2010 15:30:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o1FFU5db099508; Mon, 15 Feb 2010 15:30:05 GMT (envelope-from gnats) Date: Mon, 15 Feb 2010 15:30:05 GMT Message-Id: <201002151530.o1FFU5db099508@freefall.freebsd.org> To: freebsd-python@FreeBSD.org From: "Li-Lun \"Leland\" Wang" Cc: Subject: Re: ports/143529: [PATCH] math/py-numpy: does not build X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Li-Lun \"Leland\" Wang" List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 15:30:05 -0000 The following reply was made to PR ports/143529; it has been noted by GNATS. From: "Li-Lun \"Leland\" Wang" To: bf1783@gmail.com Cc: bug-followup@freebsd.org, amdmi3@amdmi3.ru, gerald@freebsd.org Subject: Re: ports/143529: [PATCH] math/py-numpy: does not build Date: Mon, 15 Feb 2010 15:23:49 +0000 On Mon, Feb 15, 2010 at 3:11 PM, b. f. wrote: > On 2/15/10, b. f. wrote: >> On 2/15/10, b. f. wrote: >>>>From: "Li-Lun Wang (Leland Wang)" >>>>To: bug-followup at FreeBSD.org >>>>Cc: >>>>Subject: Re: ports/143529: [PATCH] math/py-numpy: does not build >>>>Date: Mon, 15 Feb 2010 12:50:24 +0800 >>>> >>>> -----BEGIN PGP SIGNED MESSAGE----- >>>> Hash: SHA1 >>> >>>>The following patch will fix the problem. =C2=A0It first detects if >>>> binutils>=3D2.18.50 is installed. =C2=A0If it is, then it patches nump= y so >>>> that the new fenv.h will be used if __FreeBSD_version <=3D 900009. >>> >>> This fixes the build problem on i386 (although we're stuck with >>> possible run-time problems when numpy is built with the newer binutils >>> until the latest fenv.h changes are backported to all supported >>> versions of FreeBSD), but this code is machine-dependent, and fenv.h >>> needs to be selected based on ARCH. > > Oops: it seems that the r203441 only affected amd64 and i386, so the > latest headers shouldn't be used for the other architectures (there > may be problems lurking there, too, but that's another matter). =C2=A0So = my > sketch should be altered to something like: > > > ... > .if exists(${LOCALBASE}/bin/as) && ${OSVERSION} <=3D 900009 && \ > (${ARCH} =3D=3D "i386" || ${ARCH} =3D=3D "amd64") > .if ${ARCH} =3D=3D "i386" > =C2=A0FP_ARCH=3D i387 > .elif ${ARCH} =3D=3D "amd64" > =C2=A0FP_ARCH=3D ${ARCH} > .endif > MASTER_SITES+=3D http://svn.freebsd.org/base/head/lib/msun/%SUBDIR%/:fp > MASTER_SITE_SUBDIR+=3D ${FP_ARCH}/:fp > =C2=A0DISTFILES+=3D fenv.h:fp > .endif > .endif > =C2=A0... > =C2=A0pre-configure: > .if exists(${LOCALBASE}/bin/as) && ${OSVERSION} <=3D 900009 > =C2=A0 =C2=A0 =C2=A0${CP} ${DISTDIR}/fenv.h > =C2=A0${WRKSRC}/numpy/core/include/numpy/fenv/fenv.h; \ > =C2=A0 =C2=A0 =C2=A0${PATCH} ${PATCH_DIST_ARGS} < ${FILESDIR}/fenv.patch;= \ > .endif > ... > > But again, this probably isn't necessary if lang/gcc44 is only using > the base system binutils, and indeed may fail if lang/gcc44 was built > when devel/binutils was not installed -- so we should see first what > action will be taken regarding lang/gcc44, or use a more refined test. I agree. This really isn't a bug in the numpy port, but the unfortunate result of devel/binutils and bug in fenv.h. Fixing in the numpy side is more of just a hack to make it build. -- llwang