Multiple architecture compiling (of ruby extensions) on OS X: The Killer -E Flag

At work I’ve had to compile a lot of extremely heavyweight Perl extensions for OS X. I have had a lot of trouble with it when I try to make Universal Binaries. I thought this was a problem with Perl or with the GUI toolkit I was trying to use, but just now I’ve run into some serious trouble trying to compile some simple extensions for a Universal Binary of Ruby. Ruby compiled OK, but I could not for the life of me compile the SQLite extension for it — which was absolutely trivial to compile and install when I was using a non-Universal-Binary Ruby.

I tracked down what was stopping me and it was this:

“gcc -E -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.9.1 -I. -I/usr/local/include -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -pipe -fno-common conftest.c -o conftest.i”
gcc: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags

I looked up what the -E flag is and it’s “Stop after the preprocessing stage; do not run the compiler proper. The output is in the form of preprocessed source code, which is sent to the standard output.”

Well… as far as I can tell, running GCC with the -E flag is a fairly standard method to determine whether you’ve got a library installed. If I can’t do that with a universal binary Ruby because of the build flags that it carries along with it, I’m not going to be able to build *any* native extensions without huge headaches, and to be honest, if I wanted huge headaches, I’d be using Perl.

I may be missing something here — there may be a way to suppress those flags, and get on with life. But I sure don’t know what it is, and the Ruby extension build mechanism doesn’t know what it is either, so as far as I’m concerned, it’s time to kiss my universal-binary Ruby goodbye, and with it my dreams of putting together RubyCocoa applications which will work equally well on PPC and Intel macs.

Ah well.

“We raised our son to be a warrior.”

Salt Lake Tribune – Dr. Laura son linked to lurid Web page:

Dr. Laura Schlessinger: “We raised our son to be a warrior.”

Dr. Laura’s Son Deryk’s Myspace Page: “Yes . . . F—ING Yes!!! I LOVE MY JOB, it takes everything reckless and deviant and heathenistic and just overall bad about me and hyper focuses these traits into my job of running around this horrid place doing nasty things to people that deserve it . . . and some that don’t.”

From the article:

The MySpace page, publicly available until Friday when it disappeared from the Internet, included cartoon depictions of rape, murder, torture and child molestation; photographs of soldiers with guns in their mouths; a photograph of a bound and blindfolded detainee captioned “My Sweet Little Habib”; accounts of illicit drug use; and a blog entry headlined by a series of obscenities and racial epithets.

An Army spokesperson suggests that “our enemies” may have slyly created a fake myspace page to make Dr. Laura’s son look bad.

Oh great… I can’t watch Shrek now

Every week the local elementary school sends a bag of ten books home with the kids, to borrow for that week. Imagine my surprise when last week we found, among those books, a short story about an ogre, named Shrek!

Shrek, of Shrek!, is green, and has weird suction-cup ears. He meets a donkey on his travels and marries an ugly princess.

I haven’t actually seen the movies of that name, but one can’t help knowing all about something that Disney (or Dreamworks or whatever) want you to know all about. They beam it into your brain at night using cosmic rays, or something.

Anyway, I haven’t actually seen the movie of that name, but I’m pretty sure (thanks to the cosmic rays) that the resemblance ends there. And that’s too bad, because Shrek! is an awesome book about a perfectly horrible monster. So horrible that snakes which bite him go into convulsions and die, and he can handily dispatch a dragon with a puff of “putrid blue flame.” Mike Meyers would be an utterly unsuitable casting choice for this Shrek. I’d cast an angry five year old and pitch-bend his voice down three octaves.

But I’m not sure a five year old could deliver the poetry. Shrek! is full of interesting language and clever verse. Writer William Steig is very good.

The thing is, Shrek! would actually make a great animation. Not a blockbuster CGI animation, or even a deluxe Disneylike animation — an old fashioned, low budget animation where the character of the drawings in the original was preserved.

I don’t imagine that can happen now. Steig has passed away; I hope he died very rich and comfortable on the proceeds of selling out his awful ogre. No biggie for him. His imagination was full of more, I’m sure.

Anyway, now that I’ve read the real Shrek!, I’m pretty sure the animated one would just make me sad.