Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id C00D99FA28E for ; Mon, 27 Nov 2006 22:46:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 36338-08 for ; Mon, 27 Nov 2006 22:46:13 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 339AE9F9C52 for ; Mon, 27 Nov 2006 22:46:14 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id kAS2kAi9027492; Mon, 27 Nov 2006 21:46:10 -0500 (EST) To: Brian Wipf cc: pgsql-ports@postgresql.org, Brendan Duddridge , Guido Neitzer Subject: Re: Compiling PostgreSQL 8.1.5 with 64-bit on a G5 SOLVED In-reply-to: References: <24175.1164660535@sss.pgh.pa.us> <26231.1164674902@sss.pgh.pa.us> <418CDBAD-CF9C-4A87-BB68-8DEF5F2912E0@clickspace.com> <26575.1164676678@sss.pgh.pa.us> <26816.1164677947@sss.pgh.pa.us> Comments: In-reply-to Brian Wipf message dated "Mon, 27 Nov 2006 19:21:48 -0700" Date: Mon, 27 Nov 2006 21:46:10 -0500 Message-ID: <27491.1164681970@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/15 X-Sequence-Number: 2497 Brian Wipf 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