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

From: Jan Otto <asche(at)me(dot)com>
To: pgsql-hackers(at)postgreSQL(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: More Snow Leopard fun: multiarch problems while building plperl
Date: 2009-09-08 18:00:21
Message-ID: 20E3095B-FBD2-4D07-AC9D-9508249D7481@me.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> The problem here is that ARCHFLAGS is not set. If it is set correctly
> the ldopts would be correctly set:
>
> $ export ARCHFLAGS="-arch x86_64"
> $ perl -MExtUtils::Embed -e ldopts
> -arch x86_64 -L/usr/local/lib -L/System/Library/Perl/5.10.0/darwin-
> thread-multi-2level/CORE -lperl -ldl -lm -lutil -lc
> $
>
> if ARCHFLAGS is not set Config_heavy.pl puts '-arch x86_64 -arch
> i386 -arch ppc' in by default:
>
> $ unset ARCHFLAGS
> $ perl -MExtUtils::Embed -e ldopts
> -L/usr/local/lib -L/System/Library/Perl/5.10.0/darwin-thread-
> multi-2level/CORE -lperl -ldl -lm -lutil -lc
> $

sorry wrong pasted:

$ unset ARCHFLAGS
$ perl -MExtUtils::Embed -e ldopts
-arch x86_64 -arch i386 -arch ppc -L/usr/local/lib -L/System/
Library/Perl/5.10.0/darwin-thread-multi-2level/CORE -lperl -ldl -lm -
lutil -lc
$

>
> more elegant would be something like this instead of 'perl -
> MExtUtils::Embed -e ldopts'
>
> [ "$ARCHFLAGS" ] || export ARCHFLAGS=""; perl -MExtUtils::Embed -e
> ldopts
>
> example:
> $ export ARCHFLAGS="-arch x86_64"
> $ [ "$ARCHFLAGS" ] || export ARCHFLAGS=""; perl -MExtUtils::Embed -e
> ldopts
> -arch x86_64 -L/usr/local/lib -L/System/Library/Perl/5.10.0/darwin-
> thread-multi-2level/CORE -lperl -ldl -lm -lutil -lc
> $ unset ARCHFLAGS
> $ [ "$ARCHFLAGS" ] || export ARCHFLAGS=""; perl -MExtUtils::Embed -e
> ldopts
> -L/usr/local/lib -L/System/Library/Perl/5.10.0/darwin-thread-
> multi-2level/CORE -lperl -ldl -lm -lutil -lc
> $
>
> so we make shure if somebody tries to build an universal binary of
> postgres by setting the correct ARCHFLAGS
> the configure works too.
>
> patch against HEAD:
>
> diff -c -r1.653 configure
> *** configure 26 Aug 2009 22:24:41 -0000 1.653
> --- configure 8 Sep 2009 17:47:29 -0000
> ***************
> *** 6941,6947 ****
>
> { $as_echo "$as_me:$LINENO: checking for flags to link embedded
> Perl" >&5
> $as_echo_n "checking for flags to link embedded Perl... " >&6; }
> ! pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
> pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
> perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
> if test -z "$perl_embed_ldflags" ; then
> --- 6941,6947 ----
>
> { $as_echo "$as_me:$LINENO: checking for flags to link embedded
> Perl" >&5
> $as_echo_n "checking for flags to link embedded Perl... " >&6; }
> ! pgac_tmp1=`[ "$ARCHFLAGS" ] || export ARCHFLAGS=""; $PERL -
> MExtUtils::Embed -e ldopts`
> pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
> perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
> if test -z "$perl_embed_ldflags" ; then
>
> regards, jan otto
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2009-09-08 18:05:45 Re: Time-based Releases WAS: 8.5 release timetable, again
Previous Message Jan Otto 2009-09-08 17:56:22 Re: More Snow Leopard fun: multiarch problems while building plperl