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

Improper reliance upon pkg-config when C_INCLUDE_PATH is set #5576

Closed
dpryan79 opened this issue Nov 27, 2015 · 2 comments
Closed

Improper reliance upon pkg-config when C_INCLUDE_PATH is set #5576

dpryan79 opened this issue Nov 27, 2015 · 2 comments
Assignees

Comments

@dpryan79
Copy link

In setupext.py, matplotlib uses pkg-config --cflags --libs freetype2 to determine where ft2build.h can be found. That works well enough except when that path is already set in either the C_INCLUDE_PATH or CPLUS_INCLUDE_PATH environment variables. If the path is in one of those then pkg-config will not return the appropriate -I/something option and compilation will fail (i.e., setupext.py will mark freetype2 as being absent, even though it's not). pkg-config is behaving correctly, since gcc/clang/etc. check these environment variables.

Would it be possible to have _check_for_pkg_config also check these environment variables. That would solve some issues on Galaxy.

@mdboom mdboom self-assigned this Nov 27, 2015
@mdboom
Copy link
Member

mdboom commented Nov 27, 2015

See #5578 for a solution. I think it makes sense to only look at CPLUS_INCLUDE_PATH, since all of matplotlib's code is C++ (with the exception of the macosx extension), and gcc doesn't seem to look at C_INCLUDE_PATH when in C++ mode (so neither should we).

@dpryan79
Copy link
Author

Seems quite reasonable. 👍

@mdboom mdboom closed this as completed in 2f88e0e Nov 30, 2015
tacaswell added a commit that referenced this issue Nov 30, 2015
tacaswell added a commit that referenced this issue Nov 30, 2015
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

No branches or pull requests

2 participants