From: Tom Lane <tgl@sss.pgh.pa.us>
To: Terry Phelps <tgphelps50@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Compile error while building postgresql 10.3
Date: Mon, 19 Mar 2018 16:44:01 -0400
Message-ID: <9365.1521492241@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMUfR_sayK2VctackjByqBswFWfqJ8f_5ouT+KhRVxGWBb-j_Q@mail.gmail.com>
References: <CAMUfR_vJKnd6oCA28petJ5NFTVyt99xxAEz1PS1zKErhtMc-fw@mail.gmail.com>
<13506.1521487746@sss.pgh.pa.us>
<CAMUfR_t8h7ZUmMu2bHvkgwG1F6JLdnMjHkrjMnuA4jevKTWpQw@mail.gmail.com>
<28853.1521489010@sss.pgh.pa.us>
<20180319195451.vxymrucrnxwpbzw3@alap3.anarazel.de>
<5850.1521489681@sss.pgh.pa.us>
<CAMUfR_v_3=fUTe-bD1BFs_FhzDq5Ci_UZOcRULbT27JD1a0jWA@mail.gmail.com>
<6487.1521490512@sss.pgh.pa.us>
<CAMUfR_vbi8emyu3X5h1hOpVoeXzWm+xRndZ2h37gXC5BVOsFkw@mail.gmail.com>
<6865.1521490943@sss.pgh.pa.us>
<CAMUfR_sayK2VctackjByqBswFWfqJ8f_5ouT+KhRVxGWBb-j_Q@mail.gmail.com>
Terry Phelps <tgphelps50@gmail.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, tgphelps50@gmail.com, andres@anarazel.de, pgsql-hackers@lists.postgresql.org
Subject: Re: Compile error while building postgresql 10.3
In-Reply-To: <9365.1521492241@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox