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

package_python_2_7_matplotlib_1_4 can fail due to package_freetype_2_5_2 setting environment variables #417

Closed
dpryan79 opened this issue Nov 26, 2015 · 6 comments
Labels

Comments

@dpryan79
Copy link
Contributor

I've recently run into problems getting package_python_2_7_matplotlib_1_4 to install on Galaxy within Docker (yes, this is the instance from @bgruening). The reason seems to be that matplotlib's setupext.py script needs pkg-config --cflags freetype2 to return something, but package_freetype_2_5_2 sets C_INCLUDE_PATH and CPLUS_INCLUDE_PATH. If one runs pkg-config --cflags --debug freetype2 then one can see that the appropriate Cflags: line is then excluded, since pkg-config will only output what's required. Reverting the environment changes from done by package_freetype_2_5_2 seems to fix that, though a likely better solution would be to modify the tool_dependencies.xml file from matplotlib to just have it exclude paths from the aforementioned environment variables.

@nsoranzo nsoranzo added the bug label Nov 26, 2015
@bgruening
Copy link
Member

This seem to be a real problem on the matplotlib site. Since we can not remove an environment variable I see no other solution to remove it from the freetype package. Or create a new on without these exports and use this one solely for matplotlib.

@erasche any ideas here?

@hexylena
Copy link
Member

@bgruening okay, read over it now. yikes.

No, I really don't have any ideas. I don't like the idea of a special package just for matplotlib, since there's definitely an underlying issue if pkg-config won't work nicely. Maybe someone has time to dig into why pkg-config doesn't play nicely with C*_INCLUDE PATHs. I'll poke it after lunch

@bgruening
Copy link
Member

@erasche this seems to be a matplotlib error as say do not use the correct variables. Not sure why :(

@dpryan79
Copy link
Contributor Author

@erasche: pkg-config is doing the correct thing. Compilers like gcc/clang/etc. look through directories specified by -I options first, followed by those set in C*_INCLUDE_PATH and finally the default system directories (e.g., /usr/include) when looking for headers. Since disks aren't always fast and many programs will require compiling a large number of files, it's best if the compiler doesn't need to look through the same directory twice. My understanding is that that's why pkg-config is behaving in this manner.

Since this is completely the fault of matplotlib, I'll post a bug report there. That won't resolve the immediate problem but will at least prevent this in the future :)

@dpryan79
Copy link
Contributor Author

Looks like this will get fixed in matplotlib 1.5.1 due to matplotlib/matplotlib#5578.

@dpryan79
Copy link
Contributor Author

This is fixed now, I'll close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants