<feed xmlns='http://www.w3.org/2005/Atom'>
<title>postgresql.git/src/pl/plpython/Makefile, branch master</title>
<subtitle>This is the main PostgreSQL git repository.</subtitle>
<id>http://git.postgresql.org/cgit/postgresql.git/atom?h=master</id>
<link rel='self' href='http://git.postgresql.org/cgit/postgresql.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/'/>
<updated>2025-07-29T19:17:40Z</updated>
<entry>
<title>Don't put library-supplied -L/-I switches before user-supplied ones.</title>
<updated>2025-07-29T19:17:40Z</updated>
<author>
<name>Tom Lane</name>
</author>
<published>2025-07-29T19:17:40Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=4300d8b6a79d61abb5ca9f901df7bde7a49322b6'/>
<id>urn:sha1:4300d8b6a79d61abb5ca9f901df7bde7a49322b6</id>
<content type='text'>
For many optional libraries, we extract the -L and -l switches needed
to link the library from a helper program such as llvm-config.  In
some cases we put the resulting -L switches into LDFLAGS ahead of
-L switches specified via --with-libraries.  That risks breaking
the user's intention for --with-libraries.

It's not such a problem if the library's -L switch points to a
directory containing only that library, but on some platforms a
library helper may "helpfully" offer a switch such as -L/usr/lib
that points to a directory holding all standard libraries.  If the
user specified --with-libraries in hopes of overriding the standard
build of some library, the -L/usr/lib switch prevents that from
happening since it will come before the user-specified directory.

To fix, avoid inserting these switches directly into LDFLAGS during
configure, instead adding them to LIBDIRS or SHLIB_LINK.  They will
still eventually get added to LDFLAGS, but only after the switches
coming from --with-libraries.

The same problem exists for -I switches: those coming from
--with-includes should appear before any coming from helper programs
such as llvm-config.  We have not heard field complaints about this
case, but it seems certain that a user attempting to override a
standard library could have issues.

The changes for this go well beyond configure itself, however,
because many Makefiles have occasion to manipulate CPPFLAGS to
insert locally-desirable -I switches, and some of them got it wrong.
The correct ordering is any -I switches pointing at within-the-
source-tree-or-build-tree directories, then those from the tree-wide
CPPFLAGS, then those from helper programs.  There were several places
that risked pulling in a system-supplied copy of libpq headers, for
example, instead of the in-tree files.  (Commit cb36f8ec2 fixed one
instance of that a few months ago, but this exercise found more.)

The Meson build scripts may or may not have any comparable problems,
but I'll leave it to someone else to investigate that.

Reported-by: Charles Samborski &lt;demurgos@demurgos.net&gt;
Author: Tom Lane &lt;tgl@sss.pgh.pa.us&gt;
Discussion: https://postgr.es/m/70f2155f-27ca-4534-b33d-7750e20633d7@demurgos.net
Backpatch-through: 13
</content>
</entry>
<entry>
<title>Hide warnings from Python headers when using gcc-compatible compiler.</title>
<updated>2023-12-26T21:16:37Z</updated>
<author>
<name>Tom Lane</name>
</author>
<published>2023-12-26T21:16:29Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=58c3151bbc045e8f575027f53c79e328381e7e61'/>
<id>urn:sha1:58c3151bbc045e8f575027f53c79e328381e7e61</id>
<content type='text'>
Like commit 388e80132, use "#pragma GCC system_header" to silence
warnings appearing within the Python headers, since newer Python
versions no longer worry about some restrictions we still use like
-Wdeclaration-after-statement.

This patch improves on 388e80132 by inventing a separate wrapper
header file, allowing the pragma to be tightly scoped to just
the Python headers and not other stuff we have laying about in
plpython.h.  I applied the same technique to plperl for the same
reason: the original patch suppressed warnings for a good deal
of our own code, not only the Perl headers.

Like the previous commit, back-patch to supported branches.

Peter Eisentraut and Tom Lane

Discussion: https://postgr.es/m/ae523163-6d2a-4b81-a875-832e48dec502@eisentraut.org
</content>
</entry>
<entry>
<title>Remove distprep</title>
<updated>2023-11-06T14:18:04Z</updated>
<author>
<name>Peter Eisentraut</name>
</author>
<published>2023-11-06T13:51:52Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=721856ff24b3722ce8e894e5a32c9c063cd48455'/>
<id>urn:sha1:721856ff24b3722ce8e894e5a32c9c063cd48455</id>
<content type='text'>
A PostgreSQL release tarball contains a number of prebuilt files, in
particular files produced by bison, flex, perl, and well as html and
man documentation.  We have done this consistent with established
practice at the time to not require these tools for building from a
tarball.  Some of these tools were hard to get, or get the right
version of, from time to time, and shipping the prebuilt output was a
convenience to users.

