[Tarantool-patches] [PATCH v2 0/2] Update CMake minimum version in Tarantool

Alexander V. Tikhonov avtikhon at tarantool.org
Mon Jan 25 22:47:42 MSK 2021


Hi Igor, thanks for the patch set. It looks great with lots of
information, it LTGM.

On Mon, Jan 25, 2021 at 10:14:41PM +0300, Igor Munkin wrote:
> This series contains auxiliary activities required for this issue[1].
> 
> The second and main patch updates Tarantool build infrastructure to use
> CMake 3.1 or newer. Since this CMake release[2] the vital for LuaJIT
> testing environment feature is introduced: one can use generator
> expressions[3] in target DEPENDS section. This CMake feature is used to
> pass either Tarantool binary or LuaJIT binary to the newly implemented
> testing machinery with no changes in it.
> 
> Unfortunately, not all distributions provides CMake 3.1 or newer from their
> repositories. Here is the actual list of default packages providing CMake
> for the distributions that support Tarantool:
> | Distro             | CMake version | Repo                |
> |--------------------+---------------+---------------------|
> | CentOS 6           | 2.8.12        | base                |
> | CentOS 7           | 2.8.12        | base                |
> | CentOS 8           | 3.11.4        | appstream           |
> | Debian Jessie      | 3.0.2         | jessie/main         |
> | Debian Stretch     | 3.7.2         | stretch/main        |
> | Debian Buster      | 3.13.4        | buster/main         |
> | Fedora 28          | 3.14.4        | updates             |
> | Fedora 29          | 3.14.5        | updates             |
> | Fedora 30          | 3.17.2        | updates             |
> | Fedora 31          | 3.17.4        | updates             |
> | Fedora 32          | 3.17.4        | updates             |
> | FreeBSD 12         | 3.15.5        | default             |
> | OSX 14             | 3.19.3        | brew                |
> | OSX 15             | 3.19.3        | brew                |
> | Ubuntu 14.04       | 2.8.12        | trusty/main         |
> | Ubuntu 16.04       | 3.5.1         | xenial-updates/main |
> | Ubuntu 18.04       | 3.10.2        | bionic-updates/main |
> | Ubuntu 20.04       | 3.16.3        | focal/main          |
> | openSUSE Leap 15.1 | 3.10.2        | Main                |
> | openSUSE Leap 15.2 | 3.17.0        | Main                |
> 
> As one can see, there are no required packages provided by default for
> the following old distributions: CentOS 6, CentOS 7, Debian Jessie and
> Ubuntu 14.04. There are alternative packages (i.e. cmake3) providing a
> newer CMake than the default one for the old packages:
> | Distro             | CMake3 version  | Repo                    |
> |--------------------+-----------------+-------------------------|
> | CentOS 6           | 3.6.1           | epel*                   |
> | CentOS 7           | 3.17.5          | epel*                   |
> | Ubuntu 14.04       | 3.5.1           | trusty-updates/universe |
> 
> (*) Unfortunately, I failed to find the way to make rpmbuild install and
>     enable EPEL repository prior to the build step. However, cmake3
>     requirement obligues user to enable EPEL by himself, otherwise this
>     dependency is left unmet. If there are any issues with building an
>     RPM on CentOS 7 please proceed to the docs:
>     https://www.tarantool.io/en/doc/latest/dev_guide/building_from_source/
> 
> So the last problem is Debian Jessie: the required CMake toolchain is
> provided neither via the default repository nor via the auxiliary one
> (e.g. updates like it's done for Ubuntu 14.04). Anyway, Debian Jessie
> long term support has reached its EOL[4], so we can freely drop this
> distribution from our regular building testing. This is done in the
> first patch of this series.
> 
> NB: Be careful with updating CMake to 3.1 in CMakeLists. The following
> patch breaks Tarantool build.
> | diff --git a/CMakeLists.txt b/CMakeLists.txt
> | index 4fbd19558..6dc78fa88 100644
> | --- a/CMakeLists.txt
> | +++ b/CMakeLists.txt
> | @@ -1,4 +1,4 @@
> | -cmake_minimum_required(VERSION 2.8)
> | +cmake_minimum_required(VERSION 3.1)
> |  
> |  project(tarantool C CXX)
> |  
> 
> Surprisingly, as a result of this change -Wno-gnu-alignof-expression
> flag is removed from CFLAGS and the build fails on OSX with the
> following error[5]:
> | /tarantool/src/box/field_map.c:69:36: error: '_Alignof' applied to an expression is a GNU extension [-Werror,-Wgnu-alignof-expression]
> |                 region_aligned_alloc(region, sz, alignof(*extent));
> |                                                  ^
> | /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stdalign.h:15:17: note: expanded from macro 'alignof'
> | #define alignof _Alignof
> |                 ^
> | 1 error generated.
> 
> Anyway, I believe this is out of the scope of this series, so I just
> leave this for the further CMake upgrade endeavors.
> 
> Changes in v2:
>   * Adjust the series in accordance with recently merged PRs moving all
>     build jobs to GitHub CI[6], removing CentOS 6 CI pipeline[7] and
>     introducing Fedora 33 build job to CI[8].
>   * Moved some parts of cover letter to commit messages.
> 
> [1]: https://github.com/tarantool/tarantool/issues/4862
> [2]: https://cmake.org/cmake/help/latest/release/3.1.html#commands
> [3]: https://cmake.org/cmake/help/v3.1/manual/cmake-generator-expressions.7.html
> [4]: https://www.debian.org/News/2020/20200709
> [5]: https://gitlab.com/tarantool/tarantool/-/pipelines/243423841
> [6]: https://github.com/tarantool/tarantool/pull/5724
> [7]: https://github.com/tarantool/tarantool/pull/5729
> [8]: https://github.com/tarantool/tarantool/pull/5707
> 
> Branch: https://github.com/tarantool/tarantool/tree/imun/cmake3-toolchain
> V1: https://lists.tarantool.org/tarantool-patches/20210120184230.GC5460@tarantool.org/T/#t
> Issue: https://github.com/tarantool/tarantool/issues/4862
> CI is green but I can't share a single link to it after the changes in
> #5724, so please check whether there is a green tick everywhere for the
> top commit on the mentioned branch.
> 
> @ChangeLog:
> | * Updated CMake minimum required version in Tarantool build
> |   infrastructure to 3.1.
> 
> Igor Munkin (2):
>   github-ci: purge Debian Jessie from CI
>   build: update CMake minimum version to 3.1
> 
>  .github/workflows/debian_8.yml | 58 ----------------------------------
>  debian/control                 |  9 +++++-
>  rpm/tarantool.spec             | 30 ++++++++++++++++--
>  3 files changed, 35 insertions(+), 62 deletions(-)
>  delete mode 100644 .github/workflows/debian_8.yml
> 
> -- 
> 2.25.0
> 


More information about the Tarantool-patches mailing list