static linking

Rita <rmorgan466@...287...> 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

Rita <rmorgan466@…287…> 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.

···

On 30 Sep 2012 06:11, “Jouni K. Seppänen” <jks@…397…> wrote:

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

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.varoquaux@…287…> wrote:

On 30 Sep 2012 06:11, “Jouni K. Seppänen” <jks@…397…> wrote:

Rita <rmorgan466@…287…> 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.–

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 <rmorgan466@…287…> 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.varoquaux@…287…> wrote:

On 30 Sep 2012 06:11, “Jouni K. Seppänen” <jks@…397…> wrote:

Rita <rmorgan466@…287…> 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.–

This is not true. In fact, it is actively
discouraged<http://xahlee.info/UnixResource_dir/_/ldpath.html>.

The way to resolve it is to correctly pass the -I and -L compiler
flags when linking. As Rita has discovered, pkg-config does this for
you for some packages.

···

On Sun, Sep 30, 2012 at 8:30 AM, Nelle Varoquaux <nelle.varoquaux@...287...> wrote:

When you build a shared library yourself, you always need to set the
variable LD_LIBRARY_PATH.

--
Damon McDougall
http://www.damon-is-a-geek.com
B2.39
Mathematics Institute
University of Warwick
Coventry
West Midlands
CV4 7AL
United Kingdom