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 011067030E; Mon, 25 Jan 2021 22:15:49 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 011067030E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1611602149; bh=aacgers19oXz122pBOUcriIjYjwGOiRlUH0gH0yYDfI=; 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=rbV1/ueaNET9jZtQcikvrCtx9owdpudYZ4WyaUXrHd0xah8x5r5Zn0HmhDxIdwCsh I9qNfCc7e1rw6C2IpLzJ133Ns0hOwcyqNOoUel03S5jeUCK/Vz5MvzBZEBw/h9bvw8 iKYqhdEprAtlT/Op4vlVXVOXnHqUlRoQS0b51STk= 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 97AC2645E6 for ; Mon, 25 Jan 2021 22:14:48 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 97AC2645E6 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1l47K3-0006fs-2N; Mon, 25 Jan 2021 22:14:47 +0300 To: "Alexander V. Tikhonov" , Kirill Yukhin Date: Mon, 25 Jan 2021 22:14:43 +0300 Message-Id: <29585e5741c0a249e7dafdb2efa60ba9e583eedf.1611598362.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: 4F1203BC0FB41BD92BC6D7A73B5E1EC98EA86C9D82CDDA4D67D4226111D9C3A100894C459B0CD1B970A31579D3E930516C146014ED60875A01F8D1C32145D70468841D2DEA990C46 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7952C4D7BD0BF3359EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006371777B963B59186248638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FCCF9CA6B51300925EE10A686E2DC5EF533587E64A9DAF8F64389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C07E7E81EEA8A9722B8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B64854413538E1713FCC7F00164DA146DA6F5DAA56C3B73B23C77107234E2CFBA567F23339F89546C55F5C1EE8F4F765FC98F1C5DF904E309E75ECD9A6C639B01BBD4B6F7A4D31EC0BC0CAF46E325F83A522CA9DD8327EE4931B544F03EFBC4D576C9A9530EBF72002C4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F05F538519369F3743B503F486389A921A5CC5B56E945C8DA X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C4C7A0BC55FA0FE5FCCF9CA6B51300925EE10A686E2DC5EF53D0DC2B45BA8EFD02B1881A6453793CE9C32612AADDFBE061C801D989C91DAA47C32612AADDFBE0614AFB60FD1831C04C9510FB958DCE06DB6ED91DBE5ABE359AC8952F428387DEC07D06A436E56C8DB493EDB24507CE13387DFF0A840B692CF8 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D346B71C4B0698719D7193FD8D203C37427DD0D675E2B761E0174033D428453616F99B91701F6828C531D7E09C32AA3244C674F143A5CD0908396271EC7F99CF03B69B6CAE0477E908D927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbLwCnVtyrifInXX/zEoQHg== X-Mailru-Sender: 689FA8AB762F73936BC43F508A0638222B373F8CFB1F71050EF96FC0CC2378E3A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 2/2] build: update CMake minimum 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 minimum required version in build documentation This commit updates the CMake minimum 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 minimum required version is 3.1 since this commit. See the commit message for more info. Signed-off-by: Igor Munkin --- debian/control | 9 ++++++++- rpm/tarantool.spec | 30 +++++++++++++++++++++++++++--- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/debian/control b/debian/control index 8be2e9d01..ce810ee67 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 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 8ba14d4d0..ffd161862 100644 --- a/rpm/tarantool.spec +++ b/rpm/tarantool.spec @@ -5,7 +5,24 @@ %bcond_with systemd %endif -BuildRequires: cmake >= 2.8 +# XXX: There is an old CMake (2.8.12) provided by cmake package in +# main CentOS 7 repositories. At the same time, there is a newer +# package cmake3 providing CMake 3+ from EPEL repository. So, one +# need to use cmake3 package to build Tarantool on old systems. +%define use_cmake3 0%{?rhel} == 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 7 read 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) BuildRequires: gcc >= 4.5 @@ -115,7 +132,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 @@ -154,7 +171,14 @@ C and Lua/C modules. # 2. -DENABLE_LTO=ON # because for now LTO flags are set in CC/LD flags by default: # '-flto=auto -ffat-lto-objects' -%cmake -B . \ +# 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 + -B . \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{_localstatedir} \ -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \ -- 2.25.0