Re: More Snow Leopard fun: multiarch problems while building plperl

From: Jan Otto <asche(at)me(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: More Snow Leopard fun: multiarch problems while building plperl
Date: 2009-09-08 10:57:22
Message-ID: 569FC6F8-9FAC-4201-8B45-055944B313E0@me.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi tom,

> $ file /System/Library/Perl/lib/5.10/libperl.dylib
> /System/Library/Perl/lib/5.10/libperl.dylib: Mach-O universal binary
> with 3 architectures
> /System/Library/Perl/lib/5.10/libperl.dylib (for architecture
> x86_64): Mach-O 64-bit dynamically linked shared library x86_64
> /System/Library/Perl/lib/5.10/libperl.dylib (for architecture
> i386): Mach-O dynamically linked shared library i386
> /System/Library/Perl/lib/5.10/libperl.dylib (for architecture
> ppc7400): Mach-O dynamically linked shared library ppc
>
> which I found rather surprising because I thought Snow Leopard had
> yanked out all support for PPC. However, there it is. But you do
> *not*

these universal libraries are needed for older programs to run. you
can run
programs with ppc-architecture on snow leopard. and you probably need it
if you cross-compile for a ppc-machine.

> $ file plperl.so
> plperl.so: Mach-O universal binary with 3 architectures
> plperl.so (for architecture x86_64): Mach-O 64-bit bundle x86_64
> plperl.so (for architecture i386): Mach-O bundle i386
> plperl.so (for architecture ppc): Mach-O bundle ppc

another way is to extract the needed architectures after the build.
e.g. for x86_64:

ditto --rsrc --arch x86_64 libperl.so libperl.so.tmp && mv
libperl.so.tmp libperl.so

regards, jan otto

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pierre Frédéric Caillaud 2009-09-08 11:15:28 integer input functions : interesting limit behaviour
Previous Message Jan Otto 2009-09-08 10:48:24 Re: More Snow Leopard fun: multiarch problems while building plperl