Re: 10.5 OS X ppc64 problem

Lists: pgsql-general
From: David Brown <sketchy(at)mac(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: 10.5 OS X ppc64 problem
Date: 2008-07-16 13:25:57
Message-ID: 24058740573594561907274377989121297645-Webmail2@me.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

I'm trying to install the ppc64 bit version on my server, It completes, but when I try to build PHP with postgre support, it complains about a set of libraries in the postgresql install and it dumps this:

ibs/libphp5.bundle libs/libphp5.so
ld: warning in /usr/local/pgsql/lib/libpq.dylib, file is not of required architecture
Undefined symbols for architecture ppc64:
"_PQgetResult", referenced from:
__close_pgsql_link in pgsql.o
__close_pgsql_plink in pgsql.o
SNIP--------------------------------SNIP
"_PQconnectdb", referenced from:
_php_pgsql_do_connect in pgsql.o
_php_pgsql_do_connect in pgsql.o
_php_pgsql_do_connect in pgsql.o
"_lo_import", referenced from:
_zif_pg_lo_import in pgsql.o
ld: symbol(s) not found for architecture ppc64
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//cc4QkRzU.out (No such file or directory)
make: *** [libs/libphp5.bundle] Error 1

I am configuring with these settings.
CFLAGS="-arch ppc -arch ppc64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch ppc -arch ppc64 -g -Os -pipe" CXXFLAGS="-arch ppc -arch ppc64 -g -Os -pipe" LDFLAGS="-arch ppc -arch ppc64 -bind_at_load"

All I see are issues with the ppc64 build, and the binaries are all crap. One universal binary had ppc, i386, x86_64, but no ppc64. Since everything in 10.5 is 64 bit, php will not compile with 32 bit postgre libraries (unless I missed something).

sh-3.2# file libpq.dylib
libpq.dylib: Mach-O dynamically linked shared library ppc

Can anyone offer any advice?


From: Shane Ambler <pgsql(at)Sheeky(dot)Biz>
To: David Brown <sketchy(at)mac(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: 10.5 OS X ppc64 problem
Date: 2008-07-16 18:17:12
Message-ID: 487E3B28.20807@Sheeky.Biz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

David Brown wrote:
> I'm trying to install the ppc64 bit version on my server, It
> completes, but when I try to build PHP with postgre support, it
> complains about a set of libraries in the postgresql install and it
> dumps this:

> I am configuring with these settings. CFLAGS="-arch ppc -arch ppc64
> -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch ppc -arch ppc64 -g -Os
> -pipe" CXXFLAGS="-arch ppc -arch ppc64 -g -Os -pipe" LDFLAGS="-arch
> ppc -arch ppc64 -bind_at_load"
>
> All I see are issues with the ppc64 build, and the binaries are all
> crap. One universal binary had ppc, i386, x86_64, but no ppc64.
> Since everything in 10.5 is 64 bit, php will not compile with 32 bit
> postgre libraries (unless I missed something).
>
> sh-3.2# file libpq.dylib
> libpq.dylib: Mach-O dynamically linked shared library ppc
>
> Can anyone offer any advice?
>
There has been some talk about getting postgres to build as a universal
binary. The current makefiles don't support the option but a couple of
people have come up with work arounds. I do believe that there are plans
to add this to future releases.

An informative post would be -
http://archives.postgresql.org/pgsql-general/2008-02/msg00200.php

--

Shane Ambler
pgSQL (at) Sheeky (dot) Biz

Get Sheeky @ http://Sheeky.Biz


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Shane Ambler <pgsql(at)Sheeky(dot)Biz>
Cc: David Brown <sketchy(at)mac(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: 10.5 OS X ppc64 problem
Date: 2008-07-19 04:19:40
Message-ID: 14766.1216441180@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Shane Ambler <pgsql(at)Sheeky(dot)Biz> writes:
> There has been some talk about getting postgres to build as a universal
> binary. The current makefiles don't support the option but a couple of
> people have come up with work arounds. I do believe that there are plans
> to add this to future releases.

FYI, we are making some progress:
http://archives.postgresql.org/pgsql-hackers/2008-07/msg00884.php

I am not sure we'll ever bother to fix the configuration-file issue,
but other than that it does seem to be feasible to build universal
binaries without major hacking on the source code as of CVS HEAD.
(I fixed the postgres.bki issue a few minutes ago.)

regards, tom lane