Re: [Matplotlib-users] static linking
Figured it out. The real trick is to set the PKG_CONFIG_PATH properly. No need for LD_LIBRARY_PATH On Sun, Sep 30, 2012 at 9:52 AM, Rita rmorgan...@gmail.com wrote: Nelly, I would like to compile libpng into matplotlib if possible, ie static. Seems like thats not possible and I would like to would LD_LIBRARY_PATH as much as possible. I much prefer -Wl, rpath or LD_PRELOAD. Jouni, for the pkg-config can I use the one with my OS, /usr/bin/pkg-config? and also libpng comes with its own variation of pkg-config (not named that). How can I include that? do I set PKG_CONFIG_PATH ? On Sun, Sep 30, 2012 at 3:30 AM, Nelle Varoquaux nelle.varoqu...@gmail.com wrote: On 30 Sep 2012 06:11, Jouni K. Seppänen j...@iki.fi wrote: Rita rmorgan...@gmail.com writes: i have a micro distribution setup. I am building python, numpy, scipy from scratch. I am building matplotlib from scratch also. I am doing a simple, /apps/bin/python setup.py build. I also compiled libpng and cairo in a location. When you build a shared library yourself, you always need to set the variable LD_LIBRARY_PATH. This is independant from the compilation. At runtime, the program merely tries to load the library if it has not been loaded previously. Usually, to avoid setting manually the path to the library, one adds this to its bashrc/zshrc. I hope this helps. Cheers, N. Have you set up pkg-config for your build of libpng? If you can't do that for some reason, you can edit basedirlist in setup.cfg. -- Jouni K. Seppänen http://www.iki.fi/jks -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- --- Get your facts first, then you can distort them as you please.-- -- --- Get your facts first, then you can distort them as you please.-- -- Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] static linking
On 30 Sep 2012 06:11, Jouni K. Seppänen j...@iki.fi wrote: Rita rmorgan...@gmail.com writes: i have a micro distribution setup. I am building python, numpy, scipy from scratch. I am building matplotlib from scratch also. I am doing a simple, /apps/bin/python setup.py build. I also compiled libpng and cairo in a location. When you build a shared library yourself, you always need to set the variable LD_LIBRARY_PATH. This is independant from the compilation. At runtime, the program merely tries to load the library if it has not been loaded previously. Usually, to avoid setting manually the path to the library, one adds this to its bashrc/zshrc. I hope this helps. Cheers, N. Have you set up pkg-config for your build of libpng? If you can't do that for some reason, you can edit basedirlist in setup.cfg. -- Jouni K. Seppänen http://www.iki.fi/jks -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] static linking
Nelly, I would like to compile libpng into matplotlib if possible, ie static. Seems like thats not possible and I would like to would LD_LIBRARY_PATH as much as possible. I much prefer -Wl, rpath or LD_PRELOAD. Jouni, for the pkg-config can I use the one with my OS, /usr/bin/pkg-config? and also libpng comes with its own variation of pkg-config (not named that). How can I include that? do I set PKG_CONFIG_PATH ? On Sun, Sep 30, 2012 at 3:30 AM, Nelle Varoquaux nelle.varoqu...@gmail.comwrote: On 30 Sep 2012 06:11, Jouni K. Seppänen j...@iki.fi wrote: Rita rmorgan...@gmail.com writes: i have a micro distribution setup. I am building python, numpy, scipy from scratch. I am building matplotlib from scratch also. I am doing a simple, /apps/bin/python setup.py build. I also compiled libpng and cairo in a location. When you build a shared library yourself, you always need to set the variable LD_LIBRARY_PATH. This is independant from the compilation. At runtime, the program merely tries to load the library if it has not been loaded previously. Usually, to avoid setting manually the path to the library, one adds this to its bashrc/zshrc. I hope this helps. Cheers, N. Have you set up pkg-config for your build of libpng? If you can't do that for some reason, you can edit basedirlist in setup.cfg. -- Jouni K. Seppänen http://www.iki.fi/jks -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- --- Get your facts first, then you can distort them as you please.-- -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] static linking
i have a micro distribution setup. I am building python, numpy, scipy from scratch. I am building matplotlib from scratch also. I am doing a simple, /apps/bin/python setup.py build. I also compiled libpng and cairo in a location. On Fri, Sep 28, 2012 at 10:49 PM, Eric Firing efir...@hawaii.edu wrote: On 2012/09/28 3:40 PM, Rita wrote: Whenever I use matplot lib its asking me for libpng and when I do LD_LIBRARY_PATH it works. Is there a way I can compile matplotlib so I can avoid doing an export LD_LIBRARY_PATH ? Normally one doesn't need it, so I don't know why you do need it. You might get a useful response from someone who knows more about linking than I do if you provide some information about your platform and about how you are presently building matplotlib. Eric -- How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- --- Get your facts first, then you can distort them as you please.-- -- How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] static linking
Rita rmorgan...@gmail.com writes: i have a micro distribution setup. I am building python, numpy, scipy from scratch. I am building matplotlib from scratch also. I am doing a simple, /apps/bin/python setup.py build. I also compiled libpng and cairo in a location. Have you set up pkg-config for your build of libpng? If you can't do that for some reason, you can edit basedirlist in setup.cfg. -- Jouni K. Seppänen http://www.iki.fi/jks -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] static linking
Whenever I use matplot lib its asking me for libpng and when I do LD_LIBRARY_PATH it works. Is there a way I can compile matplotlib so I can avoid doing an export LD_LIBRARY_PATH ? -- --- Get your facts first, then you can distort them as you please.-- -- How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] static linking
On 2012/09/28 3:40 PM, Rita wrote: Whenever I use matplot lib its asking me for libpng and when I do LD_LIBRARY_PATH it works. Is there a way I can compile matplotlib so I can avoid doing an export LD_LIBRARY_PATH ? Normally one doesn't need it, so I don't know why you do need it. You might get a useful response from someone who knows more about linking than I do if you provide some information about your platform and about how you are presently building matplotlib. Eric -- How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Static linking problem on matplotlib eggs
I'm hoping someone can shed some light on this. I get the following error when building on OSX. Notice that it looks into /usr/local for libraries: /usr/local/include/ft2build.h:56:38:/usr/local/include/ft2build.h:56:38: error: error: freetype/config/ftheader.h: No such file or directoryfreetype/config/ftheader.h: No such file or directory Even though there is nothing that points there in my env: MANPATH=/usr/share/man:/usr/local/share/man:/usr/X11/man TERM=xterm-color SHELL=/bin/bash SSH_CLIENT=fe80::211:24ff:fe8d:9019%en1 57594 22 OLDPWD=/Users/chris/Development/freetype-2.3.5 LFLAGS=-arch ppc -arch i386 -L/Users/chris/Development/libpng-1.2.23 -L/Users/chris/Development/freetype-2.3.5 SSH_TTY=/dev/ttys001 USER=chris PAGER=less MAIL=/var/mail/chris PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin: /usr/local/bin:/usr/texbin PWD=/Users/chris/Development/matplotlib PS1=(\[$(tput md)\]\t \w\[$(tput me)\]) $(echo $?) \$ SHLVL=1 HOME=/Users/chris CFLAGS=-arch ppc -arch i386 -I/Users/chris/Development/libpng-1.2.23 -I/Users/chris/Development/freetype-2.3.5 PYTHONPATH=/Library/Python/2.5/site-packages: LESS=-r LOGNAME=chris SSH_CONNECTION=fe80::211:24ff:fe8d:9019%en1 57594 fe80::214:51ff:feef:bad8%en1 22 _=/usr/bin/env Moreover, basedir['darwin'] is set to [] in setupext.py. So, I'm totally baffled. Where else could matplotlib be getting library path information from?? Thanks. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Static linking problem on matplotlib eggs
OK, I managed to build with the setupext.py list empty as you specified. However, for some reason, the resulting matplotlib egg *still* looks for dynamic libraries in /usr/local: ImportError: dlopen(/Library/Python/2.5/site-packages/ matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/_path.so, 2): Library not loaded: /usr/local/lib/libpng12.0.dylib Referenced from: /Library/Python/2.5/site-packages/ matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/_path.so Reason: image not found This is pretty bizarre. On 12/01/2008, at 12:42 PM, Charlie Moad wrote: I just had to rebuild the OSX binary because a similar reason. I forgot to change the basedir['darwin'] entry in setupext.py. Around line 50. Change: 'darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/ local', '/usr', '/sw', '/usr/X11R6'], To: 'darwin' : [], This will ensure you don't pick up shared libraries over the static ones since they are preferred by gcc. - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Static linking problem on matplotlib eggs
I'm trying to build some matplotlib eggs to bundle and distribute with some other python packages. So, I am doing my best to statically link to libraries like libpng, libfreetype, etc. that users may not have installed. I am building using the following: python setupegg.py config -L../staticlibs build bdist_egg where ../staticlibs contains the libraries that I am statically linking. Unfortunately, users are still getting errors such as the following: ImportError: dlopen(/Library/Python/2.5/site-packages/ matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/_path.so, 2): Library not loaded: /usr/local/lib/libpng12.0.dylib Referenced from: /Library/Python/2.5/site-packages/ matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/_path.so Reason: image not found Anyone have a clue what I am not doing properly? Thanks, Chris - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Static linking problem on matplotlib eggs
I just had to rebuild the OSX binary because a similar reason. I forgot to change the basedir['darwin'] entry in setupext.py. Around line 50. Change: 'darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local', '/usr', '/sw', '/usr/X11R6'], To: 'darwin' : [], This will ensure you don't pick up shared libraries over the static ones since they are preferred by gcc. - Charlie On Jan 12, 2008 12:04 PM, Chris [EMAIL PROTECTED] wrote: I'm trying to build some matplotlib eggs to bundle and distribute with some other python packages. So, I am doing my best to statically link to libraries like libpng, libfreetype, etc. that users may not have installed. I am building using the following: python setupegg.py config -L../staticlibs build bdist_egg where ../staticlibs contains the libraries that I am statically linking. Unfortunately, users are still getting errors such as the following: ImportError: dlopen(/Library/Python/2.5/site-packages/ matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/_path.so, 2): Library not loaded: /usr/local/lib/libpng12.0.dylib Referenced from: /Library/Python/2.5/site-packages/ matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/_path.so Reason: image not found Anyone have a clue what I am not doing properly? Thanks, Chris - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Static linking problem on matplotlib eggs
Thanks Charlie, I've done this, but for some reason, its still looking for things in / usr/local: In file included from src/ft2font.h:11, from src/ft2font.cpp:2: /usr/local/include/ft2build.h:56:38: error: freetype/config/ ftheader.h: No such file or directory cf On 12/01/2008, at 12:42 PM, Charlie Moad wrote: I just had to rebuild the OSX binary because a similar reason. I forgot to change the basedir['darwin'] entry in setupext.py. Around line 50. Change: 'darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/ local', '/usr', '/sw', '/usr/X11R6'], To: 'darwin' : [], This will ensure you don't pick up shared libraries over the static ones since they are preferred by gcc. - Charlie On Jan 12, 2008 12:04 PM, Chris [EMAIL PROTECTED] wrote: I'm trying to build some matplotlib eggs to bundle and distribute with some other python packages. So, I am doing my best to statically link to libraries like libpng, libfreetype, etc. that users may not have installed. I am building using the following: python setupegg.py config -L../staticlibs build bdist_egg where ../staticlibs contains the libraries that I am statically linking. Unfortunately, users are still getting errors such as the following: ImportError: dlopen(/Library/Python/2.5/site-packages/ matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/_path.so, 2): Library not loaded: /usr/local/lib/libpng12.0.dylib Referenced from: /Library/Python/2.5/site-packages/ matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/_path.so Reason: image not found Anyone have a clue what I am not doing properly? Thanks, Chris - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users