pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedcannot find PGXS file when installing an extension?
4+ messages / 2 participants
[nested] [flat]
* cannot find PGXS file when installing an extension?
@ 2018-11-02 11:17 Luca Ferrari <fluca1978@gmail.com>
2018-11-02 11:46 ` Re: cannot find PGXS file when installing an extension? Pavel Luzanov <p.luzanov@postgrespro.ru>
0 siblings, 1 reply; 4+ messages in thread
From: Luca Ferrari @ 2018-11-02 11:17 UTC (permalink / raw)
To: pgsql-general
I'm using 11.0 on FreeBSD:
testdb=> select version();
version
---------------------------------------------------------------------------------------------------------
PostgreSQL 11.0 on x86_64-unknown-freebsd11.1, compiled by gcc
(FreeBSD Ports Collection) 6.4.0, 64-bit
I've a very basic extension made by my own:
cleopatra% ls
Makefile fluca--1.0.sql fluca.control
cleopatra% cat Makefile
EXTENSION = fluca
DATA = fluca--1.0.sql
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
but when I launch make I got an error about a "cannot find" on the
line of the include directive:
cleopatra% sudo make install
make: "/usr/home/luca/tmp/fluca/Makefile" line 6: Could not find
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/home/luca/tmp/fluca
but seems to me everything is in place:
cleopatra% pg_config --pgxs
/opt/pg11/lib/postgresql/pgxs/src/makefiles/pgxs.mk
I've then tried to force the inclusion of the file adding it to the Makefile:
cleopatra% cat Makefile
EXTENSION = fluca
DATA = fluca--1.0.sql
PG_CONFIG = pg_config
include /opt/pg11/lib/postgresql/pgxs/src/makefiles/pgxs.mk
which produces a verbose error output:
cleopatra% sudo make install
make: "/opt/pg11/lib/postgresql/pgxs/src/makefiles/pgxs.mk" line 63:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/makefiles/pgxs.mk" line 64:
Need an operator
make: Unknown modifier ' '
make: "/opt/pg11/lib/postgresql/pgxs/src/makefiles/pgxs.mk" line 65:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/makefiles/pgxs.mk" line 66:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/makefiles/pgxs.mk" line 67:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/makefiles/pgxs.mk" line 70:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 44:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 49:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 51:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 52:
Missing dependency operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 55:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 58:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 59:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 60:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 65:
Missing dependency operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 68:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 72:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 73:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 93:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 105:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 106:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 108:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 109:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 112:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 113:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 115:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 116:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 121:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 122:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 124:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 125:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 130:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 131:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 133:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 134:
Need an operator
make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 139:
Need an operator
What am I missing here?
Thanks,
Luca
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: cannot find PGXS file when installing an extension?
2018-11-02 11:17 cannot find PGXS file when installing an extension? Luca Ferrari <fluca1978@gmail.com>
@ 2018-11-02 11:46 ` Pavel Luzanov <p.luzanov@postgrespro.ru>
2018-11-02 12:16 ` Re: cannot find PGXS file when installing an extension? Luca Ferrari <fluca1978@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Pavel Luzanov @ 2018-11-02 11:46 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Luca,
'sudo make install' command works in the environment of the superuser
and most likely does not see pg_config utility .
Specify the location of pg_config explicitly:
sudo make install PG_CONFIG=/opt/pg11/bin/pg_config
-----
Pavel Luzanov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
On 02.11.2018 14:17, Luca Ferrari wrote:
> I'm using 11.0 on FreeBSD:
>
> testdb=> select version();
> version
> ---------------------------------------------------------------------------------------------------------
> PostgreSQL 11.0 on x86_64-unknown-freebsd11.1, compiled by gcc
> (FreeBSD Ports Collection) 6.4.0, 64-bit
>
> I've a very basic extension made by my own:
>
> cleopatra% ls
> Makefile fluca--1.0.sql fluca.control
>
> cleopatra% cat Makefile
> EXTENSION = fluca
> DATA = fluca--1.0.sql
>
> PG_CONFIG = pg_config
> PGXS := $(shell $(PG_CONFIG) --pgxs)
> include $(PGXS)
>
> but when I launch make I got an error about a "cannot find" on the
> line of the include directive:
>
> cleopatra% sudo make install
> make: "/usr/home/luca/tmp/fluca/Makefile" line 6: Could not find
> make: Fatal errors encountered -- cannot continue
> make: stopped in /usr/home/luca/tmp/fluca
>
>
> but seems to me everything is in place:
>
> cleopatra% pg_config --pgxs
> /opt/pg11/lib/postgresql/pgxs/src/makefiles/pgxs.mk
>
>
> I've then tried to force the inclusion of the file adding it to the Makefile:
>
> cleopatra% cat Makefile
> EXTENSION = fluca
> DATA = fluca--1.0.sql
>
> PG_CONFIG = pg_config
> include /opt/pg11/lib/postgresql/pgxs/src/makefiles/pgxs.mk
>
>
> which produces a verbose error output:
>
> cleopatra% sudo make install
> make: "/opt/pg11/lib/postgresql/pgxs/src/makefiles/pgxs.mk" line 63:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/makefiles/pgxs.mk" line 64:
> Need an operator
> make: Unknown modifier ' '
> make: "/opt/pg11/lib/postgresql/pgxs/src/makefiles/pgxs.mk" line 65:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/makefiles/pgxs.mk" line 66:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/makefiles/pgxs.mk" line 67:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/makefiles/pgxs.mk" line 70:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 44:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 49:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 51:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 52:
> Missing dependency operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 55:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 58:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 59:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 60:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 65:
> Missing dependency operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 68:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 72:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 73:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 93:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 105:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 106:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 108:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 109:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 112:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 113:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 115:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 116:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 121:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 122:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 124:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 125:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 130:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 131:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 133:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 134:
> Need an operator
> make: "/opt/pg11/lib/postgresql/pgxs/src/Makefile.global" line 139:
> Need an operator
>
>
> What am I missing here?
>
> Thanks,
> Luca
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: cannot find PGXS file when installing an extension?
2018-11-02 11:17 cannot find PGXS file when installing an extension? Luca Ferrari <fluca1978@gmail.com>
2018-11-02 11:46 ` Re: cannot find PGXS file when installing an extension? Pavel Luzanov <p.luzanov@postgrespro.ru>
@ 2018-11-02 12:16 ` Luca Ferrari <fluca1978@gmail.com>
2018-11-02 12:38 ` Re: cannot find PGXS file when installing an extension? Luca Ferrari <fluca1978@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Luca Ferrari @ 2018-11-02 12:16 UTC (permalink / raw)
To: p.luzanov@postgrespro.ru; +Cc: pgsql-general@lists.postgresql.org
On Fri, Nov 2, 2018 at 12:46 PM Pavel Luzanov <p.luzanov@postgrespro.ru> wrote:
>
> Luca,
>
> 'sudo make install' command works in the environment of the superuser and most likely does not see pg_config utility .
>
> Specify the location of pg_config explicitly:
> sudo make install PG_CONFIG=/opt/pg11/bin/pg_config
No, it's not a path problem since I'm unable to run make even with my user:
cleopatra% which pg_config && make
/opt/pg11/bin/pg_config
make: "/usr/home/luca/tmp/fluca/Makefile" line 5: Could not find
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/home/luca/tmp/fluca
By the way:
cleopatra% sudo make install PG_CONFIG=/opt/pg11/bin/pg_config
Password:
make: "/usr/home/luca/tmp/fluca/Makefile" line 5: Could not find
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/home/luca/tmp/fluca
Any other idea?
Thanks,
Luca
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: cannot find PGXS file when installing an extension?
2018-11-02 11:17 cannot find PGXS file when installing an extension? Luca Ferrari <fluca1978@gmail.com>
2018-11-02 11:46 ` Re: cannot find PGXS file when installing an extension? Pavel Luzanov <p.luzanov@postgrespro.ru>
2018-11-02 12:16 ` Re: cannot find PGXS file when installing an extension? Luca Ferrari <fluca1978@gmail.com>
@ 2018-11-02 12:38 ` Luca Ferrari <fluca1978@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Luca Ferrari @ 2018-11-02 12:38 UTC (permalink / raw)
To: p.luzanov@postgrespro.ru; +Cc: pgsql-general@lists.postgresql.org
On Fri, Nov 2, 2018 at 1:16 PM Luca Ferrari <fluca1978@gmail.com> wrote:
>
> On Fri, Nov 2, 2018 at 12:46 PM Pavel Luzanov <p.luzanov@postgrespro.ru> wrote:
> >
> > Luca,
> >
> > 'sudo make install' command works in the environment of the superuser and most likely does not see pg_config utility .
> >
> > Specify the location of pg_config explicitly:
> > sudo make install PG_CONFIG=/opt/pg11/bin/pg_config
>
> No, it's not a path problem since I'm unable to run make even with my user:
>
> cleopatra% which pg_config && make
> /opt/pg11/bin/pg_config
> make: "/usr/home/luca/tmp/fluca/Makefile" line 5: Could not find
> make: Fatal errors encountered -- cannot continue
> make: stopped in /usr/home/luca/tmp/fluca
>
Shame on me!
I need to run 'gmake' on FreeBSD.
Sorry for the noise.
Luca
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2018-11-02 12:38 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-11-02 11:17 cannot find PGXS file when installing an extension? Luca Ferrari <fluca1978@gmail.com>
2018-11-02 11:46 ` Pavel Luzanov <p.luzanov@postgrespro.ru>
2018-11-02 12:16 ` Luca Ferrari <fluca1978@gmail.com>
2018-11-02 12:38 ` Luca Ferrari <fluca1978@gmail.com>
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