Hi, As part of building matplotlib for the one python based distribution [1], I want to always link against our own version of libpng, even if there is some other systemwide version available. I am on linux (Ubuntu).
Currently, here is what I am doing: CFLAGS="-I$PNG/include -I$FREETYPE/include -I$FREETYPE/include/freetype2" LDFLAGS="-L$FREETYPE/lib -L$PNG/lib -Wl,-rpath=$PNG/lib" $PYTHON/bin/python setup.py build $PYTHON/bin/python setup.py install Where $PNG and $FREETYPE points to our own versions. On a computer with no systemwide version of png, this works great. Question: 1) If I don't specify the -rpath option, then libpng.so will fail to be found at runtime. Is there any other recommended way to go around this? I don't want to use LD_LIBRARY_PATH. On a computer with systemwide version available, unfortunately the systemwide version gets picked up instead. I think it's because of this: pkg-config --libs --cflags libpng -I/usr/include/libpng12 -lpng12 so matplotlib simply calls this (right?) and uses the systemwide version. Question: 2) How do I force matplotlib to use my own version instead? I would highly appreciate any input, especially on 2). We have our own issue open for this at [2] if you are interested for the background. The merged mpl PR [3] is a little related, but doesn't answer my questions. Thanks, Ondrej [1] https://github.com/hashdist/python-hpcmp2/ [2] https://github.com/hashdist/python-hpcmp2/issues/53 [3] https://github.com/matplotlib/matplotlib/pull/1884 ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free troubleshooting tool designed for production Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap2 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users