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?

So I searched for a while, and after some trial and error I was able to narrow it down to a single line:

  1. # Show line numbers for Qt function calls in stack traces.
  2. 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 available through 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!

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h2> <h3> <h4> <h5> <h6> <pre> <s>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Lines and paragraphs break automatically.
  • Insert Flickr images: [flickr-photo:id=230452326,size=s] or [flickr-photoset:id=72157594262419167,size=m].
Syndicate content