cedadev / jasmin_scivm

9 stars 0 forks source link

provide shared library for python 2.7 #20

Closed alaniwi closed 9 years ago

alaniwi commented 9 years ago

[content separated out from https://github.com/cedadev/jasmin_scivm/issues/4 for sake of one issue one ticket]

(Phil K. writes):

It would also be helpful to provide the Python 2.7 library as a shared object file as this will reduce the size of executables built against it.

alaniwi commented 9 years ago

[further content moved from #4]

I added:

Providing a shared library - yes, that would be worth looking into, although at this stage I would only do so if in addition to a static library, so as not to break things that might use the static library.

Phil responded:

As to a shared library this is a must from my point of view. It's the default way to link in many cases. So if you can add it in that would be much appreciated

alaniwi commented 9 years ago

I now see that I already added --enable-shared. From changelog:

* Fri Feb 21 2014  <builderdev@builder.jc.rl.ac.uk> - 2.7.3-2.ceda
- change from static to shared libs (--enable-shared and adjust %files)

For example, on jasmin-sci1:

lrwxrwxrwx 1 root root      19 Jul 17  2014 /usr/lib/libpython2.7.so -> libpython2.7.so.1.0
-rwxr-xr-x 1 root root 5265120 Feb 21  2014 /usr/lib/libpython2.7.so.1.0

(although noting that path is in /usr/lib rather than /usr/lib64, as per issue raised in #4).

There is also a static library provided at /usr/lib/python2.7/config/libpython2.7.a (not sure why the "config" subdirectory; the build chose to put it there, not me).

Possibly in common with #4, the problem appears to be use of an older release of the RPM, now already fixed.

Therefore closing.