[Pythonmac-SIG] build matplotlib on 10.3.9 without a bus error?
Kent Quirk
kent_quirk at cognitoy.com
Wed Jul 5 21:05:46 CEST 2006
Ronald Oussoren wrote:
>
> On Jul 5, 2006, at 6:04 AM, Bob Ippolito wrote:
>
>>
>> On Jul 4, 2006, at 8:26 PM, Russell E Owen wrote:
>>
>>> At 4:43 PM -0700 7/3/06, Bob Ippolito wrote:
>>>> On Jul 3, 2006, at 4:19 PM, Russell E. Owen wrote:
>>>>
>>>>> I'm trying to build on a PPC MacOS X 10.3.9 system using Python
>>>>> 2.4.1,
>>>>> but "import pylab" gives a bus error. (This is for a python app I
>>>>> distribute, so I can't give up on 10.3.9 yet. Once I solve this
>>>>> problem
>>>>> then I can redo it with static linking).
>>>>
>>>> Try running it under gdb and get a backtrace to see where it's
>>>> actually crashing.
>>>>
>>>> gdb --args /usr/local/bin/python -c "import pylab"
>>>> r
>>>> bt
>>>
>>> Here is the backtrace. I suspect just the first few lines are
>>> relevant, but I wasn't sure so I include the whole mess.
>>
>> Looks like some problem with C++ and static initializers. No idea how
>> to help you here, I suggest trying the universal build and the latest
>> pylab egg.
>
> The readme for wxPython claims that their universal build only works
> on 10.4 and not on 10.3.9 because of some issues in dyld on 10.3.9
> that cause problems with some C++ constructs. IIRC static initializers
> was one of them. Could this be the same problem?
>
> Ronald
I ran into a similar problem a few weeks ago on my last project. The
problem we had is that when you use the 10.4u SDK, it writes RTTI
definitions using a 10.4 loader feature to consolidate multiple RTTI
defs for a given class at load time. The 10.3.9 loader can't swallow
that, and ends up with non-consolidated RTTI defs.
After struggling with it for a couple of weeks, Apple came to the
conclusion that the only fix is to release 10.3.10, which apparently
they don't consider worth doing.
So what we had to do was build the PPC half of our code with the 10.3.9
SDK and GCC 3.3, build the Intel half with 10.4u and gcc4.0, and then
lipo the whole mess together. You can convince XCode 2.3 to do this for
you, so despite several weeks of pain as we hunted the problem down, in
the end it was an acceptable solution.
Kent
More information about the Pythonmac-SIG
mailing list