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 1gEanO-0001Vs-BC for pgsql-general@arkaria.postgresql.org; Mon, 22 Oct 2018 14:03:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gEanM-0008Vh-SA for pgsql-general@arkaria.postgresql.org; Mon, 22 Oct 2018 14:03:00 +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.89) (envelope-from ) id 1gEanM-0008VV-Jk for pgsql-general@lists.postgresql.org; Mon, 22 Oct 2018 14:03:00 +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 1gEanK-0002iC-J0 for pgsql-general@postgresql.org; Mon, 22 Oct 2018 14:03:00 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w9ME2u2i032481; Mon, 22 Oct 2018 10:02:56 -0400 From: Tom Lane To: GPT cc: pgsql-general@postgresql.org Subject: Re: How to declare PG version for compiling extensions. In-reply-to: References: Comments: In-reply-to GPT message dated "Mon, 22 Oct 2018 10:39:09 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <82977.1540216976.1@sss.pgh.pa.us> Date: Mon, 22 Oct 2018 10:02:56 -0400 Message-ID: <82978.1540216976@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk GPT writes: > Both PG versions 10.5 and 11 are installed. > I have been trying to compile extensions for PG11 by using: > PATH=/.../11/bin:PATH make USE_... > but unfortunately PG10 is always being used (the `make` output always > shows PG10 and refers to `pg_config`). > 1) Does it have to do with pg_config? If you're using PGXS, then yes, your makefile should be querying pg_config to find out where Postgres' headers etc are installed. You might want to check whether "pg_config --pgxs" points to the correct place. Also make sure your makefile is indeed doing something like PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) and not just hard-wiring where to look. regards, tom lane