pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to declare PG version for compiling extensions.
5+ messages / 4 participants
[nested] [flat]
* How to declare PG version for compiling extensions.
@ 2018-10-22 08:39 GPT <gptmailinglists@gmail.com>
2018-10-22 13:53 ` Re: How to declare PG version for compiling extensions. GPT <gptmailinglists@gmail.com>
2018-10-22 14:02 ` Re: How to declare PG version for compiling extensions. Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 5+ messages in thread
From: GPT @ 2018-10-22 08:39 UTC (permalink / raw)
To: pgsql-general
Hi,
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?
2) How can I declare which PG version to be used in real time?
3) How can I change which PG version to be used permanently?
Tia
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: How to declare PG version for compiling extensions.
2018-10-22 08:39 How to declare PG version for compiling extensions. GPT <gptmailinglists@gmail.com>
@ 2018-10-22 13:53 ` GPT <gptmailinglists@gmail.com>
2018-10-22 13:57 ` Re: How to declare PG version for compiling extensions. Adrian Klaver <adrian.klaver@aklaver.com>
2018-10-23 09:17 ` Re: How to declare PG version for compiling extensions. Andrew Gierth <andrew@tao11.riddles.org.uk>
1 sibling, 2 replies; 5+ messages in thread
From: GPT @ 2018-10-22 13:53 UTC (permalink / raw)
To: pgsql-general
Unfortunately, I had not installed the following package:
"postgresql-server-dev-11"
By the way, shouldn't a warning message appear while trying to run:
`PATH=/usr/lib/postgresql/11/bin:$PATH make USE_PGXS=1`
warning the user that some files are missing.
Tia
On 10/22/18, GPT <gptmailinglists@gmail.com> wrote:
> Hi,
>
> 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?
> 2) How can I declare which PG version to be used in real time?
> 3) How can I change which PG version to be used permanently?
>
> Tia
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: How to declare PG version for compiling extensions.
2018-10-22 08:39 How to declare PG version for compiling extensions. GPT <gptmailinglists@gmail.com>
2018-10-22 13:53 ` Re: How to declare PG version for compiling extensions. GPT <gptmailinglists@gmail.com>
@ 2018-10-22 13:57 ` Adrian Klaver <adrian.klaver@aklaver.com>
1 sibling, 0 replies; 5+ messages in thread
From: Adrian Klaver @ 2018-10-22 13:57 UTC (permalink / raw)
To: GPT <gptmailinglists@gmail.com>; pgsql-general
On 10/22/18 6:53 AM, GPT wrote:
> Unfortunately, I had not installed the following package:
>
> "postgresql-server-dev-11"
>
> By the way, shouldn't a warning message appear while trying to run:
>
> `PATH=/usr/lib/postgresql/11/bin:$PATH make USE_PGXS=1`
>
> warning the user that some files are missing.
Except there weren't. In $PATH there where the PG 10 files that could be
used. Now they where not the ones you wanted, but make did not 'know' that.
>
> Tia
>
>
> On 10/22/18, GPT <gptmailinglists@gmail.com> wrote:
>> Hi,
>>
>> 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?
>> 2) How can I declare which PG version to be used in real time?
>> 3) How can I change which PG version to be used permanently?
>>
>> Tia
>>
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: How to declare PG version for compiling extensions.
2018-10-22 08:39 How to declare PG version for compiling extensions. GPT <gptmailinglists@gmail.com>
2018-10-22 13:53 ` Re: How to declare PG version for compiling extensions. GPT <gptmailinglists@gmail.com>
@ 2018-10-23 09:17 ` Andrew Gierth <andrew@tao11.riddles.org.uk>
1 sibling, 0 replies; 5+ messages in thread
From: Andrew Gierth @ 2018-10-23 09:17 UTC (permalink / raw)
To: GPT <gptmailinglists@gmail.com>; +Cc: pgsql-general
>>>>> "GPT" == GPT <gptmailinglists@gmail.com> writes:
GPT> Unfortunately, I had not installed the following package:
GPT> "postgresql-server-dev-11"
GPT> By the way, shouldn't a warning message appear while trying to run:
GPT> `PATH=/usr/lib/postgresql/11/bin:$PATH make USE_PGXS=1`
GPT> warning the user that some files are missing.
It's more reliable to do (if the makefile is correctly written):
make USE_PGXS=1 PG_CONFIG=/usr/lib/postgresql/11/bin/pg_config
By specifying the pg_config binary explicitly rather than relying on the
PATH, you avoid the chance of picking up an incorrect copy by mistake.
This is why the standard form for pgxs makefiles has an assignment for
PG_CONFIG before the PGXS assignment line; the command-line option
overrides it.
--
Andrew (irc:RhodiumToad)
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: How to declare PG version for compiling extensions.
2018-10-22 08:39 How to declare PG version for compiling extensions. GPT <gptmailinglists@gmail.com>
@ 2018-10-22 14:02 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 5+ messages in thread
From: Tom Lane @ 2018-10-22 14:02 UTC (permalink / raw)
To: GPT <gptmailinglists@gmail.com>; +Cc: pgsql-general
GPT <gptmailinglists@gmail.com> 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
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2018-10-23 09:17 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-10-22 08:39 How to declare PG version for compiling extensions. GPT <gptmailinglists@gmail.com>
2018-10-22 13:53 ` GPT <gptmailinglists@gmail.com>
2018-10-22 13:57 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-10-23 09:17 ` Andrew Gierth <andrew@tao11.riddles.org.uk>
2018-10-22 14:02 ` Tom Lane <tgl@sss.pgh.pa.us>
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