This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Michael.Felt
Recipients Ian Burgwin, Michael.Felt, amaury.forgeotdarc, belopolsky, meador.inge, ned.deily, vstinner
Date 2018-04-25.14:54:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <902d6a83-66e0-a6ac-d8b6-81eddbdc3f40@felt.demon.nl>
In-reply-to <1523771801.88.0.682650639539.issue33281@psf.upfronthosting.co.za>
Content
On 15/04/2018 07:56, Ned Deily wrote:
> Ned Deily <nad@python.org> added the comment:
>
> Thanks for the report and the good detective work!  I see the same results.  It appears that the error was introduced by c5ae169e1b73315672770517bf51cf8464286c76 for Issue26439.  It looks we need both a fix and a test for this.  This really needs to be fixed for 3.7.0b4.

Perhaps he can give a bit more info. I do not understand how this could 
break things, as the darwin code is earlier in the queue.

if os.name == "posix" and sys.platform == "darwin":
     from ctypes.macholib.dyld import dyld_find as _dyld_find
     def find_library(name):
         possible = ['lib%s.dylib' % name,
                     '%s.dylib' % name,
                     '%s.framework/%s' % (name, name)]
         for name in possible:
             try:
                 return _dyld_find(name)
             except ValueError:
                 continue
         return None

if sys.platform.startswith("aix"):
     # AIX has two styles of storing shared libraries
     # GNU auto_tools refer to these as svr4 and aix
     # svr4 (System V Release 4) is a regular file, often with .so as suffix
     # AIX style uses an archive (suffix .a) with members (e.g., shr.o, 
libssl.so)
     # see issue#26439 and _aix.py for more details

     from ctypes._aix import find_library

elif os.name == "posix":
     # Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump
     import re, tempfile

     def _findLib_gcc(name):

As I understand the code above (and maybe I am wrong) - the code should 
be calling the unchanged routines in the macholib subdirectory. A simple 
test on macOS would be to comment out the two lines

if sys.platform.startswith("aix"):
     from ctypes._aix import find_library

That will "delete" the AIX find_library logic.

In other words - can someone check whether the unchanged 
Lib/ctypes/macholib/* files are being used? And if not, then something 
surprising is preventing that. If they are - no idea how the macholib 
code got effected by this. The goal was to have all changes in the 
_aix.py file, rather than in util.py.

>
> ----------
> nosy: +Michael.Felt, ned.deily, vstinner
> priority: normal -> release blocker
> stage:  -> needs patch
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue33281>
> _______________________________________
>
History
Date User Action Args
2018-04-25 14:54:42Michael.Feltsetrecipients: + amaury.forgeotdarc, belopolsky, vstinner, ned.deily, meador.inge, Ian Burgwin
2018-04-25 14:54:41Michael.Feltlinkissue33281 messages
2018-04-25 14:54:41Michael.Feltcreate