Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eXaux-0004vi-9a for pgsql-general@arkaria.postgresql.org; Fri, 05 Jan 2018 22:56:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eXauv-0005Yb-Vo for pgsql-general@arkaria.postgresql.org; Fri, 05 Jan 2018 22:56:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eXauv-0005YR-OX for pgsql-general@lists.postgresql.org; Fri, 05 Jan 2018 22:56:49 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eXaus-00060p-IK for pgsql-general@postgresql.org; Fri, 05 Jan 2018 22:56:48 +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 w05MuUrU020600; Fri, 5 Jan 2018 17:56:30 -0500 From: Tom Lane To: Alvaro Herrera cc: Travis Allison , Adrian Klaver , floriparob@gmail.com, pgsql-general@postgresql.org, Christoph Berg Subject: Re: What generates pg_config.h? In-reply-to: <20180105212750.ip5ek6v4p3tiix7e@alvherre.pgsql> References: <20180105212750.ip5ek6v4p3tiix7e@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 05 Jan 2018 18:27:50 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20598.1515192990.1@sss.pgh.pa.us> Date: Fri, 05 Jan 2018 17:56:30 -0500 Message-ID: <20599.1515192990@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > Travis Allison wrote: >> No instance of Postgres 10 running. I took Tom's suggestion: I ran dpkg -S >> /usr/include/postgresql/pg_config.h >> Result: libpq-dev: /usr/include/postgresql/pg_config.h Ah, thanks for clearing that up. >> Any suggestions on what to do next? > I wonder if there is a mistake in the use of INCLUDEDIR vs. > INCLUDEDIR-SERVER for -I. Maybe both are being used, and looks like > only the latter should be. It seems odd that there are two pg_config.h > files getting included ... Yeah ... > but I do wonder why is there a pg_config.h in libpq-dev. Now I seem to recall some discussion with a packager who felt that providing just the latest-and-greatest libpq was sufficient for clients, and only server-side code needed to depend on the server version. So I'm betting that the intention on the Ubuntu packager's end is that you use a -I for /usr/include/postgresql when building client code, while if you want to build a server extension, you point at the appropriate version subdirectory. Meanwhile, the extension Travis is trying to build is unfamiliar with that idea and is throwing in a bunch of -I switches willy-nilly. In short, yeah, try removing the -I that's pointing at the upper directory. regards, tom lane