From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: TalGloz <glozmantal@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Compiling C Extension Functions against PostgreSQL 12
Date: Sat, 2 May 2020 14:23:43 -0700
Message-ID: <173180ca-67f8-b925-fe5c-7c08de5bb9c1@aklaver.com> (raw)
In-Reply-To: <1610.1588454290@sss.pgh.pa.us>
References: <1588447687198-0.post@n3.nabble.com>
<4edd59f3-4d95-c41c-6839-7d022946f8d4@aklaver.com>
<1588448354769-0.post@n3.nabble.com>
<1b0a4606-2964-48ef-0736-ff51db2d2e1d@aklaver.com>
<1588449802471-0.post@n3.nabble.com>
<ec76736a-7842-d1ed-13a9-82789ed08017@aklaver.com>
<1588450167090-0.post@n3.nabble.com>
<9443e9f9-1eec-d4f5-eb19-fb6d1da9c587@aklaver.com>
<1588452776591-0.post@n3.nabble.com>
<1610.1588454290@sss.pgh.pa.us>
On 5/2/20 2:18 PM, Tom Lane wrote:
> TalGloz <glozmantal@gmail.com> writes:
>> I dont understand why the output for Postgres 12
>> g++ -Wall -Wpointer-arith -Wendif-labels -Wmissing-format-attribute
>> -Wformat-security -fno-strict-aliasing -fwrapv -O2 -o seal_diff_cpp.o -c
>> seal_diff_cpp.cpp
>> seal_diff_cpp.cpp:2:10: fatal error: postgres.h: No such file or directory
>> 2 | #include "postgres.h"
>> | ^~~~~~~~~~~~
>
>> looks different form the ones of Postgres 10
>
> Looking at your Makefile, it seems to be expecting that CXXFLAGS will
> be honored in the build, and it isn't being.
>
> As far as I can see from pgxs.mk, you're supposed to spell that
> PG_CXXFLAGS. Probably, it accidentally worked to do it the other
> way in v10, but no longer does, likely as a result of the fact that
> there's now some minimal amount of C++ code in core PG.
I was looking at that and was trying to figure out this from pgxs.mk:
# PG_CXXFLAGS -- will be appended to CXXFLAGS
...
ifdef PG_CXXFLAGS
override CXXFLAGS := $(CXXFLAGS) $(PG_CXXFLAGS)
Was wondering if this might be culprit(from example in pgxs.mk):
# include $(PGXS)
The OP does not have that in their make file.
>
> I'm a little dubious about whether overriding CXX is a good idea now, too.
> (Likely the core setting is the same, but if it were pointing at a
> different compiler that could cause trouble.)
>
> regards, tom lane
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, tgl@sss.pgh.pa.us, glozmantal@gmail.com
Subject: Re: Compiling C Extension Functions against PostgreSQL 12
In-Reply-To: <173180ca-67f8-b925-fe5c-7c08de5bb9c1@aklaver.com>
References: <1588447687198-0.post@n3.nabble.com> <4edd59f3-4d95-c41c-6839-7d022946f8d4@aklaver.com> <1588448354769-0.post@n3.nabble.com> <1b0a4606-2964-48ef-0736-ff51db2d2e1d@aklaver.com> <1588449802471-0.post@n3.nabble.com> <ec76736a-7842-d1ed-13a9-82789ed08017@aklaver.com> <1588450167090-0.post@n3.nabble.com> <9443e9f9-1eec-d4f5-eb19-fb6d1da9c587@aklaver.com> <1588452776591-0.post@n3.nabble.com> <1610.1588454290@sss.pgh.pa.us> <173180ca-67f8-b925-fe5c-7c08de5bb9c1@aklaver.com>
* 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