Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#16047 closed defect (fixed)

Fix mpl header search issues on OS X 10.4

Reported by: kcrisman Owned by:
Priority: blocker Milestone: sage-6.2
Component: packages: standard Keywords:
Cc: ppurka, fbissey Merged in:
Authors: Karl-Dieter Crisman Reviewers: Volker Braun
Report Upstream: Fixed upstream, but not in a stable release. Work issues:
Branch: a0f1bc5 (Commits, GitHub, GitLab) Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by kcrisman)

I have no idea whether this is really just an issue on this platform, but it was discovered here. Thanks to ppurka for tracking down the likely culprit for this failure here.

matplotlib-1.3.1
====================================================
Setting up build directory for matplotlib-1.3.1
Finished set up
****************************************************
Host system:
Darwin Dasher-03.local 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc
****************************************************
C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/Users/student/Desktop/sage-6.2.beta5/local/libexec/gcc/powerpc-apple-darwin8.11.0/4.7.3/lto-wrapper
Target: powerpc-apple-darwin8.11.0
Configured with: ../src/configure --prefix=/Users/student/Desktop/sage-6.2.beta5/local --with-local-prefix=/Users/student/Desktop/sage-6.2.beta5/local --with-gmp=/Users/student/Desktop/sage-6.2.beta5/local --with-mpfr=/Users/student/Desktop/sage-6.2.beta5/local --with-mpc=/Users/student/Desktop/sage-6.2.beta5/local --with-system-zlib --disable-multilib --disable-nls  
Thread model: posix
gcc version 4.7.3 (GCC) 
****************************************************
NOTE: Set SAGE_MATPLOTLIB_GUI to anything but 'no' to try to build the Matplotlib GUI.
Not building any matplotlib graphical backends.
patching file lib/matplotlib/tri/_tri.cpp
patching file lib/matplotlib/tri/_tri.h
patching file setup.py
============================================================================
Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
            matplotlib: yes [1.3.1]
                python: yes [2.7.5 (default, Mar 26 2014, 08:50:37)  [GCC
                        4.7.3]]
              platform: yes [darwin]

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.7.0]
              dateutil: yes [using dateutil version 2.2]
               tornado: yes [tornado was not found. It is required for the
                        WebAgg backend. pip/easy_install may attempt to
                        install it after matplotlib.]
             pyparsing: yes [using pyparsing version 2.0.1]
                 pycxx: yes [Couldn't import.  Using local copy.]
                libagg: yes [pkg-config information for 'libagg' could not
                        be found. Using local copy.]
              freetype: no  [The C/C++ header for freetype2 (ft2build.h)
                        could not be found.  You may need to install the
                        development package.]
                   png: yes [pkg-config information for 'libpng' could not
                        be found. Using unknown version.]

OPTIONAL SUBPACKAGES
           sample_data: yes [installing]
              toolkits: yes [installing]

OPTIONAL BACKEND EXTENSIONS
                macosx: no  [skipping due to configuration]
                qt4agg: no  [PyQt4 not found]
               gtk3agg: no  [Requires pygobject to be installed.]
             gtk3cairo: no  [Requires cairo to be installed.]
                gtkagg: no  [skipping due to configuration]
                 tkagg: no  [skipping due to configuration]
                 wxagg: no  [skipping due to configuration]
                   gtk: no  [skipping due to configuration]
                   agg: yes [installing]
                 cairo: no  [cairo not found]
             windowing: no  [skipping due to configuration]

OPTIONAL LATEX DEPENDENCIES
                dvipng: no
           ghostscript: no
                 latex: no
               pdftops: no

============================================================================
                        * The following required packages can not be built:
                        * freetype
Error building matplotlib package.

real    0m10.504s
user    0m4.290s
sys     0m2.525s
************************************************************************
Error installing package matplotlib-1.3.1
************************************************************************

See another reports on homebrew for something very similar. Here are some fixes. Somewhat surprisingly, the mpl commit is a one-liner.

Change History (9)

comment:1 Changed 8 years ago by kcrisman

  • Description modified (diff)

comment:2 Changed 8 years ago by kcrisman

  • Report Upstream changed from N/A to Fixed upstream, but not in a stable release.

Yup, just adding a patch in build/pkgs/matplotlib/patches with this commit got me to the actual build of mpl. It's not clear when the next upstream release is, but it's fixed in their trunk so no need to report upstream.

comment:3 Changed 8 years ago by kcrisman

  • Branch set to u/kcrisman/mpl-freetype-fix
  • Commit set to a0f1bc5642ba189560bfaa6a4870aa0ce668d522

comment:4 Changed 8 years ago by kcrisman

  • Authors set to Karl-Dieter Crisman
  • Status changed from new to needs_review

I am annoyed that I had to do this setting of the branch by hand. The devel guide said so but I didn't have it figure out that it really meant "set it by typing on Trac". Huh.

This and I think a few other mpl patches will need to be removed whenever mpl upgrades but that will be a while, perhaps.

comment:5 follow-up: Changed 8 years ago by fbissey

My head hurts trying to think why it is an issue with your mac and not on other platforms. There must be something that setupext.py finds on a OS X 10.4 before the stuff in pkg-config that it doesn't on other platform. I almost fell like resurrecting an ancient distro to test that theory.

comment:6 in reply to: ↑ 5 Changed 8 years ago by kcrisman

My head hurts trying to think why it is an issue with your mac and not on other platforms. There must be something that setupext.py finds on a OS X 10.4 before the stuff in pkg-config that it doesn't on other platform. I almost fell like resurrecting an ancient distro to test that theory.

Yay, I made someone's head hurt!

Seriously, I was baffled - and why does it hurt pip install but not others? - but at any rate this works *and* (crucially) is already in upstream, so as long as it doesn't give us any surprises I figure we should be okay. (For instance, someone might want to make sure that a few figures actually plot correctly with this.)

comment:7 Changed 8 years ago by vbraun

  • Reviewers set to Volker Braun
  • Status changed from needs_review to positive_review

comment:8 Changed 8 years ago by vbraun

  • Branch changed from u/kcrisman/mpl-freetype-fix to a0f1bc5642ba189560bfaa6a4870aa0ce668d522
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:9 Changed 8 years ago by kcrisman

  • Commit a0f1bc5642ba189560bfaa6a4870aa0ce668d522 deleted

See also #16084.

Note: See TracTickets for help on using tickets.