From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 8803DCC30C; Wed, 20 Jan 2021 21:20:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8803DCC30C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1611166851; bh=wTjHMsKnXvK7xYw+5/zmZO8ljEIrohhcb+2C7cFmWhY=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=x27YJ8ygXwIG3XAK8Oeu+3aDqRiJxnUZP6kKRDbnOiriAFxX+lcA5Bz2Fx16qOHV1 xvrVbZ61EpQ4VhcDfuqUyhk1YLY6PH9Ej2A9P6l7h7CgYV9WDyxLnl8jG/OcyyFKJw 8IGHQvGYCLE8dCRN6lWPwt8aQOFvrTaHpCE4Xf6k= Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 48480CC30C for ; Wed, 20 Jan 2021 21:19:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 48480CC30C Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1l2I58-0005rt-Cd; Wed, 20 Jan 2021 21:19:50 +0300 To: Alexander Turenko , "Alexander V. Tikhonov" Date: Wed, 20 Jan 2021 21:19:47 +0300 Message-Id: <4cb3d48dc4640e7e2c73da66dc1e4586a4f76e02.1611149713.git.imun@tarantool.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9D0E79FBC973162CD9807AE62CAC2B33C765C844EAC374FFF00894C459B0CD1B9CC8299E1CA50FDC86D55F888DE24E7C1FD558A0F433ED0706B7995677FB1BAB6 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F16C4DE526EFCC04EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637EA9DEEAA3ECF8E948638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FCAAA1ADD1EA3AE2AA0036F5A0B303EE6FE8E60EE3F2B92B60389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C07E7E81EEA8A9722B8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B652D31B9D28593E51CC7F00164DA146DA6F5DAA56C3B73B23C77107234E2CFBA567F23339F89546C55F5C1EE8F4F765FCE355FB2A6EFF69C575ECD9A6C639B01BBD4B6F7A4D31EC0BC0CAF46E325F83A522CA9DD8327EE4930A3850AC1BE2E735F409322A2F59C95CC4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F05F538519369F3743B503F486389A921A5CC5B56E945C8DA X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C4C7A0BC55FA0FE5FCAAA1ADD1EA3AE2AA0036F5A0B303EE6FFB65B6B30E58FD10B1881A6453793CE9C32612AADDFBE061C801D989C91DAA47C32612AADDFBE0614AFB60FD1831C04C9510FB958DCE06DB6ED91DBE5ABE359ADBCB5631A0A9D21F7D06A436E56C8DB493EDB24507CE13387DFF0A840B692CF8 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34B3611847B8BC2D0BE7AA1570E44C23C8DB6B0D469000EF5058E41C8DF3BA34F54864883AC9E5569F1D7E09C32AA3244C8B41D83B17C93DAD27DD359CC0AC7D82D9ADFF0C0BDB8D1F927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj7AvRt3Uvx5QzDEblvZwjtA== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822A572C120C4D8A4F92752B9574ED81D3CA7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH 2/2] build: update CMake minimal version to 3.1 X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" In scope of implementing self-sufficient testing environment LuaJIT build system is partially ported to CMake. While integrating the new build system with Tarantool it was found (on practice of course) that using generator expressions[1] in target DEPENDS section is introduced only in CMake 3.1[2]. This CMake feature is used to pass so called "LuaJIT binary" to be used in LuaJIT tests, so one can run the same testing machinery with both Tarantool and LuaJIT with no changes in it. [1]: https://cmake.org/cmake/help/v3.1/manual/cmake-generator-expressions.7.html [2]: https://cmake.org/cmake/help/latest/release/3.1.html#commands Relates to #4862 Signed-off-by: Igor Munkin @TarantoolBot document Title: Update CMake minimal required version in build documentation This commit updates the CMake minimal required version to be used in Tarantool build infrastructure. However, one can build Tarantool from sources and the required toolchain list should be updated. CMake minimal required version is 3.1 since this commit. See the commit message for more info. --- debian/control | 9 ++++++++- rpm/tarantool.spec | 33 ++++++++++++++++++++++++++++++--- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/debian/control b/debian/control index 38d0ba731..0741e91f8 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,14 @@ Uploaders: Dmitry E. Oboukhov Build-Depends: cdbs (>= 0.4.100), debhelper (>= 9), dpkg-dev (>= 1.16.1~), # Enable systemd for Debian Jessie+ and Ubuntu Wily+ debhelper (>= 9.20160709) | dh-systemd (>= 1.22) | sysvinit (<< 2.88dsf-59) | upstart (<< 1.13), - cmake, +# XXX: This is a tiny hack to support Tarantool build on the old +# distributions (e.g. Ubuntu Trusty Tahr) providing CMake 3+ via +# cmake3 package that conflicts and replaces cmake package (that +# provides CMake 2.18). Alternatives resolution order allows to +# make package manager seek for cmake3 package at first and use it +# if it found or fallback to cmake package (that provides CMake 3+ +# for modern distributions) otherwise. + cmake3 (>= 3.1) | cmake (>= 3.1), libreadline-dev, libncurses5-dev, libssl-dev, diff --git a/rpm/tarantool.spec b/rpm/tarantool.spec index aae60f8dc..4167ca480 100644 --- a/rpm/tarantool.spec +++ b/rpm/tarantool.spec @@ -5,7 +5,28 @@ %bcond_with systemd %endif -BuildRequires: cmake >= 2.8 +# XXX: There is an old CMake (2.8.12) provided by cmake package in +# main CentOS repositories for distributions older than CentOS 7 +# (inclusively). At the same time, there is a newer package cmake3 +# providing CMake 3+ from EPEL repository. Ergo, one need to use +# cmake3 package to build Tarantool on old systems. +# FIXME: Make the condition simpler after CentOS 6 is purged from +# Tarantool infrastructure. +%define use_cmake3 %{?rhel:%{rhel}}%{!?rhel:9999} <= 7 + +%if %use_cmake3 +# XXX: Unfortunately there is no way to make rpmbuild install and +# enable EPEL repository prior to the build step. However, the +# requirement below obligues user to enable EPEL by himself, +# otherwise this dependency is left unmet. If there are any issues +# with building an RPM package on RHEL/CentOS 6 and RHEL/CentOS 7 +# proceed to the docs: +# https://www.tarantool.io/en/doc/latest/dev_guide/building_from_source/ +BuildRequires: cmake3 >= 3.1 +%else +BuildRequires: cmake >= 3.1 +%endif + BuildRequires: make %if (0%{?fedora} >= 22 || 0%{?rhel} >= 7 || 0%{?sle_version} >= 1500) # RHEL 6 requires devtoolset @@ -115,7 +135,7 @@ Requires: openssl # RHEL <= 7 doesn't support Recommends: Recommends: tarantool-devel Recommends: git-core -Recommends: cmake >= 2.8 +Recommends: cmake >= 3.1 Recommends: make Recommends: gcc >= 4.5 Recommends: gcc-c++ >= 4.5 @@ -147,7 +167,14 @@ C and Lua/C modules. %build # RHBZ #1301720: SYSCONFDIR an LOCALSTATEDIR must be specified explicitly -%cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo \ +# XXX: KISS, please. I can play with RPM macros to redefine %cmake +# macro for cmake3 usage, but it totally doesn't worth it. +%if %use_cmake3 +%cmake3 \ +%else +%cmake \ +%endif + . -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{_localstatedir} \ -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \ %if %{with backtrace} -- 2.25.0