Ticket #5873 (needs_work defect)

Opened 17 months ago

Last modified 7 weeks ago

[patch] Fix matplotlib build on FreeBSD

Reported by: pjeremy Owned by: mabshoff
Priority: major Milestone: sage-4.5.3
Component: FreeBSD Keywords:
Cc: jason Author(s): Peter Jeremy
Report Upstream: Completely fixed; Fix reported upstream Reviewer(s):
Merged in: Work issues:

Description (last modified by pjeremy) (diff)

0) Add support for FreeBSD later than 6.x

1) Explicitly add SAGE_LOCAL to the dependency search path for matplotlib for FreeBSD - superceded by #9202

2) gcc-4.3 on FreeBSD (though not the base gcc4.2) appears to define putchar() in <stdio.h> in a way that breaks the putchar() definitions inside ttconv. It's not immediately clear what the problem is (since there's no immediately obvious difference in the way putchar() is defined in <stdio.h>) so this patch takes the easy way out and undef's the offending putchar() macro - no longer needed with gcc-4.5

3) Individual character bounding boxes in AFM files do not have to be integral so convert each bounding box to a list of floats, rather than a list of ints. This corrects a problem where most of the tests would fail with "ValueError?: invalid literal for int() with base 10: '539.621'" on FreeBSD - now integrated into matplotlib

Attachments

matplotlib-0.98.5.3rc0-svn6910.p3.patch Download (2.0 KB) - added by pjeremy 17 months ago.
5873.matplotlib.patch Download (0.8 KB) - added by pjeremy 8 months ago.
matplotlib-0.99.1.p4.patch Download (0.6 KB) - added by pjeremy 7 weeks ago.

Change History

Changed 17 months ago by pjeremy

  Changed 11 months ago by jason

  • summary changed from [with patch, needs review] Fix matplotlib build on FreeBSD to [with patch, needs work] Fix matplotlib build on FreeBSD

Of course, this should be added to the current matplotlib spkg.

Changed 8 months ago by pjeremy

  Changed 8 months ago by pjeremy

  • cc jason added
  • status changed from needs_work to needs_review
  • upstream set to N/A
  • summary changed from [with patch, needs work] Fix matplotlib build on FreeBSD to [patch] Fix matplotlib build on FreeBSD
  • author set to Peter Jeremy

5873.matplotlib.patch has been updated for matplotlib-0.99.1.p2. Of the patches mentioned in the original description, only the first part remains (and is still necessary).

The second part (related to putchar problems with gcc43) has been removed as it's no longer practical to build Sage with gcc43 on FreeBSD.

The third part (related to bounding box conversions) has been removed as an equivalent patch has been integrated into matplotlib-0.99.1

follow-up: ↓ 4   Changed 3 months ago by jason

The matplotlib spkg up at #9202 should take care of the remaining issue in this patch (by prepending the SAGE_LOCAL directory no matter what the platform). Can you check to see if #9202 fixes things?

in reply to: ↑ 3   Changed 7 weeks ago by drkirkby

Replying to jason:

The matplotlib spkg up at #9202 should take care of the remaining issue in this patch (by prepending the SAGE_LOCAL directory no matter what the platform). Can you check to see if #9202 fixes things?

Any thoughts about this Peter? I noticed you created (or at least edited) a wiki page about the FreeBSD port, and still reference this old patch, which is probably no longer needed.

Dave

follow-up: ↓ 6   Changed 7 weeks ago by pjeremy

  • status changed from needs_review to needs_work

Unfortunately, a variant of this patch is still needed to support FreeBSD later than FreeBSD6. Whilst #9202 means prepending SAGE_LOCAL should no longer be necessary, additional OS-related lines are still needed to support recent versions of FreeBSD.

in reply to: ↑ 5   Changed 7 weeks ago by drkirkby

Replying to pjeremy:

Unfortunately, a variant of this patch is still needed to support FreeBSD later than FreeBSD6. Whilst #9202 means prepending SAGE_LOCAL should no longer be necessary, additional OS-related lines are still needed to support recent versions of FreeBSD.

If you wish to create one, I'll try to review it reasonably quickly. It makes review a lot easier if you can include things inside

#ifdef FREEBSD 
#endif

or if appropriate

#ifdef HAVE_BUGGY_GCC_ON_FREEBSD
#undef putchar
#endif

or similar. Otherwise, it requires the reviewer to have a much deeper knowledge of the code to evaluate if the changes are desirable or not. If it can be seen the changes only affect FreeBSD, then it will be much easier to get a positive review. That's been my experience with Solaris and OpenSolaris related problems.

Dave

Changed 7 weeks ago by pjeremy

  Changed 7 weeks ago by pjeremy

  • description modified (diff)
  • upstream changed from N/A to Completely fixed; Fix reported upstream

Point 0 has been reported upstream as  https://sourceforge.net/tracker/?func=detail&aid=3031051&group_id=80706&atid=560722 and an updated patch (not yet converted to spkg) uploaded.

Note: See TracTickets for help on using tickets.