Re: Compiling PostgreSQL 8.1.5 with 64-bit on a G5 SOLVED

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brian Wipf <brian(at)clickspace(dot)com>
Cc: pgsql-ports(at)postgresql(dot)org, Brendan Duddridge <brendan(at)clickspace(dot)com>, Guido Neitzer <lists(at)event-s(dot)net>
Subject: Re: Compiling PostgreSQL 8.1.5 with 64-bit on a G5 SOLVED
Date: 2006-11-28 02:46:10
Message-ID: 27491.1164681970@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

Brian Wipf <brian(at)clickspace(dot)com> writes:
> On 27-Nov-06, at 6:39 PM, Tom Lane wrote:
>> Try "make clean; make all" in src/test/regress and watch the make output
>> to see exactly how refint.so is getting built. I suspect your 64-bit
>> CFLAGS are not getting propagated there for some reason.

> make -C ../../../contrib/spi refint.so autoinc.so
> gcc -no-cpp-precomp -O2 -Wall -Wmissing-prototypes -Wpointer-arith -
> Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-
> aliasing -arch ppc64 -Wall -Wmissing-prototypes -Wpointer-arith -
> Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-
> aliasing -DREFINT_VERBOSE -I. -I../../src/include -c -o refint.o
> refint.c
> gcc -no-cpp-precomp -bundle -o refint.so refint.o -
> bundle_loader ../../src/backend/postgres

Hm, well the -arch flag is getting to the gcc -c step OK, but I wonder
whether it is needed in the gcc -bundle (ie, link) step as well?

Please try this patch and see if it makes it better. Also, please check
how file(1) describes refint.so now, and whether it changes after
re-making with the patch. I get
refint.so: Mach-O bundle ppc
on a regular PPC Mac, and I bet you need it to say "ppc64".

Index: Makefile.darwin
===================================================================
RCS file: /cvsroot/pgsql/src/makefiles/Makefile.darwin,v
retrieving revision 1.9
diff -c -r1.9 Makefile.darwin
*** Makefile.darwin 19 Jan 2006 21:19:12 -0000 1.9
--- Makefile.darwin 28 Nov 2006 02:41:21 -0000
***************
*** 13,18 ****
# Rule for building shared libs (currently used only for regression test
# shlib ... should go away, since this is not really enough knowledge)
%.so: %.o
! $(CC) -bundle -o $@ $< $(BE_DLLLIBS)

sqlmansect = 7
--- 13,18 ----
# Rule for building shared libs (currently used only for regression test
# shlib ... should go away, since this is not really enough knowledge)
%.so: %.o
! $(CC) $(CFLAGS) -bundle -o $@ $< $(BE_DLLLIBS)

sqlmansect = 7

regards, tom lane

In response to

Responses

Browse pgsql-ports by date

  From Date Subject
Next Message Brian Wipf 2006-11-28 05:16:52 Re: Compiling PostgreSQL 8.1.5 with 64-bit on a G5 SOLVED
Previous Message Brian Wipf 2006-11-28 02:21:48 Re: Compiling PostgreSQL 8.1.5 with 64-bit on a G5 SOLVED