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 1886245606; Fri, 12 Jul 2024 04:29:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 08895402AE; Fri, 12 Jul 2024 04:29:37 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by mails.dpdk.org (Postfix) with ESMTP id E6EF040289 for ; Fri, 12 Jul 2024 04:29:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720751376; x=1752287376; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=CLYBvECzR9oQajnvWuz7yD9HR+zUwPJlwrI+kXFXJE0=; b=IueFwMaBMXgta6q1qlyTgRPuJuqqzr+vL/tjGNweSrCfBa9xsnQzC7oL 7vuYZvoRfVJZMoC78/JZqbeinzXkZkeTFzNRCAkkAXRWki+XLzNND3zF8 K15za0VqcdOP7/aOQNvogonu2iUoSPKHC5iNPoWC5+LNbC1CbZKT7dXFO 8O6xYNDr3QPFgXXQh1lkbpbxIWUmC6ZT+RRaSVJwtX8wXj/2Vs5XpgabY vwTvK7xg9WoAOj+8NtUcQtHAAHiSfsDyWRVmftyqcqLISxYiis9cAFrzs NFJLqaP6IImlXDaykI20ag/yODHoZFyukf6nZeJEsXbnYix0Zhws9zhtO A==; X-CSE-ConnectionGUID: rcxspINOTrGI6piiXa9oyg== X-CSE-MsgGUID: td+kQ+NCRu66Fin36G3Y8Q== X-IronPort-AV: E=McAfee;i="6700,10204,11130"; a="18328624" X-IronPort-AV: E=Sophos;i="6.09,202,1716274800"; d="scan'208";a="18328624" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2024 19:29:35 -0700 X-CSE-ConnectionGUID: 0qFXAt+UTp+vlfqVK9vT5w== X-CSE-MsgGUID: CJyS41K5TF64YjtBpVLJaA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,202,1716274800"; d="scan'208";a="53069298" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 11 Jul 2024 19:29:34 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 11 Jul 2024 19:29:33 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 11 Jul 2024 19:29:33 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 11 Jul 2024 19:29:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bH3jlhZNPRHEbrFkZ7EjLPFeAS3uzerEuT0Y4C37Uqe7/rfGQOmawZTi41kNbODdntWVqmue0IzGoIxYKaZXIUE0C3C9W1w9f6l2Fb7jfe2dyHfKUn9KRK3WJ2vUjk3zQ6SBsL5CSRG5ttz0N7nPr9tcG0Dz8Ti9cB4zHZc9aEnEPlCEqFRbC8Cjhhy047fp5x6qZuCbyXHSMOL7crK/iRAuhhrY5zSzVRn8pojpcypWLqa1rT6QxtTEtDlAiTD80PQcA6iN8hJQsjT86QFRSjmIG26HCjPYKVxJCNRKlce3enPPzGB+miA6+JYN7V8gwZ/Ui3zP1D83Il9UnUAEYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=BWbBO+FCBMu/0ECsvxRhEIP55/s7O/bL1ArWjnIlgCM=; b=M058phPbDzXHIt7ygaphG/vjRIp26JTlac4hUG7ysg4S8RdrN4COlBRjGTbrma1/2WvrRdXkukAsTIu/9RrEUQw6sQun6oQXvULGMwCQcZbNdJvnIT9Q2zvGZcVxefklgeDTTM1YcmiYhbFEl9wqrcQjQGUvJwNkaroBDAKniPtHA/I6lmwvIgB59QqWsnycv+8nWNX3rUZ+80uWMSsPKSxAkRQB0m/aolszCo2UJZu74BggMciF3B4k/f+7ExmXPdmlExMxznzzvMZJGJAMJE7MbU8+oq5r0WPrYHMcFDJbBl4ccSv//5BX1q3gUBXkZZOU0kXFa0KV+c3pRKtQpw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from CH0PR11MB5740.namprd11.prod.outlook.com (2603:10b6:610:101::7) by PH7PR11MB7451.namprd11.prod.outlook.com (2603:10b6:510:27b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.35; Fri, 12 Jul 2024 02:29:31 +0000 Received: from CH0PR11MB5740.namprd11.prod.outlook.com ([fe80::1ec3:bdb4:3611:b959]) by CH0PR11MB5740.namprd11.prod.outlook.com ([fe80::1ec3:bdb4:3611:b959%4]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 02:29:31 +0000 From: "Jiale, SongX" To: "Marchand, David" , "dev@dpdk.org" Subject: RE: [PATCH] buildtools: fix build with clang 17 and ASan Thread-Topic: [PATCH] buildtools: fix build with clang 17 and ASan Thread-Index: AQHa04b43xh5O5RMdUGh6NkJnOoRPrHyXn9w Date: Fri, 12 Jul 2024 02:29:31 +0000 Message-ID: References: <20240711113851.975368-1-david.marchand@redhat.com> In-Reply-To: <20240711113851.975368-1-david.marchand@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CH0PR11MB5740:EE_|PH7PR11MB7451:EE_ x-ms-office365-filtering-correlation-id: 076e79e1-4e4b-4112-3afe-08dca21a7609 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|366016|376014|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?2rDX5GwCw7Iv8IQ7mpjh8tohEHmoIQqkuPHyMToGn8ct8x7rBL66ti5Ax5OA?= =?us-ascii?Q?sqyF8jS/phGrGX1yJbv719YyAhUgMsFb+ih5uFEGi+tJ1KGYmJb0ru7RM6HU?= =?us-ascii?Q?X/fZgT7yKxRtOM8e+tq5x/B6lVKK4hB+RlRe1MPyPptJwHaR5kthry5swqpp?= =?us-ascii?Q?NOiXSTpsH2QT3k68WeSBaT7bWRQOUYHWwASGOX2/cp250q8NG1/dPwBlGZ4X?= =?us-ascii?Q?FpZEg/QNFGEF9spiuV+4r+bmZOqX4EJYJ5QHu6ZrIcDbcS0oothPjEWJCa8r?= =?us-ascii?Q?ivsyMvkNiPGz2r7Avv/sn6QXSwto5XGZkdh5IJxOQRq+11z8BkmuAjUZv8/X?= =?us-ascii?Q?Swo6icHeo5RrvXRmm3H+4O9FRbJazL9TxPWGnSJMG8LAI8YqgfkztenMyyBp?= =?us-asc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NekAso8MHKEM/tw4a8Qmb6ZUIXbve632pu?= =?us-ascii?Q?8ucIsmTbmhkSDtOW84W0gGb7RhCTPBbaQYWKYMRzmvZInOh3XeFt3OrWKaOI?= =?us-ascii?Q?9xwiuAKW2I/FVuRsUCptS7QlIEIFfWX2M+vcNlenDFDao/I82g=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH0PR11MB5740.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?YPwY/KSvVhE8BdJm4zxqvCuHrlY/fhllV7KmDk/GXpfNANxkIzapONyRiJks?= =?us-ascii?Q?nRmurBlW1fgqgrfC5VcpKh++1HRQydVXGA3jW5zwGsyXbukIsH3kvPTmOeUf?= =?us-ascii?Q?/ECboGjklqKthcsonG4jzVbFX75Pg+shoKbhYv73J8v6vUzlaYg6DroPASwh?= =?us-ascii?Q?nW11NyjAJuSxIgOQNKMTo+x5UrAV3ok/uMIwPHboUenYDQxM/aE/Wpn6KT7P?= =?us-ascii?Q?0pvKSmIUkyfgggWNs5b0cA4igXKr79kmCc5bV5SAiXRlUdFcsDPDxYbrWoZ+?= =?us-ascii?Q?ucD1erzNpQnXQNV6lzsTg5t5jAlbW+GjiGMmUYeyC6DV49on/wtaXqy/tJiR?= =?us-ascii?Q?MJt9Y4b4VYHVy9/MVJVQEUnayawXlxNJ7asJKmnr7A/SqcuVGR8p3x0rtP79?= =?us-ascii?Q?LL21j9Ta6Fgo6byOTVsBEMjO/1YHPjxSbF4KT3cUkkaGEv36mXxdqp1gZqJ7?= =?us-ascii?Q?5LtvmKZyM4+ENsBybAVwAZlCWQBhK4gWZqzmzIgc1Lg2hAqkvVGozz+owxli?= =?us-ascii?Q?p4caAt8BIUYU8YPiDBMJH9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ii?Q?MK6z1rdV8TZwo+R7sCyGR2EyZIXZzs4EDZ8MTKKiJQi1aVZ+LF4saSCD6vut?= =?us-ascii?Q?Jl1MbAGYNpQ9IhaDxltGAIbUntTUhSuUplNbzMjwBY8SO5Xv5uE2mF9lTUol?= =?us-ascii?Q?bF/7Cx7ZXmqiBurYyyov/e9ylaaSVDAqIpQT5GOt?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH0PR11MB5740.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 076e79e1-4e4b-4112-3afe-08dca21a7609 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jul 2024 02:29:31.2483 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: zFO5vT0hcLfgDPP9eI/CFBvKYvKR0QwbYzm3ucBeE9+u97rZGGkZGIEOxHssLCrJevKyjoIYTCmkCWuR+CB29w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB7451 X-OriginatorOrg: intel.com 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 > -----Original Message----- > From: David Marchand > Sent: Thursday, July 11, 2024 7:39 PM > To: dev@dpdk.org > Cc: stable@dpdk.org; Ali Alnubani ; Jiale, SongX > ; Dmitry Kozlyuk > Subject: [PATCH] buildtools: fix build with clang 17 and ASan >=20 > ASan included in clang 17 and later suffixes symbols. > $ nm build/drivers/libtmp_rte_net_null.a | grep this_pmd > 0000000000000000 r this_pmd_name3 > 0000000000000000 n > this_pmd_name3.f2cd16678ab09dba8fd23405d8d11fce >=20 > This breaks the detection of driver symbols in pmdinfogen which then crea= tes > duplicate symbols "_pmd_info" in many drivers. Such duplicate symbols > trigger a link error. >=20 > $ grep -w _pmd_info build/drivers/rte_net_*.pmd.c > build/drivers/rte_net_af_packet.pmd.c:const char _pmd_info[] > __attribute__((used)) =3D > "PMD_INFO_STRING=3D {\"name\": \"\", \"pci_ids\": []}"; > build/drivers/rte_net_null.pmd.c:const char _pmd_info[] > __attribute__((used)) =3D > "PMD_INFO_STRING=3D {\"name\": \"\", \"pci_ids\": []}"; >=20 > A simple reproducer: > $ CC=3Dclang meson setup build -Denable_apps=3Dtest-pmd -Ddisable_libs=3D= * \ > -Denable_drivers=3Dnet/null,net/af_packet -Dtests=3Dfalse \ > -Db_lundef=3Dfalse -Db_sanitize=3Daddress >=20 > $ ninja -C build >=20 > Before this patch, the pmdinfogen script was relying on a symbol name > starting with this_pmd_name. > On the other hand, what this script needs is symbols whose names are > this_pmd_name ## __COUNTER__, see below an example for PCI driver > symbols (the same applies to other buses). >=20 > $ git grep -w RTE_PMD_EXPORT_NAME drivers/bus/pci/bus_pci_driver.h > drivers/bus/pci/bus_pci_driver.h:RTE_PMD_EXPORT_NAME(nm, > __COUNTER__) $ git grep -B1 this_pmd_name lib/eal/ > lib/eal/include/rte_dev.h-#define RTE_PMD_EXPORT_NAME(name, idx) \ > lib/eal/include/rte_dev.h:static const char > RTE_PMD_EXPORT_NAME_ARRAY(this_pmd_name, idx) \ $ git grep > define.RTE_PMD_EXPORT_NAME_ARRAY lib/eal/include/rte_dev.h > lib/eal/include/rte_dev.h:#define > RTE_PMD_EXPORT_NAME_ARRAY(n, idx) n##idx[] >=20 > Adjust the symbol filter for both ELF and COFF implementations. >=20 > Bugzilla ID: 1466 > Cc: stable@dpdk.org >=20 > Reported-by: Ali Alnubani > Reported-by: Song Jiale > Signed-off-by: David Marchand > --- Tested-by: Jiale Song Can confirm it fixes the build failure in my environment. Thanks.