Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 34E546325DE for ; Mon, 14 Jun 2010 23:12:33 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 41988-04 for ; Tue, 15 Jun 2010 02:12:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 296A8632521 for ; Mon, 14 Jun 2010 23:12:24 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id o5F2CTb08070; Mon, 14 Jun 2010 22:12:29 -0400 (EDT) From: Bruce Momjian Message-Id: <201006150212.o5F2CTb08070@momjian.us> Subject: Re: 9.0Beta2 Build on Mac (64 bit) of pg_upgrade fails with duplicate symbols In-Reply-To: <324A21D0-CC16-4C38-9582-01ED132BBED2@gmail.com> To: Chris Ruprecht Date: Mon, 14 Jun 2010 22:12:29 -0400 (EDT) CC: pgsql-testers@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ELM1276567949-23857-0_" Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.011 tagged_above=-10 required=5 tests=BAYES_20=-0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/19 X-Sequence-Number: 133 --ELM1276567949-23857-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Chris Ruprecht wrote: > I'm building the contrib modules and get this: > > gcc -no-cpp-precomp -O3 -fno-common -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv check.o controldata.o dump.o exec.o file.o function.o info.o option.o page.o pg_upgrade.o relfilenode.o server.o tablespace.o util.o version.o version_old_8_3.o -L../../src/port -lpgport -L../../src/interfaces/libpq -lpq -L../../src/port -O3 -fno-common -arch x86_64 -Wl,-dead_strip_dylibs -lpgport -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -o pg_upgrade > ld: duplicate symbol _scandir_file_pattern in controldata.o and check.o Oops. That global variable was not properly defined; not sure why none of the other compilers caught that bug. Anyway, the attached patch should fix your problem, and will appear in 9.0 beta3. Thanks for the report. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + None of us is going to be here forever. + --ELM1276567949-23857-0_ Content-Transfer-Encoding: 7bit Content-Type: text/x-diff Content-Disposition: inline; filename="/rtmp/diff" Index: contrib/pg_upgrade/pg_upgrade.h =================================================================== RCS file: /cvsroot/pgsql/contrib/pg_upgrade/pg_upgrade.h,v retrieving revision 1.7 diff -c -c -r1.7 pg_upgrade.h *** contrib/pg_upgrade/pg_upgrade.h 12 Jun 2010 17:45:28 -0000 1.7 --- contrib/pg_upgrade/pg_upgrade.h 15 Jun 2010 02:01:48 -0000 *************** *** 237,243 **** /* * Global variables */ ! char scandir_file_pattern[MAXPGPATH]; /* check.c */ --- 237,243 ---- /* * Global variables */ ! extern char scandir_file_pattern[]; /* check.c */ Index: contrib/pg_upgrade/relfilenode.c =================================================================== RCS file: /cvsroot/pgsql/contrib/pg_upgrade/relfilenode.c,v retrieving revision 1.3 diff -c -c -r1.3 relfilenode.c *** contrib/pg_upgrade/relfilenode.c 13 May 2010 22:51:00 -0000 1.3 --- contrib/pg_upgrade/relfilenode.c 15 Jun 2010 02:01:48 -0000 *************** *** 17,22 **** --- 17,25 ---- const char *oldnspname, const char *oldrelname, const char *newnspname, const char *newrelname); + /* used by scandir(), must be global */ + char scandir_file_pattern[MAXPGPATH]; + /* * transfer_all_new_dbs() * --ELM1276567949-23857-0_--