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 58F00A0579; Fri, 9 Apr 2021 11:24:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0F972407FF; Fri, 9 Apr 2021 11:24:25 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id DD8AF4014D for ; Fri, 9 Apr 2021 11:24:22 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 4ECE95C00C3; Fri, 9 Apr 2021 05:24:22 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 09 Apr 2021 05:24:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm3; bh= u9VbMZr1LII+HnurA5+5+h+gw/s2nEHB7wLbpVXTcQY=; b=PKZKSnkECSaYs0tf a8AkT9ozvGAcnMhPfpil25cqtiUBKMgSiA0MGikZJhORfIi5dM8DLdTh0h1Cfjzb CMnWMVnrE8G8zy2Xmi2HpeXlvsihOFNsVkvHTGAVpCOuOWmV5cC1SmJ9EJrXN4U3 /2YN4Fen7kE45wx1VvXHbF7/lUMz6IrLhXmhDxdG+RxEupEz0ARNxY5c4+udRPZA 62dpafuNrgwgGXNHH9RgWG/z6/KWdSqk6/VWCL/5p4xAdvMK7y+E8jg5mf2HQaAI h8dNlsxaT2I0prsh9do/gOAHeRLbAE/CyTUcDzkxkj5aZKgGO+ISaMe4waeHNhTr +W1G5Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=u9VbMZr1LII+HnurA5+5+h+gw/s2nEHB7wLbpVXTc QY=; b=a3QhW89Ucb2O/AMWZAw1xY+x5ImKXchJDbuhT5YGKUYYz7zzG10gz2X6S yYqR1rlUm4ET+ovStNZCX9wBxwwG9p0b69CDlgAU2ya2WuCypOJeLa2d2UjAo2Q2 1vHLaEDn1WyoDWF6d0tom6bLzEn0XEkexCYABCocNnBkluyixE53wVGgXfRlKa52 QJdSIgquNgOWJ43Rqmu9V/7zISxbbiMqCzGp+EhxRUxjaeAieP4s0zcYyPC0iMTB MElJLpVTNw2KZevz9OSrRHqiOQfqKIlmCthSEv6Y+phQ+suLuoNj0hs6P6SHODSu y2Ss0/GWrWZfQQ23t0wqF2AkgcmQg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudekuddgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 105BA240054; Fri, 9 Apr 2021 05:24:20 -0400 (EDT) From: Thomas Monjalon To: Gabriel Ganne Cc: Bruce Richardson , Thierry Herbelot , dev@dpdk.org, Olivier Matz , david.marchand@redhat.com Date: Fri, 09 Apr 2021 11:24:18 +0200 Message-ID: <2147114.uPvM74KM6J@thomas> In-Reply-To: References: <20210326082223.1398-1-gabriel.ganne@6wind.com> <13049033.jPmt81Ii10@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3] meson: remove unnecessary explicit link to libpcap 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 Sender: "dev" 09/04/2021 10:31, Gabriel Ganne: > Hi Thomas, > > Thanks for the review. > > The use case that made me see this is that I configured the dpdk using meson > option "-- default_library=static" in conjunction with buildroot which is > patching > meson to prefer static libraries in this case. > This causes the link line generated from the dependency() directive to > result > in an expanded "/path/to/libpcap.a". > The dpdk_extra_ldflags += '-lpcap' is a direct (manual) addition to the > link line > that cannot be changed in the same way. No it is only changing the generated pkg-config file. I think you are messing between what happens in DPDK build, and what your specific environment/application does. > In this specific setup, the change is the following: > Before: > -lpcap /path/to/libpcap.a > After: > /path/to/libpcap.a The real before/after is in the pkg-config file as I showed below. > I admit this is quite the corner case (and probably not a great idea). > > I will replace that confusing second paragraph with the comment you made > regarding " ext_deps += pcap_dep". You missed my other comments. I will propose a v5 with my explanations. PS: please avoid top-post. > On Fri, Apr 9, 2021 at 12:39 AM Thomas Monjalon wrote: > > Thank you, the fix looks good. > > I would like to improve the explanation. > > > > If I understand the issue, the title should be > > "build: remove redundant libpcap link" > > > > 26/03/2021 09:22, Gabriel Ganne: > > > libpcap is already found and registered as a dependency by meson, and > > > the dependency is already correctly used in librte_port. This line is > > > just unnecessary. > > > > To be precise, the pcap PMD and the librte_port both declare their > > dependency to libpcap with a line "ext_deps += pcap_dep" > > and meson automatically adds this dependency to the pkg-config file > > in the private section for static builds. > > That's why it is not needed to add the dependency explicitly > > in dpdk_extra_ldflags (involved in static build with pkg-config). > > > > > It also has the side effect of messing with the meson link line: dpdk > > > > Which "link line"? > > > > > link will be declared twice: manually and then through pkg-config. If > > > > What is "manually"? > > > > > you configure meson to prefer static linking over dynamic, this will > > > > No need to configure meson for that. Static linking can be tested with > > make in an example. Please avoid messing with meson explanation > > for application linking, it is already complicate enough :) > > > > > cause the build to fail on librte_port, since the pcap deps are not yet > > > seen by the linker. > > > > Sorry it is not clear to me. > > I think it would help to see a before/after effect on the link command. > > Something like: > > > > before: > > Libs.private: -lpcap > > Requires.private: libpcap > > after: > > Libs.private: > > Requires.private: libpcap > > > > [...] > > > - dpdk_extra_ldflags += '-lpcap'