Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ey1da-00068f-D6 for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Mar 2018 20:44:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ey1dY-0006x7-Ur for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Mar 2018 20:44:08 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ey1dY-0006wx-Ki for pgsql-hackers@lists.postgresql.org; Mon, 19 Mar 2018 20:44:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ey1dV-0000kC-Tc for pgsql-hackers@lists.postgresql.org; Mon, 19 Mar 2018 20:44:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w2JKi15q009366; Mon, 19 Mar 2018 16:44:01 -0400 From: Tom Lane To: Terry Phelps cc: Andres Freund , pgsql-hackers@lists.postgresql.org Subject: Re: Compile error while building postgresql 10.3 In-reply-to: References: <13506.1521487746@sss.pgh.pa.us> <28853.1521489010@sss.pgh.pa.us> <20180319195451.vxymrucrnxwpbzw3@alap3.anarazel.de> <5850.1521489681@sss.pgh.pa.us> <6487.1521490512@sss.pgh.pa.us> <6865.1521490943@sss.pgh.pa.us> Comments: In-reply-to Terry Phelps message dated "Mon, 19 Mar 2018 16:28:31 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9364.1521492241.1@sss.pgh.pa.us> Date: Mon, 19 Mar 2018 16:44:01 -0400 Message-ID: <9365.1521492241@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Terry Phelps writes: > Thank you for your help. That resolved the problem. My bad. > The build ran much further and then got another error, which I'll mention > here, and go research it, since it could be just my bleeding edge source > code. > cc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement > -Wendif-labels -Wmissing-format-attribute -Wformat-security > -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument > -I/usr/local/include -D_THREAD_SAFE -pthread -D_REENTRANT -D_THREAD_SAFE > -D_POSIX_PTHREAD_SEMANTICS -fPIC -DPIC -I../include > -I../../../../src/interfaces/ecpg/include -DFRONTEND > -I../../../../src/include -DSO_MAJOR_VERSION=3 -c -o datetime.o > datetime.c > datetime.c:332:1: error: conflicting types for 'PGTYPESdate_defmt_asc' > PGTYPESdate_defmt_asc(date * d, const char *fmt, const char *str) > ^ > /usr/local/include/pgtypes_date.h:24:12: note: previous declaration is here > extern int PGTYPESdate_defmt_asc(date *, const char *, char *); > ^ > 1 error generated. It looks like you've got -I/usr/local/include in front of the build's own -I switches, and that's allowing it to pull in back-version copies of PG-related include files instead of the ones in the source tree. I'm not totally sure, but if you inject -I/usr/local/include through CPPFLAGS not CFLAGS, configure might do the right thing automatically. Otherwise, you could manually edit CPPFLAGS in src/Makefile.global after configuring to get the right -I order. regards, tom lane