Mac-Carbon Modules and Mac OS X 10.6

pudge on 2009-09-08T05:54:34

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:

VERSIONER_PERL_PREFER_32_BIT=yes
And for the system preference, execute this line in your terminal:
defaults write com.apple.versioner.perl Prefer-32-Bit -bool yes

Cross-posted on <pudge/*>.


both on 10.6?

mw487 on 2009-09-08T13:19:49

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?

Re:both on 10.6?

pudge on 2009-09-10T01:13:36

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.)

Re:both on 10.6?

mw487 on 2009-09-10T12:43:40

Where does one find these seeds?

Thanks.

Re:both on 10.6?

pudge on 2009-09-10T15:50:00

They were made available at WWDC or somesuch.

Split it up?

Alias on 2009-09-10T00:33:56

Would breaking it up into smaller parts help?

Re:Split it up?

pudge on 2009-09-10T01:10:41

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.