Re: Is a modern build system acceptable for older platforms

From: Hartmut Holzgraefe <hartmut(dot)holzgraefe(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Is a modern build system acceptable for older platforms
Date: 2018-04-28 19:10:54
Message-ID: d35dbdaa-a954-677e-1306-e03a90f09428@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 28.04.2018 05:27, Yuriy Zhuravlev wrote:
> "make distcheck"
>
> CMake have no this bad concept, in my opinion, if you want to make the
> project you should have a full build environment. (but I don't want to
> argue about it here)

this is not about having a working build environment, it is about having
a fully working and correct source tarball before distributing it as a
new release.

What "make distcheck" does is an end-to-end check of the configuration
and build process itself.

So what it does is:

* create a source tarball, putting the version number given in
configure.ac into the tarball name

* unpack the source tarball in a temporary directory, make
everything read-only

* create a build directory, run "configure" in there

* build with "make"

* run project test suite with "make check"

* run "make install" into a tmp directory, then "make uninstall",
to check that installation works, and that uninstall removes
everything again

* run "make distclean" to check that cleanup really works as expected

So things spotted by this are e.g.

* missing files that didn't end up in the src tarball ("works on my
computer")

* files being created in srcdir instead of builddir during build

* installed files missed by uninstall (ok, CMake developers have a
strong opinion about "make uninstall anyway)

* generated files that are not properly getting cleaned up

* ... more things ***

Especially the srcdir vs builddir is one I'm missing very much with
CMake, it happened several times that such problems have slipped
through in MySQL and MariaDB releases, and I've seen it in other
projects using CMake, too

--
hartmut

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2018-04-28 19:25:21 Re: [RFC] Add an until-0 loop in psql
Previous Message Tom Lane 2018-04-28 18:32:06 Re: Cold welcoming message when installing anything because of LLVM bitcode stuff