Now this has at least two problems:

One, we have to make the build system(s) work in two modes: Building
from a git checkout and building from a tarball.  This is pretty
complicated, but it works so far for autoconf/make.  It does not
currently work for meson; you can currently only build with meson from
a git checkout.  Making meson builds work from a tarball seems very
difficult or impossible.  One particular problem is that since meson
requires a separate build directory, we cannot make the build update
files like gram.h in the source tree.  So if you were to build from a
tarball and update gram.y, you will have a gram.h in the source tree
and one in the build tree, but the way things work is that the
compiler will always use the one in the source tree.  So you cannot,
for example, make any gram.y changes when building from a tarball.
This seems impossible to fix in a non-horrible way.

Second, there is increased interest nowadays in precisely tracking the
origin of software.  We can reasonably track contributions into the
git tree, and users can reasonably track the path from a tarball to
packages and downloads and installs.  But what happens between the git
tree and the tarball is obscure and in some cases non-reproducible.

The solution for both of these issues is to get rid of the step that
adds prebuilt files to the tarball.  The tarball now only contains
what is in the git tree (*).  Getting the additional build
dependencies is no longer a problem nowadays, and the complications to
keep these dual build modes working are significant.  And of course we
want to get the meson build system working universally.

This commit removes the make distprep target altogether.  The make
dist target continues to do its job, it just doesn't call distprep
anymore.

(*) - The tarball also contains the INSTALL file that is built at make
dist time, but not by distprep.  This is unchanged for now.

The make maintainer-clean target, whose job it is to remove the
prebuilt files in addition to what make distclean does, is now just an
alias to make distprep.  (In practice, it is probably obsolete given
that git clean is available.)

The following programs are now hard build requirements in configure
(they were already required by meson.build):

- bison
- flex
- perl

Reviewed-by: Michael Paquier &lt;michael@paquier.xyz&gt;
Reviewed-by: Andres Freund &lt;andres@anarazel.de&gt;
Discussion: https://www.postgresql.org/message-id/flat/e07408d9-e5f2-d9fd-5672-f53354e9305e@eisentraut.org
</content>
</entry>
<entry>
<title>plpython: Don't create pgxsdir subdirectory in installdir target</title>
<updated>2022-08-31T05:42:01Z</updated>
<author>
<name>Peter Eisentraut</name>
</author>
<published>2022-08-31T05:42:01Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=7d5852ca83f4103d806ee7501f70b9354345f65d'/>
<id>urn:sha1:7d5852ca83f4103d806ee7501f70b9354345f65d</id>
<content type='text'>
As of db23464715f4792298c639153dda7bfd9ad9d602, we don't install
anything there anymore from plpython, so we don't need to create the
installation directory anymore.
</content>
</entry>
<entry>
<title>plpython: Remove regression test infrastructure for Python 2.</title>
<updated>2022-03-08T02:20:51Z</updated>
<author>
<name>Andres Freund</name>
</author>
<published>2022-03-08T02:19:56Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=db23464715f4792298c639153dda7bfd9ad9d602'/>
<id>urn:sha1:db23464715f4792298c639153dda7bfd9ad9d602</id>
<content type='text'>
Since 19252e8ec93 we reject Python 2 during build configuration. Now that the
dust on the buildfarm has settled, remove regression testing infrastructure
dealing with differing output between Python 2 / 3.

Reviewed-By: Peter Eisentraut &lt;peter@eisentraut.org&gt;
Reviewed-By: Tom Lane &lt;tgl@sss.pgh.pa.us&gt;
Discussion: https://postgr.es/m/20211031184548.g4sxfe47n2kyi55r@alap3.anarazel.de
</content>
</entry>
<entry>
<title>Use gendef instead of pexports for building windows .def files</title>
<updated>2022-02-10T18:44:05Z</updated>
<author>
<name>Andrew Dunstan</name>
</author>
<published>2022-02-10T18:44:05Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=ea09a75e1efe42318abfb8ece90ce70037201f59'/>
<id>urn:sha1:ea09a75e1efe42318abfb8ece90ce70037201f59</id>
<content type='text'>
Modern msys systems lack pexports but have gendef instead, so use that.

