Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

pudge (1)

  (email not shown publicly)
AOL IM: Crimethnk (Add Buddy, Send Message)

I run this joint, see?

Journal of pudge (1)

Tuesday September 08, 2009
12:54 AM

Mac-Carbon Modules and Mac OS X 10.6

[ #39596 ]

The default perl for Mac OS X 10.6 runs in 64-bit mode by default. The problem for Mac-Carbon is that significant portions of the Carbon API are unavailable to 64-bit programs on Mac OS X.

Perhaps a subset of the API could be made available to a 64-bit perl (for more information see Apple's "64-Bit Guide for Carbon Developers"), and might in the future, but it's simpler at this point to just run perl in 32-bit mode.

There's a few ways to do this. Most obviously, you could simply build a 32-bit perl. I always build my own perl, and I just compile it for 32 bits.

There's also two methods mentioned in L under Mac OS X 10.6: you can set an environment variable, or set a system preference. For the environment use:


And for the system preference, execute this line in your terminal:

defaults write Prefer-32-Bit -bool yes

Cross-posted on <pudge/*>.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Does this mean the 32-bit version is already on 10.6?

    Is it that one perl executable can run either 32 bit or 64 bit?

    Kind of like when an executable could be ppc and intel?

    • Yes, the perl under 10.6 is fat. I don't have it installed yet so the config might be slightly different now, but under the last public beta seed, I get:

      ccflags ='-arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include'

      (Under an older seed, I saw an additional arch ... ppc64! I don't know if anyone outside of Apple uses a ppc64 architecture.)

  • Would breaking it up into smaller parts help?

    • I doubt it. The part of Mac-Carbon are very interdependent. And the pieces that are most likely to work without changes under 64-bit are the pieces that would rely on other modules (like Mac::Files) that won't. And so on.