WorkHabit Blogs
WORKHABIT LABSSnow Leopard: from the web app developer's desktop
Like so many of us out there, I took the plunge last week and installed Snow Leopard. It purported many advancements, such as a completely rewritten finder and many other apps that take advantage of a better threading model and full 64 bit support.
With any OS upgrade comes some challenges, and I'd been prepared for a few of them. Some apps simply aren't going to be compatible, others required upgrades to react to changes in Apple's API, others required some creative thinking. Here's the breakdown:
Applications
Our team frequently make use of Skitch, LittleSnitch, Skype, MAMP PRO, iStat Menus, iStat Pro, Skype, Intellij Idea, and (I personally, though not sure about the rest of our crew) iTerm in our daily development.
LittleSnitch, iTerm, and iStat Menus were the ONLY apps with which I had any issues. With the exception of iTerm, all the other apps had upgrades that fixed compatibility with Snow Leopard. The main issue with iTerm is a broken Option key (it doesn't translate out to Meta or ESC- properly, even when set in preferences. There is currently a fix in subversion for this ( track the issue, see here). I have not yet tried it out, as I'm waiting on an official release.
GCC and Make
Anytime one upgrades from one major version of an apple OS to another, it's basically the equivalent of doing an archive and install. Apple's installation tools don't exactly treat the contents of your drive (particularly the files in /etc) with kid gloves, so things like paths to developer tools are killed off. Earnest Berry pointed this out to me in an online discussion earlier today, and we came up with a fix. The solution is to add /Developer/usr/bin to your PATH variable, which can be done by adding this to /etc/profile:
export PATH=$PATH:/Developer/usr/bin
Either log out and back in, or use this to immediately pick up the change:
Java
Ho' boy. This one was a doozy. Snow Leopard kills off support for Java 1.5 in favor of 1.6, and to make matters worse, they merely create symlinks from java 1.5 to 1.6 folders. Not exactly ideal. We rely fairly heavily on Spring/Hibernate which make heavy use of strong references that Java 1.6 can't clean up. As a result we have resorted to either using JRockit jdk on Linux, or falling back to 1.5 on OSX.
Our good friends at OneSwarm have posted some suggested fixes. This worked perfectly except when I ran maven, which relies on the JAVA_HOME variable.
Running java from the command line using the above tutorial showed the correct version of Java, but when running maven in my project, I got this:
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Fatal error compiling
Embedded error: Error while executing the compiler.
Java heap space
Which looked strikingly like the issue we've seen with Java 1.6 when compiling our app. Running maven with -X, we saw:
Apache Maven 2.2.0 (r788681; 2009-06-26 06:04:01-0700)
Java version: 1.6.0_15
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Looks like we've got our problem identified. Now for the solution:
As root, you can fix this by going to the terminal and typing:
Rerunning maven after doing the above produces:
Apache Maven 2.2.0 (r788681; 2009-06-26 06:04:01-0700)
Java version: 1.5.0_19
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
And there you have it!
I will continue to update as we dig further into Apple's new OS and any hangups we have with our work. Stay tuned for more!
Meanwhile, have any other developers run into issues with Snow Leopard? Give us a shout! Let us know what works for you, and what doesn't!


Post new comment