DYLD_IMAGE_SUFFIX causing havoc on Mac OS X Snow Leopard
Last night, I upgraded to Mac OS X Snow Leopard, so I could start using OpenCL (for a school project). After about an hour, it was ready, and all my settings were still intact. Awesome!
I immediately executed a small OpenCL benchmark application I had found on the internet and voila, it worked!
I continued, attempting to build PyOpenCL. That’s a major pain, because I can’t get Boost to build correctly. But that’s another story.
While attempting to build PyOpenCL, I decided to run the other OpenCL demos I had found. And … all of them would oddly result in crashes. Inexplicably, even the initial OpenCL benchmark application I ran, now refused to run. Even worse, the open
command now seemed to fail.
What was going on?
After asking around in #macosx a bit, the very helpful user KonaB1end offered some insightful guidance. Creating another account, testing it there, it all worked. So it was my account. Then I figured I could as well try starting a new terminal with an empty ~/.bash_profile
file. And that fixed it all!
So clearly, there was something in my ~/.bash_profile
that was causing this. But what?
I searched for a while, and after some trial and error I was able to narrow it down to a single line:
# Show line numbers for Qt function calls in stack traces.
export DYLD_IMAGE_SUFFIX=_debug
I had added this line when I started using Qt (which is an awesome framework to build cross-platform applications in C++). It’s recommended by their documentation (and it still is, they consider it a bug of Apple, and it is — I contacted them about this). It had been working fine in Mac OS X 10.4 and 10.5, but now in 10.6 (and 10.6.1), it seems to be failing. Probably because Apple is shipping a bad debug variant of one of its own frameworks.
I’ve reported this bug to Apple: it’s online at rdar://7309435.
Comments
Apple failed again :(
Apple has failed big time on that one.
Here is a workaround while waiting for the fix:
sudo mv /usr/lib/libSystem.B_debug.dylib /usr/lib/libSystem.B_debug.dylib.backup sudo cp /usr/lib/libSystem.B.dylib /usr/lib/libSystem.B_debug.dylib.backup
Thanks!
Thanks!
Pingback
[…] DYLD_IMAGE_SUFFIX=_debug makes application crash on Mac OS X – Snow Leopard DYLD_IMAGE_SUFFIX causing havoc on Mac OS X Snow Leopard […]
Yep, it is a bug in Mac OS X
Yep, it is a bug in Mac OS X — there is a bug report that has a bit more information: http://bugreports.qt.nokia.com/browse/QTBUG-4962.
Thanks for the additional
Thanks for the additional link, Denis! :)
Updated link: https:/
Updated link: https://bugreports.qt-project.org/browse/QTBUG-4962