Message272453
On 02-Aug-16 15:34, Martin Panter wrote:
> Martin Panter added the comment:
>
> For 2.7, adding the automatic RTLD_MEMBER mode does not seem like a bug fix to me. Currently, I understand this code could load two separate libraries:
>
> file = CDLL("libcrypto.a(libcrypto.so.1.0.0)")
Noone (in their right mind, imho) would install, or extract the archive
member libcrypto.so.1.0.0and then rename it
/usr/lib/libcrypto.a(libcrypto.so.1.0.0)
FYI - I did test this case, and as a file, without 0x000400000 (aka
RLTD_MEMBER) or'd into the mode.
> member = CDLL("libcrypto.a(libcrypto.so.1.0.0)", DEFAULT_MODE | 0x00040000)
>
> With your proposed change, the first line will do the same as the second line, and Python will no longer provide a way to load a file named like in the first operation. Maybe this is okay for the next version of Python 3 (because it is only breaking a rare corner case), but my view is it is not worth changing 2.7.
Right now it is broken in AIX - it is impossible to use the native
archive(member) support. Direct loading of .so files, if I recall
correctly, was to provide linux affinity (remember the L in AIX 5L).
I believe python2 has some years to go, and basically, you ask anyone
using python on AIX to go through all kinds of loops. This hurts python
acceptance on AIX - too much work to get it working and keep it working.
I have been providing AIX support for over 20 years - NEVER have I seen
anyone name a shared library libxxx.a(libxxx.so). What I have seen is
that people extract archive members from a .a archive into the same
directory - but when the archive gets updated most forget to extract the
members again.
In yet another case I have seen a case where they copied everything to a
new directory and do a chroot() to get the .so files they want - because
it is impossible to load from a .a file.
Yes, when I first started back in February and March: a) knew next to
nothing about python; b) was trying to solve it in ways I would like it
be (mainly more flexible aka smarter re: the argument to find_library().
However, I do believe what I have here does what is done for other
platforms (e.g., darwin needs a different name ending, just not a
different mode to go with it) - will "fix" all "performance" related
issues for AIX re: calling ldconfig (which is only available in
extremely rare situations - again I have never seen it - because, by
default, even gcc is using AIX ld, not GNU ld)
I hope saying "please" helps. Without it, the AIX implementation is
non-existant. The linux code is called for AIX because that is the last
else: block, not because the code is specific to "posix".
so - PLEASE - pretty please!
Michael
p.s. And I shall look at the mercurial pages - and I hope have it working.
>
> ----------
> nosy: +martin.panter
> title: ctypes and AIX - also for 2.7.X (and later) -> ctypes library loading and AIX - also for 2.7.X (and later)
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue27435>
> _______________________________________ |
|
Date |
User |
Action |
Args |
2016-08-11 15:10:21 | aixtools@gmail.com | set | recipients:
+ aixtools@gmail.com, martin.panter, Michael.Felt |
2016-08-11 15:10:21 | aixtools@gmail.com | link | issue27435 messages |
2016-08-11 15:10:20 | aixtools@gmail.com | create | |
|