Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#7856 closed defect (fixed)

update matplotlib hack for OS X

Reported by: William Stein Owned by: tbd
Priority: blocker Milestone: sage-4.3.1
Component: packages: standard Keywords:
Cc: Merged in: sage-4.3.1.alpha2
Authors: William Stein Reviewers: John Palmieri
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by William Stein)

See the discussion on #7095.

Change History (14)

comment:1 Changed 13 years ago by William Stein

Description: modified (diff)
Status: newneeds_review

comment:2 Changed 13 years ago by William Stein

Description: modified (diff)
Status: needs_reviewneeds_work

comment:3 Changed 13 years ago by William Stein

Status: needs_workneeds_review

comment:5 Changed 13 years ago by John Palmieri

Status: needs_reviewneeds_work

A few quick comments: SPGK.txt needs to be updated. Also, is the hack appropriate for OS X running 10.5 (since it now just checks for "DARWIN", not the version number)? I don't have access to a machine to test that.

Finally, if SAGE64 is set and we're on DARWIN, is it worth making some of the other changes in http://blog.hyperjeff.net/?p=160? For example, in src/make.osx, changing

CFLAGS="-arch i386 -arch ppc -I${PREFIX}/include -I${PREFIX}/include/freetype2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
LDFLAGS="-arch i386 -arch ppc -L${PREFIX}/lib -syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"

so that "-arch ppc" gets changed to "-arch x86_64"? (That web page also suggests adding "FFLAGS", and making a few other changes. We can defer these until later, also.)

comment:6 Changed 13 years ago by John Palmieri

Oh, also, the file patches/osx10.6hack~ should be deleted.

comment:7 Changed 13 years ago by John Palmieri

As far as actual testing goes, on my OS X 10.6 machines:

  • before the patch, if I delete the files in ~/.matplotlib, then sage: plot(sin) causes a crash.
  • after the patch, if I delete the files in ~/.matplotlib, then sage: plot(sin) works fine.
  • this is completely reproducible: if I force installation of the old matplotlib spkg, then the crashes come back, and then if I force installation of the new one, the crashes go away.

So positive review, modulo the comments made above.

Do we need to test on an OS X 10.5 machine?

comment:8 Changed 13 years ago by William Stein

Status: needs_workneeds_review

A few quick comments: SPGK.txt needs to be updated. Also, is the hack appropriate for OS X running 10.5 (since it now just checks for "DARWIN", not the version number)?

It runs patches/osx10.6hack on any OS X, but *only* actually applies the hack on 10.6. It immediately exits patches/osx10.6hack on other than 10.6.

I've updated the spkg, and also now tested it on 10.5 and it works fine (as before). So, can you change it to positive review?

comment:9 Changed 13 years ago by John Palmieri

Status: needs_reviewpositive_review

comment:10 Changed 13 years ago by John Palmieri

Authors: William Stein
Reviewers: John Palmieri

comment:11 in reply to:  5 ; Changed 13 years ago by Karl-Dieter Crisman

Please see http://www.mail-archive.com/matplotlib-checkins@lists.sourceforge.net/msg04165.html and http://www.mail-archive.com/matplotlib-checkins@lists.sourceforge.net/msg04166.html for something which looks relevant - namely, DPY_ARRAYAUNIQUE_SYMBOL is, in fact, a typo for DPY_ARRAY_UNIQUE_SYMBOL. I don't know if this would fix things for us, but at any rate the 'horrible hack' uses precisely this (incorrect) variable, so we should at least fix both the source and the hack to use the correct one.

comment:12 in reply to:  11 Changed 13 years ago by John Palmieri

Replying to kcrisman:

Please see http://www.mail-archive.com/matplotlib-checkins@lists.sourceforge.net/msg04165.html and http://www.mail-archive.com/matplotlib-checkins@lists.sourceforge.net/msg04166.html for something which looks relevant - namely, DPY_ARRAYAUNIQUE_SYMBOL is, in fact, a typo for DPY_ARRAY_UNIQUE_SYMBOL. I don't know if this would fix things for us, but at any rate the 'horrible hack' uses precisely this (incorrect) variable, so we should at least fix both the source and the hack to use the correct one.

I tried just the patches mentioned above, not the "horrible hack", but it didn't work: the hack was needed to avoid crashes.

comment:13 Changed 13 years ago by Robert Miller

Merged in: 4.3.1.alpha2
Resolution: fixed
Status: positive_reviewclosed

comment:14 Changed 13 years ago by Minh Van Nguyen

Merged in: 4.3.1.alpha2sage-4.3.1.alpha2
Note: See TracTickets for help on using tickets.