[Python-Dev] test_ctypes failure on Mac OS X/PowerPC 10.3.9 (Panther)

Thomas Heller theller at python.net
Fri Jul 7 18:19:58 CEST 2006


Ronald Oussoren schrieb:
> On 20-jun-2006, at 20:50, Ronald Oussoren wrote:
> 
>>
>> On 20-jun-2006, at 20:06, Thomas Heller wrote:
>>
>>> Trent Mick schrieb:
>>>> Thomas and others,
>>>>
>>>> Has anyone else seen failures in test_ctypes on older Mac OS X/
>>>> PowerPC?
>>>> Results are below. This is running a build of the trunk from last
>>>> night:
>>>>
>>>> 	./configure && make && ./python.exe Lib/test/test_ctypes.py
>>>>
>>>> Note that the test does NOT fail on the Mac OS X/x86 10.4.6 box
>>>> that I have.
>>>
>>> It also works on 10.4.?? Power PC.  I guess the fix has to wait until
>>> I'm able to install 10.3 on my mac, I have the DVDs already but
>>> have not
>>> yet had the time.  If anyone is willing to give me ssh access to a
>>> 10.3
>>> box I can try to fix this earlier.
>>
>> I had some problems with my 10.3-capable box, but happily enough it
>> decided to come alive again. I'm currently booted into 10.3.9 and
>> will have a look.
> 
> It is a platform bug, RTLD_LOCAL doesn't work on 10.3. The following  
> C snippet fails with the same error as ctypes: FAIL: dlcompat: unable  
> to open this file with RTLD_LOCAL. This seems to be confirmed by this  
> sourcet test file from darwin: http://darwinsource.opendarwin.org/ 
> 10.4.1/dyld-43/unit-tests/test-cases/dlopen-RTLD_LOCAL/main.c.

I think that this problem still exists.  From what I have found out
so far (still I don't have access to osx 10.3 myself), it seems that
there are three possibilities:

- ignore this issue ;-)

- make RTLD_GLOBAL the default mode on osx: either on 10.3 only,
  or on all versions (how can I determine 10.3 from 10.4?)

- change the *test* only so that RTLD_GLOBAL is used on osx.


I do not know how other ctypes users on osx are affected by this problem,
however

  http://codespeak.net/pypy/dist/pypy/doc/rctypes.html#ctypes-version-and-platform-notes

recommends to patch ctypes/__init__.py on osx 10.3.

Thanks,
Thomas



More information about the Python-Dev mailing list