ports/143529: [PATCH] math/py-numpy: does not build

b. f. bf1783 at googlemail.com
Mon Feb 15 15:20:05 UTC 2010


The following reply was made to PR ports/143529; it has been noted by GNATS.

From: "b. f." <bf1783 at googlemail.com>
To: "Li-Lun Wang (Leland Wang)" <llwang at infor.org>
Cc: bug-followup at freebsd.org, amdmi3 at amdmi3.ru, gerald at freebsd.org
Subject: Re: ports/143529: [PATCH] math/py-numpy: does not build
Date: Mon, 15 Feb 2010 10:11:12 -0500

 On 2/15/10, b. f. <bf1783 at googlemail.com> wrote:
 > On 2/15/10, b. f. <bf1783 at googlemail.com> wrote:
 >>>From: "Li-Lun Wang (Leland Wang)" <llwang at infor.org>
 >>>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.
 
 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).  So my
 sketch should be altered to something like:
 
 
 ...
 .if exists(${LOCALBASE}/bin/as) && ${OSVERSION} <= 900009 && \
 (${ARCH} == "i386" || ${ARCH} == "amd64")
 .if ${ARCH} == "i386"
  FP_ARCH= i387
 .elif ${ARCH} == "amd64"
  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
 .endif
  ...
   pre-configure:
 .if exists(${LOCALBASE}/bin/as) && ${OSVERSION} <= 900009
       ${CP} ${DISTDIR}/fenv.h
  ${WRKSRC}/numpy/core/include/numpy/fenv/fenv.h; \
       ${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.
 
 b.


More information about the freebsd-python mailing list