From owner-freebsd-python@FreeBSD.ORG Mon Feb 15 13:00:22 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 5789A106566C for ; Mon, 15 Feb 2010 13:00:22 +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 2CD188FC08 for ; Mon, 15 Feb 2010 13:00:22 +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 o1FD0MKM071215 for ; Mon, 15 Feb 2010 13:00:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o1FD0Llx071210; Mon, 15 Feb 2010 13:00:22 GMT (envelope-from gnats) Date: Mon, 15 Feb 2010 13:00:22 GMT Message-Id: <201002151300.o1FD0Llx071210@freefall.freebsd.org> To: freebsd-python@FreeBSD.org From: "b. f." 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: "b. f." List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 13:00:22 -0000 The following reply was made to PR ports/143529; it has been noted by GNATS. From: "b. f." To: "Li-Lun Wang (Leland Wang)" 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 07:58:47 -0500 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. It first detects if >> binutils>=2.18.50 is installed. If it is, then it patches numpy so >> that the new fenv.h will be used if __FreeBSD_version <= 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. > > You might do instead something like: > > ... > .if exists(${LOCALBASE}/bin/as) > .if ${ARCH} == "i386" > FP_ARCH= i387 > .else > FP_ARCH= ${ARCH} > .endif > MASTER_SITES+= http://svn.freebsd.org/base/head/lib/msun/%SUBDIR%/:fp > MASTER_SITE_SUBDIR+= ${FP_ARCH}/:fp > DISTFILES+= fenv.h:fp > .endif > ... > pre-configure: > .if exists(${LOCALBASE}/bin/as) > ${CP} ${DISTDIR}/fenv.h ${WRKSRC}/numpy/core/include/numpy/fenv/fenv.h; > \ > ${PATCH} ${PATCH_DIST_ARGS} < ${FILESDIR}/fenv.patch; \ > .endif > ... > I should note that a specific snapshot of the headers may be preferred to head, to ease maintenance. You may also wish to add some specific provisions for the "makesum" target. This problem is occurring with lang/gcc44 from Ports, when devel/binutils is installed, because then the latest gcc44 snapshots are automatically preferring devel/binutils to the base system binutils. This is a bug in the lang/gcc44 port, and it should be explicitly instructed to use one or the other (either hardcoded, or based upon an OPTION), as lang/gcc45 is now wired to devel/binutils. I have cc'ed the gcc maintainer. b.