From patchwork Fri Oct 7 16:24:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 117573 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 73335A04FD; Fri, 7 Oct 2022 18:24:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1035940DDC; Fri, 7 Oct 2022 18:24:17 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 14C0740A80 for ; Fri, 7 Oct 2022 18:24:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665159855; x=1696695855; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qroHfwsIpJBiov6oxKrcH9TCQNKru6sxOSCC7mRq77c=; b=ngtyqOpTiN2csLUBBqlulwT9vBiGy3+1PbqEWKTJi/0gX5/RNUctZMQ6 k/QwE9DTY5iYYvK+Q6TkRUZmlvtHML13cKok7PZaD7oJ4VzzFrn0fJolZ pHnA2J2d+nNLcATw7zjSp+Pej6SK/ozH2uZX8sTB/QjWyl3Mpo2E8FTPX wlD0HXqKuId1+Qclzys2EZeT+D6gijs3j3zVl8UzLNE7G1YC33WftAUsE 8E6yS4MwhOw7G7YnKc7gbpqZ+AmvBhc9UZRT886xy7Gl4U+FCEGU1+0LH +Xvvaxl4AgJyjcqyVkD6eWuC6DO9bETLQ0SNblfjc2GW7R3g5KsMoCOP8 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10493"; a="284143439" X-IronPort-AV: E=Sophos;i="5.95,167,1661842800"; d="scan'208";a="284143439" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 09:24:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10493"; a="954123276" X-IronPort-AV: E=Sophos;i="5.95,167,1661842800"; d="scan'208";a="954123276" Received: from silpixa00401385.ir.intel.com ([10.237.214.34]) by fmsmga005.fm.intel.com with ESMTP; 07 Oct 2022 09:24:13 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson Subject: [PATCH v2] build: increase minimum meson version to 0.53.2 Date: Fri, 7 Oct 2022 17:24:04 +0100 Message-Id: <20221007162404.1117056-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220912170747.3128065-1-bruce.richardson@intel.com> References: <20220912170747.3128065-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This patchset bumps the minimum meson version from 0.49.2 to 0.53.2. Ideally, the minimum version should be 0.53 without a point release, but some DPDK builds (mingw) are broken with 0.53.0 due to issue[1], fixed by commit[2] in 0.53.1. Therefore we use the latest point release from 0.53 branch i.e. 0.53.2. Some new features of interest which can now be used in DPDK with this new minimum meson version: * can do header-file checks directly inside find_library calls, rather than needing a separate check.[v0.50]. * can pass multiple cross-files at the same time when cross-compiling [v0.51]. * "alias_target" function, to allow use to give better/shorter names for particular build objects [v0.52]. * auto-generation of clang-format [v0.50] and clang-tidy[v0.52] targets when those tools are present and config dotfiles are present. Similarly ctags and cscope are added as targets when those tools are present [v0.53] * meson module for filesystem operations, so meson can now check for the presence of particlar files or directories [v0.53]. * "summary" function to provide a configuration summary at the end of the meson run [v0.53]. Plus many other features. See [3] for full details of each version. [1] https://github.com/mesonbuild/meson/issues/6442 [2] https://github.com/mesonbuild/meson/pull/6457/commits/8e7a7c36b579c11dd389fcb1152a4e8ead8b8782 [3] https://mesonbuild.com/Release-notes.html Signed-off-by: Bruce Richardson Acked-by: David Marchand --- .ci/linux-setup.sh | 2 +- doc/guides/linux_gsg/sys_reqs.rst | 2 +- doc/guides/prog_guide/build-sdk-meson.rst | 2 +- drivers/common/mlx5/linux/meson.build | 2 +- meson.build | 8 +++----- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.ci/linux-setup.sh b/.ci/linux-setup.sh index f5ef6b1b98..975bf32144 100755 --- a/.ci/linux-setup.sh +++ b/.ci/linux-setup.sh @@ -4,7 +4,7 @@ [ "$(id -u)" != '0' ] || alias sudo= # need to install as 'root' since some of the unit tests won't run without it -sudo python3 -m pip install --upgrade 'meson==0.49.2' +sudo python3 -m pip install --upgrade 'meson==0.53.2' # setup hugepages. error ignored because having hugepage is not mandatory. cat /proc/meminfo diff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst index 08d45898f0..095d702497 100644 --- a/doc/guides/linux_gsg/sys_reqs.rst +++ b/doc/guides/linux_gsg/sys_reqs.rst @@ -43,7 +43,7 @@ Compilation of the DPDK * Python 3.5 or later. -* Meson (version 0.49.2+) and ninja +* Meson (version 0.53.2+) and ninja * ``meson`` & ``ninja-build`` packages in most Linux distributions * If the packaged version is below the minimum version, the latest versions diff --git a/doc/guides/prog_guide/build-sdk-meson.rst b/doc/guides/prog_guide/build-sdk-meson.rst index 30ce805902..58d9b553a0 100644 --- a/doc/guides/prog_guide/build-sdk-meson.rst +++ b/doc/guides/prog_guide/build-sdk-meson.rst @@ -35,7 +35,7 @@ The ``meson`` tool is used to configure a DPDK build. On most Linux distributions this can be got using the local package management system, e.g. ``dnf install meson`` or ``apt-get install meson``. If meson is not available as a suitable package, it can also be installed using the Python -3 ``pip`` tool, e.g. ``pip3 install meson``. Version 0.49.2 of meson is +3 ``pip`` tool, e.g. ``pip3 install meson``. Version 0.53.2 or later of meson is required - if the version packaged is too old, the latest version is generally available from "pip". diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build index f9d1937571..e77b46d157 100644 --- a/drivers/common/mlx5/linux/meson.build +++ b/drivers/common/mlx5/linux/meson.build @@ -47,7 +47,7 @@ endif libmtcr_ul_found = false lib = cc.find_library('mtcr_ul', required:false) -if lib.found() and run_command('meson', '--version').stdout().version_compare('>= 0.49.2') +if lib.found() libmtcr_ul_found = true ext_deps += lib endif diff --git a/meson.build b/meson.build index 8b1b09ead5..cf3343a547 100644 --- a/meson.build +++ b/meson.build @@ -12,16 +12,14 @@ project('DPDK', 'C', 'default_library=static', 'warning_level=2', ], - meson_version: '>= 0.49.2' + meson_version: '>= 0.53.2' ) # check for developer mode developer_mode = false if get_option('developer_mode').auto() - if meson.version().version_compare('>=0.53') # fs module available - fs = import('fs') - developer_mode = fs.exists('.git') - endif + fs = import('fs') + developer_mode = fs.exists('.git') else developer_mode = get_option('developer_mode').enabled() endif