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 BECC1A034F for ; Wed, 10 Nov 2021 07:37:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B8E7240142; Wed, 10 Nov 2021 07:37:04 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2084.outbound.protection.outlook.com [40.107.93.84]) by mails.dpdk.org (Postfix) with ESMTP id 52D3040142 for ; Wed, 10 Nov 2021 07:37:04 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a1ojqNaRwEGzlRC1sivAT02eOYZ5pCRWiG8IGHiql8kmPgwOBgPAhsiuILp3NvWdCZ7prS2ywNLOY9gYDGSn7Pto79ZQbiQWJsMAALE1on8dRE/6lMwJh8BMhm6T0fPjv0EnzieWJSdAmdNO/QxeUXUuDD7mJ6QhKIB+HrKLHHlgNcJrM/IWER0A20D8rK0RRK0xFA7KtEaF/v7vPSaf51dAKaPDUdJnTKsrblmn9AKFUAgyLorFOlg+0+5rlUs74nKvVyjdBaBMzm8npL0aBFTwT+vl+t0tn+EnW6bH4mf0hKWhwS8FyiY5gpEgwlvbq0Kr/EZROAJftkWdeWsFbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ATNwNdBSrXqtxIQ4fPGPGyiQYilY8MgsKyR0r0fDLpI=; b=l2t4i9WS5lHkrWm7gsELs7Hes7qkun2R+3bRgfyn66/LlgAHG0NSnfud7+O4q1MRgcVZBnnJFuDOjL3YP9oOS1iZzx1G16y/1znMTTA/0E/PxhrIQrZcnFz+oPX2xsL3gz0YLxt/pCLUvVBKNe3rDUVgaMKrl2xolBtalqnR9wpzyx9pamzasWDOq4HPwWqU09imPsMqysCrqKi1DGwFLgQCmk5g8v3E07suhWRxW0HIFBtWLBxENUxuOUPjY9i0K6y/zgehcv0ylRvIQMXfQMYB7D2iL29pdp7/XyFDtxc3hIIcINvCHcQ4CMXAAQEFmUzgtCGz5fWXEfrWd3XZuA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=gmail.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ATNwNdBSrXqtxIQ4fPGPGyiQYilY8MgsKyR0r0fDLpI=; b=dBuqyMlMUuhPIa3hFEYiz1t9ArahH1+zf+wumL38YBatfetDWA945XPBBc9J7XXFFweKg3VIETkcjtnuVV4eSt18wSiBPmx//3vxqI7TnfWhySdzKwlUoLQM4uZUba8e2ayI4Fz5LgWJfr5X3smjRFVY5dqulEp+Uzh8qqOdtrBNjoeOqRjGY2hMxCxbd3nyEvY2fXIH0+GZzLg23OvUJHLJDe9GWKGN32ALDkThpN3sn/ZUHIVhcB1Tz2hpzDqkGZyfcrrwLnMxEhJlDNPDUo6hNR2n/sqPaYiZXcABjm5BcaK1OhU6gUMjr8cMPdMBwZV4fGp3+UxRmd3klOmFWA== Received: from DM5PR07CA0109.namprd07.prod.outlook.com (2603:10b6:4:ae::38) by DM6PR12MB3049.namprd12.prod.outlook.com (2603:10b6:5:11d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.18; Wed, 10 Nov 2021 06:37:01 +0000 Received: from DM6NAM11FT050.eop-nam11.prod.protection.outlook.com (2603:10b6:4:ae:cafe::ec) by DM5PR07CA0109.outlook.office365.com (2603:10b6:4:ae::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:37:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT050.mail.protection.outlook.com (10.13.173.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:37:01 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:36:59 +0000 From: Xueming Li To: Dmitry Kozlyuk CC: Luca Boccassi , William Tu , dpdk stable Date: Wed, 10 Nov 2021 14:28:47 +0800 Message-ID: <20211110063216.2744012-44-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e851799e-95e6-461b-de50-08d9a414809c X-MS-TrafficTypeDiagnostic: DM6PR12MB3049: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /ogqg5XIObYMrVr+NYIXmOMdyaMFiu8W4h81QXZ2WmR5pW5D8WuXt3qCW7Uuoro4Z2aCHXwOP+jMXVrDpuiW6Vh01b/1YpcGsGaasr3UHTPX5pxYizCAygzuuY00eJHj2xOVJIG+TuiNqZqo/Z7G5G3U/ACSPHrZ+aXzMvBoefAQpOKuuXUSxp+t6WTMyC7RQcMSBfCVdO1AW15vmkRqr823P4QKqCf3T3WJIX68J0UFo1Jb/IbX4MOCfdG210uDbz0Ygw57synd3LTnkEdKU8LQUhg06FAKh4QaQnEWIKPa8IpyynAAjtwl3ztnuyI0iFMNFBgxMU8bUc/Qj6kGzCvoAWYCOFhK/l9IpC/u6impchu8+MlYO4Fb6530wf7zP3xL7BpvQBSIyJGJ5QT7zd2JDcunRJCjUpXzX2kOepqMiDnQR8dsN5BPhvilqhmobz1gW0e2RT/1InCzahW4Qv0xoLBEtSWmZ5+zVYYFyHYK2Os1S7U3KzjRLN+CZUd8zw2fcN1aT0h1Ue5nXyIy7YU8/CO3+dOb4GQOwHWpJV3hu+0ria/w1IyNui7ONbAUJZDexEGasE7p63ej8sxUwVf/tqaX61qESNks71oDdBCEEisbfsO3B2vJ5PK8JfQ14H8MY4/rTjoLgXIRH0zzElaecZhkZKWgjF8RYMKLbS0NMrKb+J8S41oQ0pXjIrlHCQfmUp8Hf8qcc5WGTI9RoWyp3K7rQTJT1S4rDrjncTskbtnW4BmPgojnAvQcmkuA9alQlGFW6/XpoH225yB0QXJ+98H1//TXEdjuDy335bjAAhep5xLY6J5N4fEsQdvyiwlaebfOS7l1NU460Zlq/Q== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(186003)(2616005)(16526019)(336012)(26005)(426003)(47076005)(2906002)(36756003)(86362001)(82310400003)(4326008)(508600001)(4001150100001)(7696005)(5660300002)(83380400001)(1076003)(70206006)(356005)(316002)(7636003)(70586007)(966005)(6666004)(54906003)(6286002)(6916009)(8676002)(53546011)(36860700001)(36906005)(55016002)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:37:01.2551 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e851799e-95e6-461b-de50-08d9a414809c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT050.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3049 Subject: [dpdk-stable] patch 'build: propagate Windows system dependencies to pkg-config' has been queued to stable release 20.11.4 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.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/12/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/91f3769c3fa08e7aaaa2098ebb80757f8aa2cf8f Thanks. Xueming Li --- >From 91f3769c3fa08e7aaaa2098ebb80757f8aa2cf8f Mon Sep 17 00:00:00 2001 From: Dmitry Kozlyuk Date: Fri, 20 Aug 2021 02:14:46 +0300 Subject: [PATCH] build: propagate Windows system dependencies to pkg-config Cc: Xueming Li [ upstream commit 5ffa86a2b4167276212c7f666a8f96fa4f46d3b3 ] Windows EAL depends on some system libraries. They were linked using add_project_link_arguments('-l'), which prevented meson from adding them to Libs.private of pkg-config file. As a result, applications using pkg-config to find DPDK hit link errors, for example: librte_eal.a(eal_windows_eal_debug.c.obj) : error LNK2019: unresolved external symbol __imp_SymInitialize referenced in function rte_dump_stack Reference required libraries in EAL using ext_deps meson variable. bus/pci and net/pcap depend on lib/eal and will pull them automatically. Drop advapi32 dependency, as MinGW locates VirtualAlloc2() dynamically. Fixes: 2a5d547a4a9b ("eal/windows: implement basic memory management") Fixes: c91717eb75c8 ("eal/windows: support exit and panic") Reported-by: William Tu Signed-off-by: Dmitry Kozlyuk Tested-by: William Tu --- config/meson.build | 13 ++----------- lib/librte_eal/windows/meson.build | 10 ++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/config/meson.build b/config/meson.build index b2734fc0cf..d909d064c2 100644 --- a/config/meson.build +++ b/config/meson.build @@ -278,7 +278,8 @@ if is_freebsd endif if is_windows - # VirtualAlloc2() is available since Windows 10 / Server 2016. + # VirtualAlloc2() is available since Windows 10 / Server 2019. + # It's essential for EAL, so we don't support older versions. add_project_arguments('-D_WIN32_WINNT=0x0A00', language: 'c') # Use MinGW-w64 stdio, because DPDK assumes ANSI-compliant formatting. @@ -286,16 +287,6 @@ if is_windows add_project_arguments('-D__USE_MINGW_ANSI_STDIO', language: 'c') endif - add_project_link_arguments('-lws2_32', language: 'c') - - # Contrary to docs, VirtualAlloc2() is exported by mincore.lib - # in Windows SDK, while MinGW exports it by advapi32.a. - if is_ms_linker - add_project_link_arguments('-lmincore', language: 'c') - endif - - add_project_link_arguments('-ladvapi32', '-lsetupapi', language: 'c') - add_project_link_arguments('-ldbghelp', language: 'c') endif if get_option('b_lto') diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build index 3b2faf29eb..557e3c04a5 100644 --- a/lib/librte_eal/windows/meson.build +++ b/lib/librte_eal/windows/meson.build @@ -22,3 +22,13 @@ sources += files( ) dpdk_conf.set10('RTE_EAL_NUMA_AWARE_HUGEPAGES', true) + +ext_deps += [ + cc.find_library('dbghelp'), + cc.find_library('setupapi'), + cc.find_library('ws2_32'), +] +if is_ms_linker + # Contrary to docs, VirtualAlloc2() is exported by mincore.lib. + ext_deps += cc.find_library('mincore') +endif -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:04.034409827 +0800 +++ 0043-build-propagate-Windows-system-dependencies-to-pkg-c.patch 2021-11-10 14:17:01.797413358 +0800 @@ -1 +1 @@ -From 5ffa86a2b4167276212c7f666a8f96fa4f46d3b3 Mon Sep 17 00:00:00 2001 +From 91f3769c3fa08e7aaaa2098ebb80757f8aa2cf8f Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 5ffa86a2b4167276212c7f666a8f96fa4f46d3b3 ] @@ -21 +23,0 @@ -Cc: stable@dpdk.org @@ -27,3 +29,3 @@ - config/meson.build | 14 ++------------ - lib/eal/windows/meson.build | 10 ++++++++++ - 2 files changed, 12 insertions(+), 12 deletions(-) + config/meson.build | 13 ++----------- + lib/librte_eal/windows/meson.build | 10 ++++++++++ + 2 files changed, 12 insertions(+), 11 deletions(-) @@ -32 +34 @@ -index 3b5966ec2f..0b8359404b 100644 +index b2734fc0cf..d909d064c2 100644 @@ -35 +37 @@ -@@ -340,7 +340,8 @@ if is_freebsd +@@ -278,7 +278,8 @@ if is_freebsd @@ -39,4 +41,4 @@ -- # VirtualAlloc2() is available since Windows 10 / Server 2016. -+ # VirtualAlloc2() is available since Windows 10 / Server 2019. -+ # It's essential for EAL, so we don't support older versions. - add_project_arguments('-D_WIN32_WINNT=0x0A00', language: 'c') +- # VirtualAlloc2() is available since Windows 10 / Server 2016. ++ # VirtualAlloc2() is available since Windows 10 / Server 2019. ++ # It's essential for EAL, so we don't support older versions. + add_project_arguments('-D_WIN32_WINNT=0x0A00', language: 'c') @@ -44,7 +46,6 @@ - # Use MinGW-w64 stdio, because DPDK assumes ANSI-compliant formatting. -@@ -352,17 +353,6 @@ if is_windows - if cc.get_id() == 'clang' - add_project_arguments('-D_CRT_SECURE_NO_WARNINGS', language: 'c') - endif -- -- add_project_link_arguments('-lws2_32', language: 'c') + # Use MinGW-w64 stdio, because DPDK assumes ANSI-compliant formatting. +@@ -286,16 +287,6 @@ if is_windows + add_project_arguments('-D__USE_MINGW_ANSI_STDIO', language: 'c') + endif + +- add_project_link_arguments('-lws2_32', language: 'c') @@ -52,5 +53,5 @@ -- # Contrary to docs, VirtualAlloc2() is exported by mincore.lib -- # in Windows SDK, while MinGW exports it by advapi32.a. -- if is_ms_linker -- add_project_link_arguments('-lmincore', language: 'c') -- endif +- # Contrary to docs, VirtualAlloc2() is exported by mincore.lib +- # in Windows SDK, while MinGW exports it by advapi32.a. +- if is_ms_linker +- add_project_link_arguments('-lmincore', language: 'c') +- endif @@ -58,2 +59,2 @@ -- add_project_link_arguments('-ladvapi32', '-lsetupapi', language: 'c') -- add_project_link_arguments('-ldbghelp', language: 'c') +- add_project_link_arguments('-ladvapi32', '-lsetupapi', language: 'c') +- add_project_link_arguments('-ldbghelp', language: 'c') @@ -63,5 +64,5 @@ -diff --git a/lib/eal/windows/meson.build b/lib/eal/windows/meson.build -index fc12fefd0d..845e406ca1 100644 ---- a/lib/eal/windows/meson.build -+++ b/lib/eal/windows/meson.build -@@ -24,3 +24,13 @@ sources += files( +diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build +index 3b2faf29eb..557e3c04a5 100644 +--- a/lib/librte_eal/windows/meson.build ++++ b/lib/librte_eal/windows/meson.build +@@ -22,3 +22,13 @@ sources += files( @@ -73,3 +74,3 @@ -+ cc.find_library('dbghelp'), -+ cc.find_library('setupapi'), -+ cc.find_library('ws2_32'), ++ cc.find_library('dbghelp'), ++ cc.find_library('setupapi'), ++ cc.find_library('ws2_32'), @@ -78,2 +79,2 @@ -+ # Contrary to docs, VirtualAlloc2() is exported by mincore.lib. -+ ext_deps += cc.find_library('mincore') ++ # Contrary to docs, VirtualAlloc2() is exported by mincore.lib. ++ ext_deps += cc.find_library('mincore')