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 F11FCA00C2; Tue, 8 Mar 2022 15:39:42 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 79FC24068E; Tue, 8 Mar 2022 15:39:42 +0100 (CET) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by mails.dpdk.org (Postfix) with ESMTP id 74F584068B for ; Tue, 8 Mar 2022 15:39:40 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 3E99B3200911; Tue, 8 Mar 2022 09:39:39 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 08 Mar 2022 09:39:39 -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; bh=B9TNO6CPVVxBvp Q/mtd1qyWFb6/sgN5YdZEHYxwqeIE=; b=rnIohcJqM10r4B1jxVoUtVVp8ya62W S1xrX1hBlD/drfFTAlr+E5gD/YvpZWyux7XG8Ybuhsghu/iCUa7UmEgvbyt9N7CH u6JUI21jR3f1Zc7R+FYeZ19y744XJmsbdC5yCaqKTyweiLqQGUeon5lwqrPw1N2t gAzmwfEgpvN2uaHyEVgxyNcpKXpU7ALvCh+xGf4wAG+iAjPMNRe1FTpK4ZkCmp0U pa6kfXEUueOuE+/wYOL706qf9y27KT4jIn7VOnv+4dOfYHaucFsnTUwLARFpvMPR 1gQmfE66bBincScrKaV+VcLiuCL9cuvdJO0vHpdQxwdjY2jWJt1DcJnA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; 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:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=B9TNO6CPVVxBvpQ/mtd1qyWFb6/sgN5YdZEHYxwqe IE=; b=E0DXEd+BmCUdZR3D8MnZmi++1vEB3Ih/iBeKOp0OjqltWs+Fgb9k245In AqC0cWd3WKbULC/LgO6CwCGiRs4XqC2m2rggRc0vrv9s6+o9ISyuoRZGxKm6W8DT JdlD4YdRTqJ47QS9DzkKCSbxIeP2Bbp6TTH6BtRMrzWQ3ZPpmP7e5IEKOXpNF/jg s5WeNNk4WrCuMcgAjQy8XU7B3Bzb2QCaVQCNgbJPQyWM2CLdBpc6FDS5DsujT9BX aAsSEAUW0MECGn0yR5s1B6Sex4tF2uUyHtgTypTzHIkNDhHz777euWmNqb8Rb8oF nf0bsiu74oQu8UzLciZ0O9fup2vSA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudduiedgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 8 Mar 2022 09:39:37 -0500 (EST) From: Thomas Monjalon To: Karl Bonde Torp , Karl Bonde Torp Cc: dev@dpdk.org, Bruce Richardson Subject: Re: [PATCH] build: fix build on FreeBSD with Meson 0.61.1 Date: Tue, 08 Mar 2022 15:39:36 +0100 Message-ID: <12525368.zapYfy813O@thomas> In-Reply-To: References: <20220214114313.21258-1-k.torp@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 15/02/2022 16:31, Bruce Richardson: > On Mon, Feb 14, 2022 at 12:43:13PM +0100, Karl Bonde Torp wrote: > > When building with Meson 0.61.1 on FreeBSD some archives become > > corrupted. This can be avoided by using 'llvm-ar' instead of 'ar'. > > > > Signed-off-by: Karl Bonde Torp > > --- > > buildtools/meson.build | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/buildtools/meson.build b/buildtools/meson.build > > index 400b88f251..e1c600e40f 100644 > > --- a/buildtools/meson.build > > +++ b/buildtools/meson.build > > @@ -31,6 +31,9 @@ if host_machine.system() == 'windows' > > pmdinfo += 'llvm-ar' > > endif > > pmdinfogen += 'coff' > > +elif host_machine.system() == 'freebsd' > > + pmdinfo += 'llvm-ar' > > + pmdinfogen += 'elf' > > else > > pmdinfo += 'ar' > > pmdinfogen += 'elf' > > Based off the instructions you posted later in the thread, I've reproduced > the issue - and then done a little extra investigation. Here is my > understanding: > > * By default on FreeBSD the linking is being done by llvm-ar > * The resulting libraries are being linked as thin archives and "ar" binary > does not seem to be able to process them. > * When building with CC=gcc on FreeBSD, "ar" is used as a linker, and the > resulting archives are regular .a files. > * On Linux, whether building with clang or gcc, "ar" seems to be used as > linker. > > The ideal situation here would be if we could use meson to report itself > what the static linker in use is, but unfortunately while we can query the > dynamic linker using "meson.compiler().get_linker_id()", there doesn't seem > to be an equivalent for the static linker. Therefore, the only option seems > to be a fix as here. Only question remains as to whether we want to only > use llvm-ar for clang builds on FreeBSD or use if for all builds on FreeBSD. > I'm not sure it makes much difference either way, but I'd tend towards > limiting the use of llvm-ar to only clang builds. > > With or without this suggested change, > > Acked-by: Bruce Richardson Applied, thanks.