Am 14.03.2006 um 05:29 schrieb Edward Moy:

On Mar 13, 2006, at 4:38 AM, Dominic Dunlop wrote:

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?

In the modules I've tried:

% make 'PASTHRU_INC=-arch i386 -arch ppc' 'OTHERLDFLAGS=-arch i386 - arch ppc'

was sufficient to build a 2-way universal (this is how Apple builds the extra CPAN modules).

I understand there are some modules that don't uses these variables, so hacking of the Makefile may be necessary.

Now that I think about it, we use universal systems, so I can't say that I've actually tried it on a non-universal system. Seems to me it should work, since the bundles don't need to resolve all their symbols (including from libSystem). Let me know if it doesn't work, as then Apple will need to figure out a solution.

That seemed to word although I couldn't test it on a intel system but the result of making the HTML-Parser (Parser.bundle) is a universal binary.

Thx,
Manfred

Reply via email to