[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2018-07-18 Thread STINNER Victor
STINNER Victor added the comment: Thank you Michael Felt for your big "Implement find_library() support in ctypes/util for AIX" contribution, commit c5ae169e1b73315672770517bf51cf8464286c76! I close the issue. -- resolution: -> fixed stage: patch review -> resolved status: open ->

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2018-07-18 Thread Michael Felt
Michael Felt added the comment: imho - this should have status "closed" -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2018-04-14 Thread Ned Deily
Ned Deily added the comment: It looks like c5ae169e1b73315672770517bf51cf8464286c76 broke find_library on macOS; see Issue33281. -- nosy: +ned.deily ___ Python tracker

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2017-12-23 Thread Michael Felt
Michael Felt added the comment: will open a new PR for ./Doc/library/ctypes.rst -- ___ Python tracker ___

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2017-12-22 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset c0919c27c6442aa147ae559a936b1b8deb4ee783 by Mariatta in branch 'master': bpo-26439: Convert %s in Lib/ctypes/_aix.py to f-strings. (GH-4986)

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2017-12-22 Thread Mariatta Wijaya
Change by Mariatta Wijaya : -- pull_requests: +4872 ___ Python tracker ___ ___

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2017-12-21 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: Within this context, the "svr4" label originates in the "-bsvr4" AIX linker flag, and actually is another (yet fully documented by the ld(1) man page) method for creating shared libraries on AIX to support

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2017-12-20 Thread Michael Felt
Michael Felt added the comment: SVR4 - stands for AT System V Release 4 - the beginning (as I understand it) of shared libraries as (indivudual) .so files in UNIX. SVR3 (and earlier) used .a files (aka archives with members inside). --

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2017-12-20 Thread STINNER Victor
STINNER Victor added the comment: > Although I'm unable to double check for the moment, feels like the "SVR4" > support still is incomplete: (...) Sorry, I don't know what is SVR4. Is it a version of AIX? If it's rarely used, maybe a different issue should be opened

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2017-12-20 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: Although I'm unable to double check for the moment, feels like the "SVR4" support still is incomplete: Remember that even the libNAME.so file may be an archive, or a symlink to an archive, with the real Shared

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2017-12-19 Thread STINNER Victor
STINNER Victor added the comment: Michael Felt: I merged your PR ✨ ! Thank you very much for your patience and perseverance. 80 comments on this bug, 117 comments and 19 commits in the PR... wow! AIX is not dead  I leave the bug open since Martin, Mariatta and me

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2017-12-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset c5ae169e1b73315672770517bf51cf8464286c76 by Victor Stinner (Michael Felt) in branch 'master': bpo-26439 Fix ctypes.util.find_library failure on AIX (#4507)

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2017-12-01 Thread Martin Panter
Martin Panter added the comment: Michael Felt: if you still want the code compatible with Python 2 and 3 (and others are happy with that), I suggest documenting that in a code comment. -- ___ Python tracker

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2017-11-22 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: + ___ Python tracker ___

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2017-01-25 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- nosy: +haubi ___ Python tracker ___

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2017-01-13 Thread Michael Felt
Michael Felt added the comment: OOPS: I have a ... above, meant to be a link to a message. I also needed to 'patch' util.py - with 32-bit build with something like this: --- src/python-2.7.13/Lib/ctypes/util.py2016-12-17 20:05:05 + +++ python-2.7.13.0/Lib/ctypes/util.py 2017-01-13

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2017-01-13 Thread Michael Felt
Michael Felt added the comment: I would like to say: a) I am happy this is being considered for Python3-3.7 b) I still believe it is a "bug" plain and simple - it (find_library()) cannot work in "normal" situations. Why "IBM" or others never addressed this is beyond me - but - imho - that is

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-10-14 Thread Martin Panter
Martin Panter added the comment: Just some minor comments on aix-library.161004.patch: Instead of _util.py, I wonder if the new file should have a different name, like _util_common.py, to avoid being too similar to util.py. +def get_shared(input): +"""Internal support function: examine

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-10-04 Thread Michael Felt
Michael Felt added the comment: Besides correcting a small error, also my attempt to follow the guidelines to not import *, but to actually specify all bits that are to be imported. This is a patch compered to Python-3.6b1 -- hgrepos: +359 Added file:

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-10-04 Thread Michael Felt
Changes by Michael Felt : Added file: http://bugs.python.org/file44962/aix-modules.161004.patch ___ Python tracker ___

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-10-04 Thread Michael Felt
Michael Felt added the comment: Have a way to have both 64-bit and 32-bit modes working. root@x064:[/data/prj/python/python-3.6.0.177/Lib/ctypes]../../python `pwd`/util.py m :: None c :: libc.a(shr_64.o) bz2 :: libbz2.a(libbz2.so.1) crypt :: libcrypt.a(shr_64.o) crypto :: c

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-10-04 Thread Michael Felt
Michael Felt added the comment: Curious. When in 32-bit mode changing line 15 of _aix.py to +14 import re, os, sys +15 # from . import util The Lib/ctypes/util.py works. In 64-bit mode it does not: instead: root@x064:[/data/prj/python/python-3.6.0.177/Lib/ctypes]../../python util.py

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-10-04 Thread Michael Felt
Michael Felt added the comment: I have spent the last two hours trying to run the test - however, it fails with: root@x064:[/data/prj/python/python-3.6.0.177/Lib/ctypes]../../python util.py Traceback (most recent call last): File "util.py", line 102, in import ctypes._aix as aix File

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-10-04 Thread Michael Felt
Michael Felt added the comment: On 01-Oct-16 08:44, Martin Panter wrote: > Martin Panter added the comment: > > Hi Michael, I have done some cleanup and modifications to your patch. The > result is in aix-library.161001.patch, which has all the changes, i.e. it is > not based on another patch.

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-10-01 Thread Martin Panter
Martin Panter added the comment: Hi Michael, I have done some cleanup and modifications to your patch. The result is in aix-library.161001.patch, which has all the changes, i.e. it is not based on another patch. More significant changes I made: * Change getExecLibPath_aix() and find_parts()

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 01885f78b299 by Martin Panter in branch '2.7': Issue #26439: Document that RTLD_NOW is always added https://hg.python.org/cpython/rev/01885f78b299 New changeset 0db4403e62c4 by Martin Panter in branch '3.5': Issue #26439: Document that RTLD_NOW is

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-09-26 Thread Michael Felt
Michael Felt added the comment: Sigh - missed the feature cutoff that would have made this easier to get into python... Anyway - have learned a few new things about python def: syntax and removed some bits that I thought were suitable for variable "initialization" - but tend to be static

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-09-04 Thread Michael Felt
Michael Felt added the comment: Not always as elegant as I would wish (do not like the idea of "while 1:" and later a break... But, all in all, much improved by redoing the processing of the subprocess output and getting rid of more noise. Hope this meets your approval! p.s. This is a patch

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-09-04 Thread Michael Felt
Michael Felt added the comment: On 04/09/2016 06:11, Martin Panter wrote: > I do not know whether to fix the annotation (has 64 preceded by any number of > underscores), or whether to fix the regular expression (_?64). The later - _?64. Working on this today. Thank you for the correction.

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-09-03 Thread Martin Panter
Martin Panter added the comment: Regarding the regular expressions, I (or someone else unfamiliar with AIX) may be able to adjust them if you can explain what you are trying to achieve. Take the first one I commented on

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-08-30 Thread Michael Felt
Michael Felt added the comment: On 27-Aug-16 09:11, Martin Panter wrote: > Martin Panter added the comment: > > The documentation is in RST format in the Doc/ directory. For basic stuff, > you can just copy the syntax from existing text, or see e.g. >

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-08-27 Thread Martin Panter
Martin Panter added the comment: The documentation is in RST format in the Doc/ directory. For basic stuff, you can just copy the syntax from existing text, or see e.g. for more hints. For this change, I think we need

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-08-26 Thread Martin Panter
Changes by Martin Panter : Added file: https://bugs.python.org/file44237/Python3.6.ctypes.160823.patch ___ Python tracker ___

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-08-23 Thread Michael Felt
Michael Felt added the comment: patch to include RTLD_MEMBER in Modules/_ctypes and also "document", or not document, RTLD_NOW -- Added file: http://bugs.python.org/file44206/Python3.6.Modules._ctypes.160823.patch ___ Python tracker

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-08-23 Thread Michael Felt
Michael Felt added the comment: New patch (diff) - that I hope address the comments made in the previous submission -- Added file: http://bugs.python.org/file44205/Python3.6.Lib.ctypes.160823.patch ___ Python tracker

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-08-02 Thread Martin Panter
Martin Panter added the comment: For the record, I presume you are referring to Issue 27435. -- ___ Python tracker ___

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-07-31 Thread Michael Felt
Michael Felt added the comment: Thanks again for your help. Note: I started a issue# is because too much of what I was submitting here was "extension" and not "correction". Hopefully, the new issue# will be cleaner. -- ___ Python tracker

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-06-20 Thread Martin Panter
Martin Panter added the comment: I left a few more comments, but I see that many of my earlier comments (both in Rietveld and main bug thread) still apply. I’m still struggling to understand all the special cases for the find_library() argument. You seem to have added even more recently

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-06-19 Thread Martin Panter
Martin Panter added the comment: Uploading a combined patch that should work with Rietveld, and I will leave some comments. I don’t think there is much that I am comfortable changing in Python 2.7. In general it is a bad idea to add new features that are only going to be available in e.g.

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-06-16 Thread Michael Felt
Michael Felt added the comment: updated patch for Python 2.7 (shall adopt and submit new patch for Python3 based on this - next week) used gnu diff to generate diff output. Additional tests in util.py are for demo only, would expect them to be removed, however, the additional test in

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-06-16 Thread Michael Felt
Michael Felt added the comment: The patch for Python2 - however, only now see the change in selections for version. Will need to redo/test Lib/ctypes/*.py in newer version. Note also, the additional tests in util.py are for my testing - I do not expect them to stay, but I do want you aware of

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-06-16 Thread Michael Felt
Michael Felt added the comment: _aixutil.py to be paired with Python2.Lib.ctypes.16.06.11.patch -- Added file: http://bugs.python.org/file43425/_aixutil.py ___ Python tracker

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-06-12 Thread aixtools
aixtools added the comment: On 6/12/2016 11:41 AM, Martin Panter wrote: > . > Michael, how are you supposed to apply your latest patch? I have Gnu Patch > 2.7.5, but even in the best case it doesn’t find the files to patch: > > $ patch -p1 -n < python.Lib.ctypes.160608.patch > can't find file

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-06-12 Thread Martin Panter
Martin Panter added the comment: . Michael, how are you supposed to apply your latest patch? I have Gnu Patch 2.7.5, but even in the best case it doesn’t find the files to patch: $ patch -p1 -n < python.Lib.ctypes.160608.patch can't find file to patch at input line 2 The text leading up to

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-06-11 Thread aixtools
aixtools added the comment: On 6/10/2016 6:33 AM, Martin Panter wrote: > Martin Panter added the comment: > > Will try to change the existing code from os.popen to subprocess (Issue > 26439) to set a better example for new code like this > > -- > dependencies: +avoid using a shell in

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-06-11 Thread Michael Felt
Michael Felt added the comment: * You may also just modify my "attempt" in _aixutil.py I recall you said something about the p.wait() being a potential to hang, but I also want to be sure the subprocess has exited properly - as it is not something to be running in parallel - and be sure that

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-06-09 Thread Martin Panter
Martin Panter added the comment: Will try to change the existing code from os.popen to subprocess (Issue 26439) to set a better example for new code like this -- dependencies: +avoid using a shell in ctypes.util: replace os.popen with subprocess

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-06-08 Thread Michael Felt
Michael Felt added the comment: aixutil.py renamed as _aixutil.py and other changes in response to Martin's comments of 4 June delta of changes to __init__.py, util.py, and test/test_loading.py -- Added file: http://bugs.python.org/file43312/python.Lib.ctypes.160608.patch

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-06-08 Thread Michael Felt
Michael Felt added the comment: aixutil.py renamed as _aixutil.py and other changes in response to Martin's comments of 4 June -- Added file: http://bugs.python.org/file43311/_aixutil.py ___ Python tracker

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-06-08 Thread aixtools
aixtools added the comment: Answering this again - now that the new patch is ready. On 04-Jun-16 16:24, Martin Panter wrote: > Martin Panter added the comment: > > Okay here are some more thoughts about your latest patch: > > ## Automatic RTLD_MEMBER ## > > I was still uneasy about the

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-06-05 Thread aixtools
aixtools added the comment: On 04-Jun-16 16:24, Martin Panter wrote: > Martin Panter added the comment: > > Okay here are some more thoughts about your latest patch: > > ## Automatic RTLD_MEMBER ## > > I was still uneasy about the automatic setting of RTLD_MEMBER. But I looked > for how others

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-06-04 Thread Martin Panter
Martin Panter added the comment: Okay here are some more thoughts about your latest patch: ## Automatic RTLD_MEMBER ## I was still uneasy about the automatic setting of RTLD_MEMBER. But I looked for how others handle this, and I found Libtool’s LTDL library, and Apache Portable Runtime

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-31 Thread Michael Felt
Michael Felt added the comment: without aixutil.py - hopefully better for Mercurial import -- Added file: http://bugs.python.org/file43074/Python2.Lib.ctypes.160531.patch ___ Python tracker

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-31 Thread Michael Felt
Michael Felt added the comment: As a separate file in the hope it re-fits into Mercurial better -- Added file: http://bugs.python.org/file43073/aixutil.py ___ Python tracker

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-30 Thread aixtools
aixtools added the comment: On 28-May-16 04:04, Martin Panter wrote: > Martin Panter added the comment: > > Strictly speaking, Python 2.7 never had special support for RTLD_MEMBER or > find_library(). That is why I am unsure about many of these changes being > done in 2.7. They seem more like

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-27 Thread Martin Panter
Martin Panter added the comment: Strictly speaking, Python 2.7 never had special support for RTLD_MEMBER or find_library(). That is why I am unsure about many of these changes being done in 2.7. They seem more like new features than bug fixes. Especially once you start talking about a smart

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-23 Thread Michael Felt
Michael Felt added the comment: A bug was found, and has been corrected - but I am unclear on how to best submit the differences. Editing the current "review" code is not a good idea, as there are many differences. Please recommend correct course of action. p.s. I will have also removed the

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-23 Thread aixtools
aixtools added the comment: See below between points. On 12-May-16 17:45, Martin Panter wrote: > Martin Panter added the comment: > > Thanks for trying to move the directory in the new patch, but it does not > seem to have been picked up by Rietveld. I have only seen patches generated > with

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-12 Thread Martin Panter
Martin Panter added the comment: Thanks for trying to move the directory in the new patch, but it does not seem to have been picked up by Rietveld. I have only seen patches generated with Mercurial and Git work, but I don’t exactly know _why_ they work :) Here is a summary of what I would be

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-11 Thread Michael Felt
Michael Felt added the comment: used diff -rNu Python-2.7.11 Python-2.7.11.4 to generate Note: content same as those from yesterday - except Lib/ctype/test/test_loading.py is no longer changed. No longer needed. -- Added file:

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-11 Thread Michael Felt
Michael Felt added the comment: used diff -rNu Python-3.5.1 Python-3.5.1.1 to generate -- Added file: http://bugs.python.org/file42811/Python3.issue26439.160511.patch ___ Python tracker

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-11 Thread Michael Felt
Michael Felt added the comment: re: AIX: CDLL("libcrypto.a(libcrypto.so.1.0.0)", DEFAULT_MODE | RTLD_MEMBER) Officially it would be dlopen("libcrypto.a(libcrypto.so.1.0.0)", RTLD_NOW | RTLD_MEMBER) Further, that would only load the 32-bit version, as there is a legacy naming scheme for the

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-11 Thread Michael Felt
Michael Felt added the comment: a) https://bugs.python.org/review/26439/#msg12, but getting HTML 500 error) The call to find_library here is for "ease of use" with existing code who use, e.g., cdll("libcrypto.so"). This format fails unless someone has previously done, e.g.: (cd /usr/lib; ar

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-10 Thread Martin Panter
Martin Panter added the comment: Patches: I’m not sure, but maybe it would help the Reitveld review system if the src/ directory in them was eliminated (e.g. src/Python-3.5.1 vs just Python-3.5.1). Also, if you are using Gnu diff, maybe you can try the -N (--new-file) option to include

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-10 Thread aixtools
aixtools added the comment: On 5/8/2016 8:29 AM, Martin Panter wrote: > Martin Panter added the comment: > > Your new patch calls find_library() internally in CDLL(); why? Because arguments that work for GNU (aka Linux, even though internally it is called "posix") will not work for AIX. > My

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-10 Thread Michael Felt
Changes by Michael Felt : Added file: http://bugs.python.org/file42805/Python3.Modules._ctypes.160510.patch ___ Python tracker ___

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-10 Thread Michael Felt
Changes by Michael Felt : Added file: http://bugs.python.org/file42804/Python3.Lib.ctypes.160510.patch ___ Python tracker ___

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-10 Thread Michael Felt
Changes by Michael Felt : Added file: http://bugs.python.org/file42803/Python2.Modules._ctypes.160510.patch ___ Python tracker ___

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-10 Thread Michael Felt
Changes by Michael Felt : Added file: http://bugs.python.org/file42802/Python2.Lib.ctypes.160510.patch ___ Python tracker ___

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-10 Thread Michael Felt
Michael Felt added the comment: Spent more time today, testing - on 3.5.1, 3.4.4 and 2.7.11. The patches would not apply on both Python2 and Python3, but the new file Lib/ctypes/aixutil.py is identical on all three versions. History of patching (starting from version 3.5.1(.1) is my patched

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-09 Thread Michael Felt
Michael Felt added the comment: New version of aixutil.py ++ Changes ++ * more comments * re-worked the 'searches' for matches after adding changing the way the output from _get_dumpH was read (now to an array using readlines). Also, p.stdout.close() and p.wait() are done within the _get_dumpH

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-09 Thread Michael Felt
Michael Felt added the comment: New patch of the Lib/ctypes directory - BUT - this time as a delta based on 3.5.0. ++ changes from last patch ++ * OSError gets raised (as expected) by test/test_loading.py * test in util.py modified (libm is replaced by libc when "aix"), and added an additional

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-08 Thread Martin Panter
Martin Panter added the comment: Your new patch calls find_library() internally in CDLL(); why? My understanding is CDLL() is a fairly lightweight wrapper around the dlopen() call. On Linux, you either pass a full library file name, or an SO-name. Both these strings can be discovered for

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-07 Thread Martin Panter
Martin Panter added the comment: ''' call find_library("foo") libc: libc.a libc.a: libc.a libc.so.6: libc.a libcrypto.so: libcrypto.a ''' The above don’t seem right to me, unless compiling with “cc -llibc.so.6” etc works on AIX. ''' call cdll.LoadLibrary("foo") m: libm.so: ''' These

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-04 Thread Michael Felt
Michael Felt added the comment: implements ctypes.aixutil.find_library() In a separate file as both __init__.py as util.py needs it's logic. -- Added file: http://bugs.python.org/file42713/aixutil.py ___ Python tracker

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-04 Thread Michael Felt
Michael Felt added the comment: reworked patch. To assist port to Python3 that changes in __init__.py and util.py are minimal. There is a new file: aixutil.py I have only tested on Python-2.7, so there may be issues for Python3. My goal is to have a single file for both versions. The main

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-04-30 Thread Michael Felt
Michael Felt added the comment: Question - before I submit a patch. A. Is there a PEP I should read re: ctypes/util and/or ctypes/cdll? B. I show two different behaviors of responding - My question is, what does the community think should be the response? My preference is to bring the request

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-04-29 Thread Michael Felt
Michael Felt added the comment: On 4/28/2016 11:56 PM, Michael Felt wrote: > Michael Felt added the comment: > > I have not looked specifically, at least not that I remember, for differences > in util/ctypes in python2 and python3. Will do so tomorrow. > > I did just look briefly at the

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-04-28 Thread Martin Panter
Martin Panter added the comment: The obvious (but easy to fix) problem I forsee with Python 3 is the print() calls. If you use print("") and print(arg), that will work with both 2 and 3. There may be more complications with bytes vs text stdout if we change the os.popen() calls to use

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-04-28 Thread Michael Felt
Michael Felt added the comment: I have not looked specifically, at least not that I remember, for differences in util/ctypes in python2 and python3. Will do so tomorrow. I did just look briefly at the library, rather archive, built by default as libpython2.7.a - it is static members only,

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-04-27 Thread Martin Panter
Martin Panter added the comment: I don’t know anything about AIX specific stuff, but I left some general comments in the code review. Is there any chance that AIX people would be relying on the current behaviour that I understand uses _findSoname_ldconfig() and _findLib_gcc()? Is this new

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-04-27 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file42634/python.Lib.ctypes.160317.patch ___ Python tracker ___

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-04-27 Thread Martin Panter
Changes by Martin Panter : Removed file: http://bugs.python.org/file42633/python.Lib.ctypes.160309.patch ___ Python tracker ___

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-04-27 Thread Martin Panter
Martin Panter added the comment: I notice the patch is against Python 2, and uses Python 2 specific syntax. I am unsure if this kind of change is acceptable for 2.7, or if it would have to only go into 3.6. Hopefully this version of the patch will notify the review system that it is against

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-04-27 Thread David Edelsohn
David Edelsohn added the comment: The most recent patch seems to follow AIX semantics correctly. -- ___ Python tracker ___

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-04-27 Thread Michael Felt
Michael Felt added the comment: These are very different issues. However, this patch may resolve both! ldconfig (-p if I recall) lists where (shared) libraries have been installed (imho, this is a GNU tool approach) - whereas AIX would use dump -H to find library paths embedded in a program

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-04-24 Thread Martin Panter
Martin Panter added the comment: Maybe Issue 21826 is relevant (slowdown on AIX caused by missing ldconfig) -- nosy: +martin.panter ___ Python tracker

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-03-18 Thread Michael Felt
Michael Felt added the comment: Ah, good news - the build is successful ONCE I open the file ./Lib/ctypes/util.py and find the (hiding) tab characters and replace them with 8 space characters. (And I had tried so hard to check for that in advance). So, if you apply the patch - it may need

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-03-18 Thread Michael Felt
Michael Felt added the comment: fyi: just completed a test both as 32 and 64 bit build. However, openssl-1.0.1.514 does not work in 64-bit mode (packaging error). Fortunately, openssl-1.0.1.515 (released 02-March-2016) fixes that. In short, 64-bit build is dependent on openssl-1.0.1.515 Here

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-03-08 Thread Michael Felt
Michael Felt added the comment: The patch works when installed on top of pre-compiled version (e.g., copy the two files to /opt/lib/python2.7/ctypes/ but there seems to be a nasty side-effect when trying to build. make completes, but make install fails during a compile step. Please assist

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-02-29 Thread Michael Felt
Michael Felt added the comment: The following demonstrates the basics. cdll.LoadLibrary will load a .so file if it can be located (you will have to believe me as I forgot to include the test in this last batch) Further, when given the AIX format for loading a member of an archive (e.g.,

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-02-29 Thread Michael Felt
Michael Felt added the comment: Oops: forgot the example output: root@x064:[/data/prj/aixtools/src]python -m ctypes.util libm.a(libm.so) libc.a(libc.so) libbz2.a(libbz2.so) libcrypto.a(libcrypto.so) libcrypt.a(libcrypt.so) -- ___ Python tracker

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-02-29 Thread David Edelsohn
David Edelsohn added the comment: AIX traditionally used member names like shr.o or shr.o or shr.o insider the archive, with _64 designating a 64 bit object when there is a naming collision. GNU libtool defaults to the SO name and version number insider the archive. AIX objects (and shared

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-02-29 Thread Michael Felt
Michael Felt added the comment: it was, partly, about the technical details - but I feel I have found the key bits - /full/path/libNAME.a(libNAME.so) + dlflags RTLD_NOW + RTLD_MEMBER for "native" AIX support. Additionally, a patch should not break what might be working for some (via google I

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-02-28 Thread David Edelsohn
David Edelsohn added the comment: ctypes util.py "simply" needs support for AIX. There already is special support for Windows, Darwin, BSDs, Solaris. Is the question about the technical details for equivalent functionality on AIX or about adding a stanza to Lib/ctpyes/util.py? --

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-02-27 Thread Ned Deily
Changes by Ned Deily : -- nosy: +David.Edelsohn ___ Python tracker ___ ___ Python-bugs-list

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-02-26 Thread Michael Felt
Michael Felt added the comment: The _dlopen call in __init__.py I have been able to fix (hack) with the following: root@x064:[/data/prj/aixtools/python/python-2.7.10/Lib/ctypes]diff -u __init__.py /opt/lib/python2.7/ctypes/__init__.py --- __init__.py 2015-05-23 16:09:01 + +++

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-02-26 Thread Michael Felt
Changes by Michael Felt : -- title: ctypes.util.find_library fails ALWAYS when gcc is not used -> ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX) ___ Python tracker