make tutorial 13.2

Started by PG Bug reporting formabout 5 years ago5 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/13/tutorial-sql-intro.html
Description:

https://www.postgresql.org/docs/13/tutorial-sql-intro.html
This page tells how to make tutorial files:
$ cd .../src/tutorial
$ make

I have a binary distribution version 13.2, installed from the Postgres yum
repository, on Fedora 33.
So, I downloaded the source code from here:
https://www.postgresql.org/ftp/source/v13.2/
And tried to build according to the instruction:

[max@max-home tutorial]$ make
make: pg_config: No such file or directory
make: *** No targets. Stop.

Makefile says the following:
# By default, this builds against an existing PostgreSQL installation
# (the one identified by whichever pg_config is first in your path).
# Within a configured source tree, you can say "make NO_PGXS=1 all"
# to build using the surrounding source tree.

So, in my case the following succeeded:
$ cd ...
$ ./configure
$ cd .../src/tutorial
$ make NO_PGXS=1 all

So, the documentation should tell how to build this tutorial in case of
binary distribution.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PG Bug reporting form (#1)
Re: make tutorial 13.2

PG Doc comments form <noreply@postgresql.org> writes:

I have a binary distribution version 13.2, installed from the Postgres yum
repository, on Fedora 33.
So, I downloaded the source code from here:
https://www.postgresql.org/ftp/source/v13.2/
And tried to build according to the instruction:

[max@max-home tutorial]$ make
make: pg_config: No such file or directory

Apparently, you didn't install whichever sub-package of the Postgres
distribution contains pg_config. Might be postgresql-devel, or
postgresql-dev in Debian-flavored distros. The PG project documentation
can't cover this; it's the responsibility of each group of packagers to
decide (and document) how their distributions are laid out.

regards, tom lane

#3Maksym Sanzharov
max1@inbox.ru
In reply to: Tom Lane (#2)
Re: make tutorial 13.2

В Вс, 07/03/2021 в 11:42 -0500, Tom Lane пишет:

PG Doc comments form <noreply@postgresql.org> writes:

I have a binary distribution version 13.2, installed from the
Postgres yum
repository, on Fedora 33.
So, I downloaded the source code from here:
https://www.postgresql.org/ftp/source/v13.2/
And tried to build according to the instruction:

[max@max-home tutorial]$ make
make: pg_config: No such file or directory

Apparently, you didn't install whichever sub-package of the Postgres
distribution contains pg_config.  Might be postgresql-devel, or
postgresql-dev in Debian-flavored distros.  The PG project
documentation
can't cover this; it's the responsibility of each group of packagers
to
decide (and document) how their distributions are laid out.

Building the source tree does not require postgresql13-devel. This is,
of course, because the source tree has all development files. I have
installed development libraries needed for building. I enter these
commands -
./configure
make

- and they just work.
But using "make" in the tutorial subdirectory does not work in my case.
And this behavior is documented in Makefile.

I think the issue is not distribution-specific.

#4Nikolay Samokhvalov
samokhvalov@gmail.com
In reply to: Tom Lane (#2)
Re: make tutorial 13.2

On Sun, Mar 7, 2021 at 08:43 Tom Lane <tgl@sss.pgh.pa.us> wrote:

Apparently, you didn't install whichever sub-package of the Postgres
distribution contains pg_config. Might be postgresql-devel, or
postgresql-dev in Debian-flavored distros. The PG project documentation
can't cover this; it's the responsibility of each group of packagers to
decide (and document) how their distributions are laid out.

Why? This adds complexity that is relatively easy to get rid of.

There already exist the pages for RHEL/CentOS, Ubuntu, etc. with code
snippets
https://www.postgresql.org/download/ -- having something like that in the
docs would be great.

Show quoted text
#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Nikolay Samokhvalov (#4)
Re: make tutorial 13.2

Nikolay Samokhvalov <samokhvalov@gmail.com> writes:

On Sun, Mar 7, 2021 at 08:43 Tom Lane <tgl@sss.pgh.pa.us> wrote:

Apparently, you didn't install whichever sub-package of the Postgres
distribution contains pg_config. Might be postgresql-devel, or
postgresql-dev in Debian-flavored distros. The PG project documentation
can't cover this; it's the responsibility of each group of packagers to
decide (and document) how their distributions are laid out.

Why? This adds complexity that is relatively easy to get rid of.

What you're proposing adds complexity that is impossible to get rid of.

There already exist the pages for RHEL/CentOS, Ubuntu, etc. with code
snippets
https://www.postgresql.org/download/ -- having something like that in the
docs would be great.

Those pages merely point to various package sets, they don't attempt to
track details of how the package sets are laid out. If we tried to
include such info in our core docs, it would inevitably soon be out of
date, because there'd be no mechanism for keeping it up to date with
packagers' decisions. Not to mention the confusion factor from people
reading something about package set A and supposing that it applies to
package set B as well.

(As an example, the info on
https://www.postgresql.org/download/linux/redhat/
describes the packages Devrim builds; it probably isn't very accurate
for the postgresql packages that Red Hat themselves ship.)

regards, tom lane