Discussion: https://postgr.es/m/3ccde7a9-e4f9-e194-30e0-0936e6ad68ba@dunslane.net

Backpatch to release 9.4 to enable building with perl on older branches.
Before that pexports is not used for plperl.
</content>
</entry>
<entry>
<title>Remove support for upgrading extensions from "unpackaged" state.</title>
<updated>2020-02-19T21:59:14Z</updated>
<author>
<name>Tom Lane</name>
</author>
<published>2020-02-19T21:59:14Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=70a7732007bc4689f4c7a44e738eb2d892dac1e3'/>
<id>urn:sha1:70a7732007bc4689f4c7a44e738eb2d892dac1e3</id>
<content type='text'>
Andres Freund pointed out that allowing non-superusers to run
"CREATE EXTENSION ... FROM unpackaged" has security risks, since
the unpackaged-to-1.0 scripts don't try to verify that the existing
objects they're modifying are what they expect.  Just attaching such
objects to an extension doesn't seem too dangerous, but some of them
do more than that.

We could have resolved this, perhaps, by still requiring superuser
privilege to use the FROM option.  However, it's fair to ask just what
we're accomplishing by continuing to lug the unpackaged-to-1.0 scripts
forward.  None of them have received any real testing since 9.1 days,
so they may not even work anymore (even assuming that one could still
load the previous "loose" object definitions into a v13 database).
And an installation that's trying to go from pre-9.1 to v13 or later
in one jump is going to have worse compatibility problems than whether
there's a trivial way to convert their contrib modules into extension
style.

Hence, let's just drop both those scripts and the core-code support
for "CREATE EXTENSION ... FROM".

Discussion: https://postgr.es/m/20200213233015.r6rnubcvl4egdh5r@alap3.anarazel.de
</content>
</entry>
<entry>
<title>Fix some OBJS lists in two Makefiles to be ordered alphabetically</title>
<updated>2019-12-18T01:42:40Z</updated>
<author>
<name>Michael Paquier</name>
</author>
<published>2019-12-18T01:42:40Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=aa3ef7ff505305d8ee5f733090b076c301a32cc8'/>
<id>urn:sha1:aa3ef7ff505305d8ee5f733090b076c301a32cc8</id>
<content type='text'>
These have been missed in 01368e5, and count for plpython and the
backend's tsearch code.

Author: Mahendra Singh
Discussion: https://postgr.es/m/CAKYtNAo4mxRRyDB0YqE6QLh17XD7pPQotpGm3GnHS+gQKz4zQQ@mail.gmail.com
</content>
</entry>
<entry>
<title>Fix out-of-tree build for transform modules.</title>
<updated>2018-09-16T17:46:45Z</updated>
<author>
<name>Andrew Gierth</name>
</author>
<published>2018-09-16T17:46:45Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=60f6756f92251d7325d58a048f7e9a81881f8d41'/>
<id>urn:sha1:60f6756f92251d7325d58a048f7e9a81881f8d41</id>
<content type='text'>
Neither plperl nor plpython installed sufficient header files to
permit transform modules to be built out-of-tree using PGXS. Fix that
by installing all plperl and plpython header files (other than those
with special purposes such as generated data tables), and also install
plpython's special .mk file for mangling regression tests.

(This commit does not fix the windows install, which does not
currently install _any_ plperl or plpython headers.)

Also fix the existing transform modules for hstore and ltree so that
their cross-module #include directives work as anticipated by commit
df163230b9 et seq. This allows them to serve as working examples of
how to reference other modules when doing separate out-of-tree builds.

Discussion: https://postgr.es/m/87o9ej8bgl.fsf%40news-spur.riddles.org.uk
</content>
</entry>
<entry>
<title>Fix YA parallel-make hazard, this one in "make check" in plpython.</title>
<updated>2018-04-12T14:38:53Z</updated>
<author>
<name>Tom Lane</name>
</author>
<published>2018-04-12T14:38:48Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=3e110a373b8102221af5436434441cd20eeb68fa'/>
<id>urn:sha1:3e110a373b8102221af5436434441cd20eeb68fa</id>
<content type='text'>
We have to ensure that submake-generated-headers is finished before
the topmost make run launches any child makes.

Discussion: https://postgr.es/m/20180411235843.GG32449@paquier.xyz
</content>
</entry>
</feed>
