You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm afraid I don't have enough SO reputation to comment on the site forms. I think the first poster is not using the pypi wheel, because it's trying to find the png library in X11, and our wheel builds don't build on a system with X11 installed. I suspect the second isn't either - could you clarify with them?
For the first, it would be helpful to know in which of the many possible ways the user is building matplotlib: i.e., from source, from MacPorts/fink/homebrew, from pip etc.
For the second, the user has clipped away the part of the output that describes a little bit about freetype and what was found. If I disable MacPorts, indeed it doesn't find freetype on my Yosemite Mac either. This one I can look into.
Indeed, it seems Apple moved freetype from /usr/X11/include to /opt/X11/include -- though that change goes back a long way, at least to Snow Leopard according to this:
Note that the X11 package needs to be installed to get the freetype library. Alternatively, MacPorts/fink/homebrew may be used to get freetype. But the base system does not have it.
The following patch will make this work with the X11 package (without requiring MacPorts/fink/homebrew).
@orome: With the patch above, are you able to build from source (not from pip)? Do you have at least one of X11, MacPorts, fink or homebrew installed? (For the latter three, also with the freetype package installed)?
Actually, it looks like that patch is already in the v1.4.x branch in the git repo -- if you check out from that, you shouldn't need to apply the patch.
I have x11 (2.7.7), in /opt/X11/; no MackPort, fink, or homebrew. The last problem-free update of matplotlib was 1.4.0 under Mavericks using the command line above (though I think with ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future, which was necessary for a while and no seems unneeded).
Not sure why I avoid wheels. Security? Maybe just habit. Anyway I often get get all kinds of errors when I use wheels, and using --no-use-wheel always works fine.
/***************************************************************************/
/* */
/* ft2build.h */
/* */
/* FreeType 2 build and setup macros. */
/* */
/* Copyright 1996-2001, 2006, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/
/*************************************************************************/
/* */
/* This is the `entry point' for FreeType header file inclusions. It is */
/* the only header file which should be included directly; all other */
/* FreeType header files should be accessed with macro names (after */
/* including `ft2build.h'). */
/* */
/* A typical example is */
/* */
/* #include <ft2build.h> */
/* #include FT_FREETYPE_H */
/* */
/*************************************************************************/
#ifndef __FT2BUILD_H__
#define __FT2BUILD_H__
#include <config/ftheader.h>
#endif /* __FT2BUILD_H__ */
/* END */
(The wheel issues don't just apply to matplotlib, I get them for a bunch of stuff. It's not really been a problem, since I prefer — for whatever reason I can't recall — to avoid them.)
Looked a bit more into this. It happens when pkg-config is not available. The current logic tries /opt/X11/ft2build.h but not /opt/X11/freetype2/ft2build.h as is should.
Activity
matthew-brett commentedon Oct 22, 2014
I'm afraid I don't have enough SO reputation to comment on the site forms. I think the first poster is not using the pypi wheel, because it's trying to find the png library in X11, and our wheel builds don't build on a system with X11 installed. I suspect the second isn't either - could you clarify with them?
mdboom commentedon Oct 22, 2014
For the first, it would be helpful to know in which of the many possible ways the user is building matplotlib: i.e., from source, from MacPorts/fink/homebrew, from pip etc.
For the second, the user has clipped away the part of the output that describes a little bit about freetype and what was found. If I disable MacPorts, indeed it doesn't find freetype on my Yosemite Mac either. This one I can look into.
mdboom commentedon Oct 22, 2014
Indeed, it seems Apple moved freetype from
/usr/X11/includeto/opt/X11/include-- though that change goes back a long way, at least to Snow Leopard according to this:http://xquartz.macosforge.org/trac/wiki/DeveloperInfo
Note that the X11 package needs to be installed to get the freetype library. Alternatively, MacPorts/fink/homebrew may be used to get freetype. But the base system does not have it.
The following patch will make this work with the X11 package (without requiring MacPorts/fink/homebrew).
jenshnielsen commentedon Oct 22, 2014
@mdboom Seems sensible. Should we add that to 1.4.2?
tacaswell commentedon Oct 22, 2014
👍 on getting that in for 1.4.2 That way we can blame the quick turn around an apple!
orome commentedon Oct 23, 2014
Full output. FWIW, I had
--no-use-wheel.mdboom commentedon Oct 23, 2014
@orome: With the patch above, are you able to build from source (not from pip)? Do you have at least one of X11, MacPorts, fink or homebrew installed? (For the latter three, also with the freetype package installed)?
mdboom commentedon Oct 23, 2014
Actually, it looks like that patch is already in the v1.4.x branch in the git repo -- if you check out from that, you shouldn't need to apply the patch.
orome commentedon Oct 23, 2014
@mdboom: Currently I use
pip install -U --no-use-wheel matplotlibWhat, if anything, should I try differently?
I have x11 (2.7.7), in
/opt/X11/; no MackPort, fink, or homebrew. The last problem-free update of matplotlib was 1.4.0 under Mavericks using the command line above (though I think withARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future, which was necessary for a while and no seems unneeded).1.4.2 also fails the same as described.
jenshnielsen commentedon Oct 24, 2014
@orome I guess that should work. Could you please attach the log output here?
Any particular reason why you want to avoid wheels?
orome commentedon Oct 24, 2014
@jenshnielsen: See log above.
Not sure why I avoid wheels. Security? Maybe just habit. Anyway I often get get all kinds of errors when I use wheels, and using
--no-use-wheelalways works fine.jenshnielsen commentedon Oct 24, 2014
Sorry missed that. Can you check if you have ft2build.h in /opt/X11/include/freetype2?
I have never had any issues with the matplotlib wheel so if you can reproduce the problems it would be great if you could raises that as a new issue.
orome commentedon Oct 24, 2014
@jenshnielsen: Yes:
(The wheel issues don't just apply to matplotlib, I get them for a bunch of stuff. It's not really been a problem, since I prefer — for whatever reason I can't recall — to avoid them.)
jenshnielsen commentedon Oct 24, 2014
I managed to reproduce your issue. Will se if I can find a fix
orome commentedon Oct 24, 2014
Thanks!
jenshnielsen commentedon Oct 24, 2014
Looked a bit more into this. It happens when pkg-config is not available. The current logic tries
/opt/X11/ft2build.hbut not/opt/X11/freetype2/ft2build.has is should.jenshnielsen commentedon Oct 24, 2014
The simple paths in #3713 gets it building without pkg-config for me.
jenshnielsen commentedon Oct 24, 2014
Just checked that Ubuntu also stores the freetype headers in a freetype2 subdir of /usr/include
tacaswell commentedon Nov 25, 2014
Closing this issue as the title is misleading and there is a PR open to address a related bug.