On 2006–03–13, at 12:53, Manfred Bergmann wrote:
I use some Perl Modules in some of my application, accessed through Camelbones. I have notices that some Perl Modules use compiled C-Code, e.g. HTML-Parser.
Now how does it work to build these modules as Universal Binaries?

The README.macosx distributed with perl-5.8.8 tells you how to make a universal binary perl. Once you have built and installed such a perl, any modules that you build using that perl should end up as universal binaries.

Although my application is build as Universal Binary and I have been told that it works with Intel-Macs the only thing that is not Intel native are some Perl Modules that I use. The reason that it works even on Intel-Macs with a PPC compiled Perl Module is Rosetta I guess.

Well, maybe. I can't see why Rosetta would make ppc-architecture XS modules work on an Intel Mac, unless the properties of /usr/bin/perl had been tweaked (I believe it's done via Get Info) to make it always run under Rosetta.

Has someone experiences with that and can give me some hints?

I don't have experience -- you are on your own! While I have been involved in hacking on the Darwin hints for Perl and updating the README file, I don't have an Intel-based Mac to try things on, so have not bothered to try a universal build. Reportedly, not even Apple builds its universal perl in the way described in README.macosx; instead, it does separate native build on each platform, then stitches them together using the lipo utility -- see <http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-01/ msg00731.html>. It may be that Apple also patches Config.pm and its subordinates so that ExtUtils::MakeMaker (and its subordinates) generate instructions to build universal modules, But I don't know.
--
Dominic Dunlop

Reply via email to