March 21, 2004

Ethereal on MacOS X

A few weeks ago, I decided to try and compile Ethereal on my mac. I got as far as getting glib-2.x built (which has a lot more funky dependencies than what I remember from the 1.2.x days), but got stuck on the gtk+-2.x build. Specifically, I got stuck trying to make a shared library version of libjpeg. The problem was that MacOS X isn't an ELF system, rather it is Mach-O. Thus, you don't get ".so" files for shared libraries, rather, you get ".dylib" files. And I had no idea what magic incantations that I needed to pass to GCC in order to get these little buggers to poop out.

Fast forward to today, and I noticed that my dad has a copy of O'Reilly's "MacOS X Panther for Unix Geeks" lying around (he bought that, and several other OS X books, in advance of getting his new PowerBook from work). Sniffing around in this book, I found the solution to my problem.

And what was the solution, pray tell? Well, to use the "-dynamiclib" flag on GCC, of course! I ended up running a command like this after compiling the jpeg source (based upon the ar command that the makefile issued in order to make the "libjpeg.a" file):

gcc -dynamiclib -install_name libjpeg.dylib -o libjpeg.dylib <jpeg object files>

And I'm happy to report, much compilation later, I have met with success:

Ethereal on MacOS X

-Andy.

Posted by andyr at March 21, 2004 09:27 PM
Comments

interesting info

Posted by: Anne California at June 18, 2004 04:07 AM
Post a comment









Remember personal info?