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 60DABA0524 for ; Fri, 5 Feb 2021 12:35:31 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5677C18899E; Fri, 5 Feb 2021 12:35:31 +0100 (CET) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mails.dpdk.org (Postfix) with ESMTP id 78431188A29 for ; Fri, 5 Feb 2021 12:35:29 +0100 (CET) Received: by mail-wr1-f45.google.com with SMTP id a1so7326657wrq.6 for ; Fri, 05 Feb 2021 03:35:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=el8PuvO3M6qb7zMp8Na1LXlpT31ApXFph48ES/oAQHk=; b=pk6lVapesX2CvOAGhQtB2Q3StVHHTF3UpBvN5A4liZUZs3t4xAgPK2P+sptpasaZDb p4KG2pz5bA1US9EDFwiXF4hAj/mlc/57LNgOj9MyfrOwivBX8XT2CY+ZL3TkNziJKGvu G2Yms7onfzM0Xdj0wpISP0wkqShnm+mvXYYRtMTtoI2iqDmr6g+q71MFaMLn2hEgXSjK lcGyMYhmpjN22JGzPbXEPfDI1kziJ8W2dbY0gy2w8sigz6CueCJJdpcyFlJpX9bNbjvF CCw30lgb32khbG3hFzLLZvphjo/Jidaowz6dtNYv5rRJuAgpidD3xghWgHTfSIvTK1IG +hmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=el8PuvO3M6qb7zMp8Na1LXlpT31ApXFph48ES/oAQHk=; b=FxCxYsoCxHRXLn5ImOR45fUxop2DTpV7NinshoHnO7GPZx9DSnZ4vq+FuOeiuqjOEx VjZjqppgtN78jryyN1bCyjpJSZ5yxet2Z+QsOkdNlaKjxYYPJH6yTmYHhMpOBzNn2yfr uqfZWDNMJHKwzSe7hagcCmcafAXr40Z4LlzvrdePrCAQHtLcUxxBib5DyEK3+n/V1R+y bY5RXlHceeWVBUEDzmEy8Hp3fge3Gr0ha5/Yv+arol/rghc0gPpGmiObk/lFJE7EQHch /0XlK+UPamOSnlNps0XyNPi2+uKto85M0TclyQdqJto5zbIAjynDoogTGgOhMudoLOyK QSTg== X-Gm-Message-State: AOAM531RzSdM3fTe3n54+jYY0UEo+aWpj5Lj0vt5q6fsXjPGCo0dNELL VTc5mcu2zVWWd4Qu/SWzUZc= X-Google-Smtp-Source: ABdhPJzkOf66+909gPzWu1Oft6C6N9/vWQSEsRBD7/rsFKAw5Q+GRpxXpvX9CARsilZ5WhKVdxaZ9g== X-Received: by 2002:a05:6000:1547:: with SMTP id 7mr4561570wry.301.1612524928956; Fri, 05 Feb 2021 03:35:28 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id o17sm11832492wrm.52.2021.02.05.03.35.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:35:27 -0800 (PST) From: luca.boccassi@gmail.com To: Bruce Richardson Cc: Ruifeng Wang , Liron Himi , Lee Daly , Hemant Agrawal , Martin Spinler , dpdk stable Date: Fri, 5 Feb 2021 11:18:00 +0000 Message-Id: <20210205111920.1272063-194-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'build: force pkg-config for dependency detection' has been queued to stable release 20.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/07/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/0b48c2e92cbf6db4879620ef853ebea5db6e59de Thanks. Luca Boccassi --- >From 0b48c2e92cbf6db4879620ef853ebea5db6e59de Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Mon, 18 Jan 2021 14:29:57 +0000 Subject: [PATCH] build: force pkg-config for dependency detection [ upstream commit 7be7dc6dea927da7d458cb4172d70338f9eea164 ] Meson can use cmake as a fallback for detecting packages, and this can lead to picking up 64-libs for 32-bit builds. To work around this, force the use of pkg-config only for detecting libcrypto, zlib, jansson and other package dependencies. Signed-off-by: Bruce Richardson Tested-by: Ruifeng Wang Tested-by: Liron Himi Tested-by: Lee Daly Tested-by: Hemant Agrawal Tested-by: Martin Spinler --- app/test/meson.build | 2 +- config/meson.build | 2 +- drivers/common/mlx5/linux/meson.build | 3 ++- drivers/common/qat/meson.build | 2 +- drivers/compress/isal/meson.build | 2 +- drivers/compress/zlib/meson.build | 2 +- drivers/crypto/armv8/meson.build | 2 +- drivers/crypto/ccp/meson.build | 2 +- drivers/crypto/openssl/meson.build | 2 +- drivers/crypto/qat/meson.build | 2 +- drivers/net/af_xdp/meson.build | 5 +++-- drivers/net/bnx2x/meson.build | 2 +- drivers/net/mlx4/meson.build | 3 ++- drivers/net/nfb/meson.build | 2 +- drivers/net/szedata2/meson.build | 2 +- examples/vm_power_manager/meson.build | 2 +- lib/librte_bpf/meson.build | 2 +- lib/librte_metrics/meson.build | 2 +- 18 files changed, 22 insertions(+), 19 deletions(-) diff --git a/app/test/meson.build b/app/test/meson.build index 94fd39fecb..bdbc619476 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -406,7 +406,7 @@ cflags += ['-DALLOW_INTERNAL_API'] test_dep_objs = [] if dpdk_conf.has('RTE_LIB_COMPRESSDEV') - compress_test_dep = dependency('zlib', required: false) + compress_test_dep = dependency('zlib', required: false, method: 'pkg-config') if compress_test_dep.found() test_dep_objs += compress_test_dep test_sources += 'test_compressdev.c' diff --git a/config/meson.build b/config/meson.build index d5bfbcec3e..2f150de3b8 100644 --- a/config/meson.build +++ b/config/meson.build @@ -160,7 +160,7 @@ if fdt_dep.found() and cc.has_header('fdt.h') endif # check for libbsd -libbsd = dependency('libbsd', required: false) +libbsd = dependency('libbsd', required: false, method: 'pkg-config') if libbsd.found() dpdk_conf.set('RTE_USE_LIBBSD', 1) endif diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build index 63b78e4bce..fa9686fdaf 100644 --- a/drivers/common/mlx5/linux/meson.build +++ b/drivers/common/mlx5/linux/meson.build @@ -19,7 +19,8 @@ endif libnames = [ 'mlx5', 'ibverbs' ] libs = [] foreach libname:libnames - lib = dependency('lib' + libname, static:static_ibverbs, required:false) + lib = dependency('lib' + libname, static:static_ibverbs, + required:false, method: 'pkg-config') if not lib.found() and not static_ibverbs lib = cc.find_library(libname, required:false) endif diff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build index 29e1299f20..b2915c91fe 100644 --- a/drivers/common/qat/meson.build +++ b/drivers/common/qat/meson.build @@ -23,7 +23,7 @@ if disabled_drivers.contains(qat_compress_path) 'Explicitly disabled via build config') endif -libcrypto = dependency('libcrypto', required: false) +libcrypto = dependency('libcrypto', required: false, method: 'pkg-config') if qat_crypto and not libcrypto.found() qat_crypto = false dpdk_drvs_disabled += qat_crypto_path diff --git a/drivers/compress/isal/meson.build b/drivers/compress/isal/meson.build index 5ee17e28f5..d847c2ea6f 100644 --- a/drivers/compress/isal/meson.build +++ b/drivers/compress/isal/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright 2018 Intel Corporation -dep = dependency('libisal', required: false) +dep = dependency('libisal', required: false, method: 'pkg-config') if not dep.found() build = false reason = 'missing dependency, "libisal"' diff --git a/drivers/compress/zlib/meson.build b/drivers/compress/zlib/meson.build index b19a6d2b16..82cf0dddd6 100644 --- a/drivers/compress/zlib/meson.build +++ b/drivers/compress/zlib/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Cavium Networks -dep = dependency('zlib', required: false) +dep = dependency('zlib', required: false, method: 'pkg-config') if not dep.found() build = false reason = 'missing dependency, "zlib"' diff --git a/drivers/crypto/armv8/meson.build b/drivers/crypto/armv8/meson.build index 3289a2adca..027173bc1e 100644 --- a/drivers/crypto/armv8/meson.build +++ b/drivers/crypto/armv8/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2019 Arm Limited -dep = dependency('libAArch64crypto', required: false) +dep = dependency('libAArch64crypto', required: false, method: 'pkg-config') if not dep.found() build = false reason = 'missing dependency, "libAArch64crypto"' diff --git a/drivers/crypto/ccp/meson.build b/drivers/crypto/ccp/meson.build index a0e0b379eb..ff66427ae8 100644 --- a/drivers/crypto/ccp/meson.build +++ b/drivers/crypto/ccp/meson.build @@ -5,7 +5,7 @@ if not is_linux build = false reason = 'only supported on Linux' endif -dep = dependency('libcrypto', required: false) +dep = dependency('libcrypto', required: false, method: 'pkg-config') if not dep.found() build = false reason = 'missing dependency, "libcrypto"' diff --git a/drivers/crypto/openssl/meson.build b/drivers/crypto/openssl/meson.build index d9ac698971..47fb2bb751 100644 --- a/drivers/crypto/openssl/meson.build +++ b/drivers/crypto/openssl/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -dep = dependency('libcrypto', required: false) +dep = dependency('libcrypto', required: false, method: 'pkg-config') if not dep.found() build = false reason = 'missing dependency, "libcrypto"' diff --git a/drivers/crypto/qat/meson.build b/drivers/crypto/qat/meson.build index bc90ec44cc..92e0ed6565 100644 --- a/drivers/crypto/qat/meson.build +++ b/drivers/crypto/qat/meson.build @@ -5,7 +5,7 @@ # driver which comes later. Here we just add our sources files to the list build = false reason = '' # sentinal value to suppress printout -dep = dependency('libcrypto', required: false) +dep = dependency('libcrypto', required: false, method: 'pkg-config') qat_includes += include_directories('.') qat_deps += 'cryptodev' qat_deps += 'net' diff --git a/drivers/net/af_xdp/meson.build b/drivers/net/af_xdp/meson.build index fead8dd99f..ae7355c8c9 100644 --- a/drivers/net/af_xdp/meson.build +++ b/drivers/net/af_xdp/meson.build @@ -3,14 +3,15 @@ sources = files('rte_eth_af_xdp.c') -bpf_dep = dependency('libbpf', required: false) +bpf_dep = dependency('libbpf', required: false, method: 'pkg-config') if not bpf_dep.found() bpf_dep = cc.find_library('bpf', required: false) endif if bpf_dep.found() and cc.has_header('bpf/xsk.h') and cc.has_header('linux/if_xdp.h') ext_deps += bpf_dep - bpf_ver_dep = dependency('libbpf', version : '>=0.2.0', required: false) + bpf_ver_dep = dependency('libbpf', version : '>=0.2.0', + required: false, method: 'pkg-config') if bpf_ver_dep.found() dpdk_conf.set('RTE_LIBRTE_AF_XDP_PMD_SHARED_UMEM', 1) endif diff --git a/drivers/net/bnx2x/meson.build b/drivers/net/bnx2x/meson.build index 4892bb234c..9801697949 100644 --- a/drivers/net/bnx2x/meson.build +++ b/drivers/net/bnx2x/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel Corporation -dep = dependency('zlib', required: false) +dep = dependency('zlib', required: false, method: 'pkg-config') build = dep.found() reason = 'missing dependency, "zlib"' ext_deps += dep diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build index 0cf9938a88..d7602b748e 100644 --- a/drivers/net/mlx4/meson.build +++ b/drivers/net/mlx4/meson.build @@ -24,7 +24,8 @@ endif libnames = [ 'mlx4', 'ibverbs' ] libs = [] foreach libname:libnames - lib = dependency('lib' + libname, static:static_ibverbs, required:false) + lib = dependency('lib' + libname, static:static_ibverbs, + required:false, method: 'pkg-config') if not lib.found() and not static_ibverbs lib = cc.find_library(libname, required:false) endif diff --git a/drivers/net/nfb/meson.build b/drivers/net/nfb/meson.build index d53e8eca7d..995c44c61c 100644 --- a/drivers/net/nfb/meson.build +++ b/drivers/net/nfb/meson.build @@ -3,7 +3,7 @@ # Copyright(c) 2019 Netcope Technologies, a.s. # All rights reserved. -dep = dependency('netcope-common', required: false) +dep = dependency('netcope-common', required: false, method: 'pkg-config') reason = 'missing dependency, "libnfb"' build = dep.found() ext_deps += dep diff --git a/drivers/net/szedata2/meson.build b/drivers/net/szedata2/meson.build index b53fcbc591..77a5b0ed80 100644 --- a/drivers/net/szedata2/meson.build +++ b/drivers/net/szedata2/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel Corporation -dep = dependency('libsze2', required: false) +dep = dependency('libsze2', required: false, method: 'pkg-config') build = dep.found() reason = 'missing dependency, "libsze2"' ext_deps += dep diff --git a/examples/vm_power_manager/meson.build b/examples/vm_power_manager/meson.build index 1f813fbe87..637bd23235 100644 --- a/examples/vm_power_manager/meson.build +++ b/examples/vm_power_manager/meson.build @@ -41,7 +41,7 @@ opt_dep = cc.find_library('virt', required : false) build = opt_dep.found() ext_deps += opt_dep -opt_dep = dependency('jansson', required : false) +opt_dep = dependency('jansson', required : false, method: 'pkg-config') if opt_dep.found() ext_deps += opt_dep cflags += '-DUSE_JANSSON' diff --git a/lib/librte_bpf/meson.build b/lib/librte_bpf/meson.build index 48460e9505..614277effd 100644 --- a/lib/librte_bpf/meson.build +++ b/lib/librte_bpf/meson.build @@ -19,7 +19,7 @@ headers = files('bpf_def.h', deps += ['mbuf', 'net', 'ethdev'] -dep = dependency('libelf', required: false) +dep = dependency('libelf', required: false, method: 'pkg-config') if dep.found() dpdk_conf.set('RTE_LIBRTE_BPF_ELF', 1) sources += files('bpf_load_elf.c') diff --git a/lib/librte_metrics/meson.build b/lib/librte_metrics/meson.build index eed27b880a..28a8cc1155 100644 --- a/lib/librte_metrics/meson.build +++ b/lib/librte_metrics/meson.build @@ -4,7 +4,7 @@ sources = files('rte_metrics.c') headers = files('rte_metrics.h') -jansson = dependency('jansson', required: false) +jansson = dependency('jansson', required: false, method: 'pkg-config') if jansson.found() ext_deps += jansson sources += files('rte_metrics_telemetry.c') -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:37.839618434 +0000 +++ 0194-build-force-pkg-config-for-dependency-detection.patch 2021-02-05 11:18:29.146697586 +0000 @@ -1 +1 @@ -From 7be7dc6dea927da7d458cb4172d70338f9eea164 Mon Sep 17 00:00:00 2001 +From 0b48c2e92cbf6db4879620ef853ebea5db6e59de Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 7be7dc6dea927da7d458cb4172d70338f9eea164 ] + @@ -11,2 +12,0 @@ -Cc: stable@dpdk.org - @@ -23 +22,0 @@ - drivers/common/mvep/meson.build | 2 +- @@ -29 +27,0 @@ - drivers/crypto/mvsam/meson.build | 2 +- @@ -35,2 +32,0 @@ - drivers/net/mvneta/meson.build | 2 +- - drivers/net/mvpp2/meson.build | 2 +- @@ -42 +38 @@ - 22 files changed, 26 insertions(+), 23 deletions(-) + 18 files changed, 22 insertions(+), 19 deletions(-) @@ -45 +41 @@ -index 0889ad4c23..561e493a29 100644 +index 94fd39fecb..bdbc619476 100644 @@ -48 +44 @@ -@@ -408,7 +408,7 @@ cflags += ['-DALLOW_INTERNAL_API'] +@@ -406,7 +406,7 @@ cflags += ['-DALLOW_INTERNAL_API'] @@ -58 +54 @@ -index 9abb30c39f..3cf560b8a3 100644 +index d5bfbcec3e..2f150de3b8 100644 @@ -61 +57 @@ -@@ -167,7 +167,7 @@ if fdt_dep.found() and cc.has_header('fdt.h') +@@ -160,7 +160,7 @@ if fdt_dep.found() and cc.has_header('fdt.h') @@ -71 +67 @@ -index 580419e6d9..220de35420 100644 +index 63b78e4bce..fa9686fdaf 100644 @@ -84,13 +79,0 @@ -diff --git a/drivers/common/mvep/meson.build b/drivers/common/mvep/meson.build -index 863a20ab90..7cd968b382 100644 ---- a/drivers/common/mvep/meson.build -+++ b/drivers/common/mvep/meson.build -@@ -4,7 +4,7 @@ - # All rights reserved. - # - --dep = dependency('libmusdk', required: false) -+dep = dependency('libmusdk', required: false, method: 'pkg-config') - if not dep.found() - build = false - reason = 'missing dependency, "libmusdk"' @@ -98 +81 @@ -index 7dd80cc53f..67f7aca974 100644 +index 29e1299f20..b2915c91fe 100644 @@ -101 +84 @@ -@@ -21,7 +21,7 @@ if disabled_drivers.contains(qat_compress_path) +@@ -23,7 +23,7 @@ if disabled_drivers.contains(qat_compress_path) @@ -162,13 +144,0 @@ -diff --git a/drivers/crypto/mvsam/meson.build b/drivers/crypto/mvsam/meson.build -index 384eacff03..b4c55b5ff5 100644 ---- a/drivers/crypto/mvsam/meson.build -+++ b/drivers/crypto/mvsam/meson.build -@@ -3,7 +3,7 @@ - # Copyright(c) 2018 Semihalf. - # All rights reserved. - --dep = dependency('libmusdk', required: false) -+dep = dependency('libmusdk', required: false, method: 'pkg-config') - if not dep.found() - build = false - reason = 'missing dependency, "libmusdk"' @@ -202 +172 @@ -index dce1230365..60ccffabb9 100644 +index fead8dd99f..ae7355c8c9 100644 @@ -205 +175 @@ -@@ -9,14 +9,15 @@ endif +@@ -3,14 +3,15 @@ @@ -224 +194 @@ -index 8837ef4247..e260b75926 100644 +index 4892bb234c..9801697949 100644 @@ -227,3 +197,3 @@ -@@ -7,7 +7,7 @@ if is_windows - subdir_done() - endif +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: BSD-3-Clause + # Copyright(c) 2018 Intel Corporation @@ -250,26 +219,0 @@ -diff --git a/drivers/net/mvneta/meson.build b/drivers/net/mvneta/meson.build -index 4e073e0d2d..0be7b3d8ba 100644 ---- a/drivers/net/mvneta/meson.build -+++ b/drivers/net/mvneta/meson.build -@@ -9,7 +9,7 @@ if is_windows - subdir_done() - endif - --dep = dependency('libmusdk', required: false) -+dep = dependency('libmusdk', required: false, method: 'pkg-config') - if not dep.found() - build = false - reason = 'missing dependency, "libmusdk"' -diff --git a/drivers/net/mvpp2/meson.build b/drivers/net/mvpp2/meson.build -index c509d89164..bfda5439ba 100644 ---- a/drivers/net/mvpp2/meson.build -+++ b/drivers/net/mvpp2/meson.build -@@ -9,7 +9,7 @@ if is_windows - subdir_done() - endif - --dep = dependency('libmusdk', required: false) -+dep = dependency('libmusdk', required: false, method: 'pkg-config') - if not dep.found() - build = false - reason = 'missing dependency, "libmusdk"' @@ -277 +221 @@ -index 42f7921dce..f4a89b87d5 100644 +index d53e8eca7d..995c44c61c 100644 @@ -280,3 +224,3 @@ -@@ -9,7 +9,7 @@ if is_windows - subdir_done() - endif +@@ -3,7 +3,7 @@ + # Copyright(c) 2019 Netcope Technologies, a.s. + # All rights reserved. @@ -290 +234 @@ -index 4c02830b04..4f8f3325f6 100644 +index b53fcbc591..77a5b0ed80 100644 @@ -293,3 +237,3 @@ -@@ -7,7 +7,7 @@ if is_windows - subdir_done() - endif +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: BSD-3-Clause + # Copyright(c) 2018 Intel Corporation