Ticket #7856 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

update matplotlib hack for OS X

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

Description (last modified by was) (diff)

See the discussion on #7095.

Change History

comment:1 Changed 3 years ago by was

  • Status changed from new to needs_review
  • Description modified (diff)

comment:2 Changed 3 years ago by was

  • Status changed from needs_review to needs_work
  • Description modified (diff)

comment:3 Changed 3 years ago by was

  • Status changed from needs_work to needs_review

comment:5 follow-up: ↓ 11 Changed 3 years ago by jhpalmieri

  • Status changed from needs_review to needs_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 3 years ago by jhpalmieri

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

comment:7 Changed 3 years ago by jhpalmieri

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 3 years ago by was

  • Status changed from needs_work to needs_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 3 years ago by jhpalmieri

  • Status changed from needs_review to positive_review

comment:10 Changed 3 years ago by jhpalmieri

  • Reviewers set to John Palmieri
  • Authors set to William Stein

comment:11 in reply to: ↑ 5 ; follow-up: ↓ 12 Changed 3 years ago by 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.

comment:12 in reply to: ↑ 11 Changed 3 years ago by jhpalmieri

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 3 years ago by rlm

  • Status changed from positive_review to closed
  • Resolution set to fixed
  • Merged in set to 4.3.1.alpha2

comment:14 Changed 3 years ago by mvngu

  • Merged in changed from 4.3.1.alpha2 to sage-4.3.1.alpha2
Note: See TracTickets for help on using tickets.