Opened 13 years ago

Closed 10 years ago

#7831 closed defect (duplicate)

numpy-1.5.0 fixes for FreeBSD

Reported by: Peter Jeremy Owned by: Peter Jeremy
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: porting: BSD Keywords:
Cc: Merged in:
Authors: Reviewers: Stephen Montgomery-Smith
Report Upstream: None of the above - read trac for reasoning. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Peter Jeremy)

  • By default, numpy references threaded atlas libraries, as well as a custom variant on the lapack library, on FreeBSD. The reasoning behind this is unclear - there is nothing in the numpy documentation to indicate whether a threaded or non-threaded atlas is needed and the publicly available SVN logs do not mention this code. A query to the numpy mailing list elicited a response that either threaded or non-threaded atlas can be used and suggesting that the special-casing for FreeBSD may be obsolete. By default, atlas is built non-threaded and r-2.6.1.p23 assumes a non-threaded atlas and fails when only the threaded libraries are installed. Based on this, the special casing for FreeBSD was removed from numpy - it now uses the same libraries irrespective of the host OS. This part of the patch could potentially be integrated upstream but this has not been done yet.
  • A patch to spkg-install is required to ensure that the <math.h> in $SAGE_LOCAL/include is used in place of the system <math.h>, otherwise the additional maths functions provided by cephes are not prototyped, leading to lots of "implicit declaration" warnings whilst compiling (eg) numpy/core/src/npymath/npy_math_complex.c.src

Attachments (1)

7831.numpy.patch (988 bytes) - added by Peter Jeremy 12 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 13 years ago by Peter Jeremy

Status: newneeds_review

comment:2 Changed 13 years ago by Mike Hansen

Reviewers: Mike Hansen
Status: needs_reviewpositive_review

These changes look good to me. Could you look over the ones at #7321? I'll handle making an spkg with all of these rolled together.


comment:3 Changed 13 years ago by Minh Van Nguyen

Reviewers: Mike HansenMike Hansen, Minh Van Nguyen
Status: positive_reviewneeds_work

Updated spkg at

which incorporates the patch 7831.numpy.patch. This spkg needs review by anyone other than me.

comment:4 Changed 13 years ago by Minh Van Nguyen

Status: needs_workneeds_review

comment:5 Changed 12 years ago by Mike Hansen

Status: needs_reviewpositive_review

Looks fine. The the changes based on the newest spkg are at

comment:6 Changed 12 years ago by Robert Miller

There is another ticket updating numpy as well: #8010. These two conflicting spkg's need to be resolved.

comment:7 Changed 12 years ago by Robert Miller

Status: positive_reviewneeds_work

comment:8 Changed 12 years ago by Karl-Dieter Crisman

Since #8010 has been closed, it would be helpful to know whether the changes here are still needed (which I can't test, unfortunately).

comment:9 Changed 12 years ago by Felix Lawrence

Can someone verify whether this is fixed by other changes to the numpy package in 4.6.1alpha0?

comment:10 Changed 12 years ago by Peter Jeremy

Description: modified (diff)
Summary: numpy-1.3.0.p2 fixes for FreeBSDnumpy-1.5.0 fixes for FreeBSD

The changes don't appear to be needed any longer but the remaining fixes are still required.

Changed 12 years ago by Peter Jeremy

Attachment: 7831.numpy.patch added

comment:11 Changed 12 years ago by Karl-Dieter Crisman

Note that numpy 1.5.1 is on the way to Sage - #10792. It would be great to get this incorporated with that.

comment:12 Changed 11 years ago by Karl-Dieter Crisman

Apparently Stephen Montgomery-Smith has had some success with this recently as a "port".

comment:13 Changed 10 years ago by Karl-Dieter Crisman

Status: needs_workneeds_info

More success at this thread. Checking whether it was with a system version or Sage version.

comment:14 Changed 10 years ago by Karl-Dieter Crisman

Authors: Peter Jeremy
Milestone: sage-5.1sage-duplicate/invalid/wontfix
Reviewers: Mike Hansen, Minh Van Nguyen
Status: needs_infoneeds_review

Just noting here that although this was the Sage version, Numpy upstream still has the special FreeBSD code, here as of June 2012, so the patch definitely hasn't been applied. My sense is that probably the R upgrades over the years is what made this obsolete.

So I'm putting this to positive review as it builds (and so does R) and passes the overwhelming majority of tests on FreeBSD 8 and 9, but leaving this info here in case in certain unusual cases this ends up being a problem after all.

comment:15 Changed 10 years ago by Karl-Dieter Crisman

Reviewers: Stephen Montgomery-Smith
Status: needs_reviewpositive_review

comment:16 Changed 10 years ago by Jeroen Demeyer

Resolution: duplicate
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.