Closed cekees closed 10 years ago
Freetype is there, and matplotlib doesn't know how to find it:
For whatever reason, this hasn't been an issue on my own Mac, but it sounds like we should just build freetype on OS X.
This is passing on my OS X.9 machine. I declare myself master of the Proteus example on OS X, and merge this on my own awesomeness.
I meant to post that in the PR :(
Hm, I guess this line here:
https://github.com/hashdist/hashstack/blob/master/pkgs/matplotlib/matplotlib.yaml#L16
didn't work for hosted freetype?
@certik - That looks like the likely culprit. On my system it "just works", so it's hard to understand what's going wrong here.
I think the problem is really simple. If you look at host-freetype
:
https://github.com/hashdist/hashstack/blob/master/pkgs/host-freetype.yaml
it doesn't make sure that $FREETYPE_DIR/lib/pkgconfig
points to pkgconfig. In particular, it doesn't point to it at all! So it can't work, unless matplotlib finds the libs in default locations.
I'm looking into it.
So my system has a freetype installed in X11 :)
~/p/stack git:remotes/origin/master ❯❯❯ which freetype-config
/opt/X11/bin/freetype-config
I suspect that the hashstack freetype install on OS X is not correctly placing its include headers or reporting its pkg configuration correctly.
I'm tempted to temporarily disable my system's freetype...
I have a suspicion. We don't prepend the location of freetype-config
to the PATH before we build matplotlib, so I believe that the system-installed freetype-config
is getting picked up first. @certik - I don't know how pkg-config works, but is it a dependency that would need to be installed for the environment variable you're setting to work?
@cekees - This fixes the freetype issue. Something must have bumped in matplotlib 1.3 in terms of looking for freetype-config
, relying us to prepend freetype-config
to the PATH.
Thanks! I guess we can file matplotlib in the class of packages that won't easily build unless we have the build dependencies manipulate the path.
On Tue, Apr 15, 2014 at 3:50 PM, Aron Ahmadia notifications@github.comwrote:
@cekees https://github.com/cekees - This fixes the freetype issue. Something must have bumped in matplotlib 1.3 in terms of looking for freetype-config, relying us to prepend freetype-config to the PATH.
— Reply to this email directly or view it on GitHubhttps://github.com/hashdist/hashstack/issues/223#issuecomment-40532480 .
Possibly, I'm not very familiar with matplotlib's build system. I'd welcome feedback from someone who has a better idea of what's going on there.
I didn't try the new matplotlib much. The old one did find the freetype-config as long as you specified the proper PKG_CONFIG_PATH
path as we do. It turned out to be pretty much the only way to force matplotlib to use our packages as opposed to the system ones. The build system is pretty hackish, so I am not surprised that it stopped working. I personally use cmake for linking C/C++ libraries, together with Python code. Anyway, if prepending PATH work, then good, let's use it.
From the proteus 10.9 buildbot:
building 'matplotlib.ft2font' extension creating build/temp.macosx-10.9-x86_64-2.7 creating build/temp.macosx-10.9-x86_64-2.7/src creating build/temp.macosx-10.9-x86_64-2.7/CXX gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/buildslave/.hashdist/bld/host-freetype/xvdgkg57odip/include -I/Users/buildslave/.hashdist/bld/numpy/wcwyzwc5bz4o/include -I/Users/buildslave/.hashdist/bld/png/2yhivqd7xkic/include -I/Users/buildslave/.hashdist/bld/python/bqs5q7lugmgr/include -I/Users/buildslave/.hashdist/bld/setuptools/rdmsm2qxfhqh/include -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/Users/buildslave/.hashdist/bld/numpy/wcwyzwc5bz4o/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I/usr/X11/include -I. -I/usr/local/Cellar/freetype/2.5.1/include/freetype2 -I/Users/buildslave/.hashdist/bld/python/bqs5q7lugmgr/include/python2.7 -c src/ft2font.cpp -o build/temp.macosx-10.9-x86_64-2.7/src/ft2font.o In file included from src/ft2font.cpp:3: In file included from src/ft2font.h:6: In file included from ./CXX/Extensions.hxx:40: In file included from ./CXX/Python2/Extensions.hxx:52: ./CXX/Python2/Objects.hxx:1133:23: warning: implicit conversion of NULL constant to 'int' [-Wnull-conversion] , offset( NULL ) ~ ^~~~ 0 In file included from src/ft2font.cpp:3: In file included from src/ft2font.h:16: /usr/X11/include/ft2build.h:56:10: fatal error: 'freetype/config/ftheader.h' file not found
include <freetype/config/ftheader.h>
1 warning and 1 error generated. error: command 'gcc' failed with exit status 1 Command '[u'/bin/bash', '_hashdist/build.sh']' returned non-zero exit status 1 command failed (code=1); raising