Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUzcD-0004MS-OC for pgsql-general@arkaria.postgresql.org; Sat, 02 May 2020 21:24:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jUzcC-0003WE-0j for pgsql-general@arkaria.postgresql.org; Sat, 02 May 2020 21:24:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUzcB-0003W6-PH for pgsql-general@lists.postgresql.org; Sat, 02 May 2020 21:24:03 +0000 Received: from [64.147.123.19] (helo=wout3-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUzc4-0007vr-RN for pgsql-general@postgresql.org; Sat, 02 May 2020 21:24:02 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 4427B45D; Sat, 2 May 2020 17:23:45 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 02 May 2020 17:23:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=J lTYIG/eCNyIx2mbACMnVJ8guU9BQKXaFtwCnmPP2LY=; b=oUgdrgaTvsHixKxUu XtNATZV+0sDn11a/N45tCYx0qNo0rmz9mwjSrUCyMGNVzI6UipJ3S+Oe7SrYHTIa jsS6I/rcCQ2yUske3JfVrPWew03J+8TkVtZUS+LjfWgj0s16Ul3FILlgdWno4i3/ QS/T8+3cDjBKTyOW/l+kaEuwkbqPr2G00WPDUVQngs75frr0c1whtZ7D3dNG1WO3 ygJNGzLBjMN5UA0yowGg1OQ0PEvj354hcoYZhA0PoigAKHSmD/VrOFAb9i45NvTm FXmZztTkCZEhfzS/DX+7FC4lLs+OyMM9h7iCtNTHRB5900M3UK/wL9BqxAC2jZIS bjxRQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=JlTYIG/eCNyIx2mbACMnVJ8guU9BQKXaFtwCnmPP2 LY=; b=E3mPbAKKC6m/sliIjQnkhw+7WLKulosr+M0fODPTX2TxjyU2jcyStQjc/ xZkci3eW7AOCPJk1wz4DDnEYHUAV5SSd9tvkWe/BfJl2a+3zEJKsoSXNiGRHMEgu +eiqIFZqKjfj74S8T/Ql54clhlRN36GQ3z2AlN9iJrljeKIIxEuKCK9f1L17pT/b BvfHU9/c1pOQFTxTW7p3CEpfY3MZanUpmmF2RFKhFjheFwED0IzXgWI7LcOSBpWC WNE78hox1xHIWZ8k3wZk36bFeFSWGOY7aFm30AWI4UcaoaLRvGyz5p5njP0qT+nw P8d3eNB9qZNtqgZMPFYtlE+HQGTLQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrieelgdduheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepteejvdetff ejuedvleeifeefheeutdfhgfdvhffhhfekvdduveegvdejudefgfevnecukfhppeejhedr udejvddrhedrvdefudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id D44CC3065FA5; Sat, 2 May 2020 17:23:43 -0400 (EDT) Subject: Re: Compiling C Extension Functions against PostgreSQL 12 To: Tom Lane , TalGloz Cc: pgsql-general@postgresql.org 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> <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> From: Adrian Klaver Message-ID: <173180ca-67f8-b925-fe5c-7c08de5bb9c1@aklaver.com> Date: Sat, 2 May 2020 14:23:43 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <1610.1588454290@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.19 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 5/2/20 2:18 PM, Tom Lane wrote: > TalGloz 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