From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9706341DB5; Thu, 2 Mar 2023 14:22:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5BB194161A; Thu, 2 Mar 2023 14:22:31 +0100 (CET) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by mails.dpdk.org (Postfix) with ESMTP id 9807140E2D for ; Thu, 2 Mar 2023 14:22:29 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 7AA8D32009A5; Thu, 2 Mar 2023 08:22:28 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 02 Mar 2023 08:22:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1677763348; x= 1677849748; bh=8q17Cb1341k4tZKdLCQ/gVee631zrfZBVCxi4XDNtfg=; b=b 8VE/dTipMAP13tMTqRmQ1qqApfTGijewiQCkohqp1KV8MusPfycANkMPH1boqi8S BWdLs/9AfdRiCMcf4msUXFTu9Yms3RJnPmgnLr1zH3Y91+s8h0iy/POzwRPvsDrH 6LCEOwdUa1EPoZ/o3A6kiI+l2jVRw/V9hIvVUAq7jQXTumELjP5vvirmU2o3HfLz DryLLgP0+UVLutPECAMZpTcKzmJhsEPB2nJ8226IgUBAg4J0H//fG3uSakvxN4RD oCTePXpU7cmyZikdS6y/DbVxmPmOzUrupiQvJIoICYt9LgGtoj71TBG2NEB5jgJY JpKxWwzrGXIx+CBvwPD4A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1677763348; x= 1677849748; bh=8q17Cb1341k4tZKdLCQ/gVee631zrfZBVCxi4XDNtfg=; b=o pVcWTrSWPHGk5qp/Xcl51aQ6SsnEM/jPpRedxmWsqWLo8fQO4iG4ufRqzm7UPySJ 8MOe165KIRGzUBt5RC0UEAVliMUcMvzFh2i1LjjIJ/whJl17ngEViyU6H32T5vDy oJbEJosmUXverAzYMc++9eLzixZIcsBTeryGh69TTSbBni6cjMROYcMkmM7pngPv 91vRYOPviqbvjC8aaXI0ZuEByGEf0yboZSJ+0ea0e6EKtBOqPXXLrTwwG/Y1l74s J98qLGn5FZisQzFT4/RgDkymRLJIGHkyBSDyGqDpLUmBijzXRRyHeyJA9cunJSdM HJNqF3mQZADv0JJpffEhg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeljedggeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedvjefhudeghedvtdeijeeigeetuedugfejueekieeltdfhteev keehhfeilefhtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 2 Mar 2023 08:22:27 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: Tal Shnaiderman , Matan Azrad , Viacheslav Ovsiienko Subject: [PATCH v3 1/3] common/mlx5: get Windows dependency from standard variables Date: Thu, 2 Mar 2023 14:21:48 +0100 Message-Id: <20230302132150.3330288-2-thomas@monjalon.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230302132150.3330288-1-thomas@monjalon.net> References: <20230105161020.247780-1-thomas@monjalon.net> <20230302132150.3330288-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The DevX library path had to be provided through the variables DEVX_INC_PATH and DEVX_LIB_PATH. It was non-standard and triggers some issues with recent Meson. Using CFLAGS/LDFLAGS is standard and simpler. It is also possible to use the Meson options -Dc_args and -Dc_link_args. There are 2 options to provide: -I -L Signed-off-by: Thomas Monjalon --- doc/guides/platform/mlx5.rst | 11 +++++----- drivers/common/mlx5/windows/meson.build | 28 ++++++++++++------------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/doc/guides/platform/mlx5.rst b/doc/guides/platform/mlx5.rst index 2d6fbe7e44..5fc5d0cb8c 100644 --- a/doc/guides/platform/mlx5.rst +++ b/doc/guides/platform/mlx5.rst @@ -259,13 +259,14 @@ configured by the ``ibverbs_link`` build option: Compilation on Windows ~~~~~~~~~~~~~~~~~~~~~~ -The DevX SDK location must be set through two environment variables: +The DevX SDK location must be set through CFLAGS/LDFLAGS, +either:: -``DEVX_LIB_PATH`` - path to the DevX lib file. + meson.exe setup "-Dc_args=-I\"%DEVX_INC_PATH%\"" "-Dc_link_args=-L\"%DEVX_LIB_PATH%\"" ... -``DEVX_INC_PATH`` - path to the DevX header files. +or:: + + set CFLAGS=-I"%DEVX_INC_PATH%" && set LDFLAGS=-L"%DEVX_LIB_PATH%" && meson.exe setup ... .. _mlx5_common_env: diff --git a/drivers/common/mlx5/windows/meson.build b/drivers/common/mlx5/windows/meson.build index cc486014a8..f60daed840 100644 --- a/drivers/common/mlx5/windows/meson.build +++ b/drivers/common/mlx5/windows/meson.build @@ -1,6 +1,20 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright 2019 Mellanox Technologies, Ltd +if not cc.has_header('mlx5devx.h') + build = false + reason = 'missing dependency, "mlx5devx.h"' + subdir_done() +endif + +devxlib = cc.find_library('mlx5devx', required: true) +if not devxlib.found() + build = false + reason = 'missing dependency, "mlx5devx"' + subdir_done() +endif +ext_deps += devxlib + includes += include_directories('.') sources += files( @@ -8,20 +22,6 @@ sources += files( 'mlx5_common_os.c', ) -res_lib = run_command(python3, '-c', 'import os; print(os.environ["DEVX_LIB_PATH"])', check: false) -res_inc = run_command(python3, '-c', 'import os; print(os.environ["DEVX_INC_PATH"])', check: false) - -if (res_lib.returncode() != 0 or res_inc.returncode() != 0) - build = false - reason = 'DevX environment variables are not set, DEVX_LIB_PATH and DEVX_INC_PATH vars must be exported' - subdir_done() -endif - -devx_lib_dir = res_lib.stdout().strip() -devx_inc_dir = res_inc.stdout().strip() - -ext_deps += cc.find_library('mlx5devx', dirs: devx_lib_dir, required: true) -includes += include_directories(devx_inc_dir) cflags_options = [ '-std=c11', '-Wno-strict-prototypes', -- 2.39.1