Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message when freetype headers are not found using python3 #4305

Merged
merged 1 commit into from Apr 3, 2015

Conversation

jenshnielsen
Copy link
Member

Make it possible to disable the pgk-config version check even when a version is not known and use this with freetype.

This avoids trying to compare numbers to a string when the freetype version
cound not be found from headers or freetype-config. pgk-config is useless
for detecting the freetype version since it returns the libtool version and not the freetype version.

The result when freetype is not found is now (both python 2 and 3)

freetype: no  [The C/C++ header for freetype2 (ft2build.h)
                        could not be found.  You may need to install the
                        development package.]

There is still scope for some larger improvements in the setupext.py code but these are the minimum changes needed to fix the issue reported at the mailing list here http://matplotlib.1069221.n5.nabble.com/matplotlib-devel-1-4-3-does-not-build-on-Ubuntu-14-with-python3-td45301.html

We might want to backport this to color_overhaul

Even when a version is not known and use this with freetype.
This avoids trying to compare numbers to a string when the freetype version
cound not be found from headers or freetype-config. pgk-config is useless
for detecting the freetype version since it returns the libtool version.

Set it to None instead
@tacaswell
Copy link
Member

👍 On backporting.

@montefra
Copy link
Contributor

montefra commented Apr 2, 2015

for the records: both on (k)ubuntu 14.10 and opensuse tumbleweeds I had to install
development packages of freetype and libXft to get rid of the nasty error message and be able to install matplotlib. Might be worth to point out also about the second dependency, to avoid other bug reports.

souce

@jenshnielsen
Copy link
Member Author

In my testing I can't see any sign that libxft-dev is a dependency needed here. It is a dependency of some of the gui backends but that is a different issue and should be correctly handled by the apt-get

I.e. the following works for me without any issues:

sudo apt-get remove libxft-dev
python setup.py build

Can you be a bit more specific about which error message you see with freetype dev headers installed and not libxft-dev?

@mdboom
Copy link
Member

mdboom commented Apr 2, 2015

👍

@montefra
Copy link
Contributor

montefra commented Apr 2, 2015

Sorry about the noise.

The problem is that on opensuse there is a freetype-devel and freetype2-devel and I need the latter to build matplotlib. It is installed by libxft-devel.
Now I switch to my kubuntu os and I check there too.

Edit:

on kubuntu I could install matplotlib after removing libxft-dev. I thought I remembered having freetype dev installed and not being able to install matplotlib, but I'm probably just getting old :)

@jenshnielsen
Copy link
Member Author

@montefra Thanks for clearing that up. The freetype vs freetype2 situation is a bit confusing. I don't quite know what we can do about that other than mention it somewhere in the docs.

tacaswell added a commit that referenced this pull request Apr 3, 2015
BLD : Improve error message when freetype headers are not found using python3
@tacaswell tacaswell merged commit a488cbc into matplotlib:master Apr 3, 2015
tacaswell added a commit that referenced this pull request Apr 3, 2015
BLD : Improve error message when freetype headers are not found using python3
@tacaswell
Copy link
Member

Backported as f918227

@jenshnielsen Thank you.

@jenshnielsen jenshnielsen deleted the freetypedetection branch August 20, 2015 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants