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 94375A00C5; Tue, 15 Feb 2022 12:07:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3CEE5410F3; Tue, 15 Feb 2022 12:07:51 +0100 (CET) Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) by mails.dpdk.org (Postfix) with ESMTP id DCA3640E78 for ; Tue, 15 Feb 2022 12:07:49 +0100 (CET) Received: by mail-qt1-f171.google.com with SMTP id z1so18171818qto.3 for ; Tue, 15 Feb 2022 03:07:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/VkFr0Y4kfdzrkeFVWzzjO/A9E6U+iM0ixx954oznz4=; b=kQSahEI4KF6C8FVxJCpbEMa3AZZeOYFmbCFKQ1iUOFWLU1DJPmqs01QSA0589Kxrvb pIG6GNrdiC3ZPFDg1ihEBDbgd8BD9mMTbxv7tZCPxTORtW8KbqltB+GYVyGVw7UcKJC0 TKbLsOPRulV5jFZwzwoNh9JxtS3dixSdV9krqYpycJdQXRRNCVIeKNjHiTS7NXRK5lTh KfKvmsLElNoMhGEhnA1759/2PpYBDocZkNSnd/Hv5+gwW50PrMSLZF1dHNRMCVQu/185 X0sL/w0rf9tT7BJ44TPcyuCMCaHn/Xq1Q2vWdzmLt8ehwrgruxrhE2OCsJTacjPTF56L 8qkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/VkFr0Y4kfdzrkeFVWzzjO/A9E6U+iM0ixx954oznz4=; b=u4R3s2NhnH3myDjOJAjQJ3KbdqVpa3ShoB/V9AXV3A6QkBKbUWJaPLk/bEiCtkNpys qoCjUozift+tCgSbNtUth4qiFdR4ICy8zR5UyvLNL8eyGxx57ZcPNBxRU/nyB9e+fkHn pY4GIhaakGVUMC9j4QNUVMHCQPGJDxSHdw81sLFacAsEot2Rq+v7CH5ziHHkgUnpTK/c 6upF2lJ33NNjrFtMaWXAy1mypfM1Hjqcjx7WeDjtk5smpU60nP0eWoyBcYMh2RO0GNKn IqEVeM58YF9GJgTGTb2GfrRhhriy12tuqYjN4bfuODXQ/XEwYkllWlto7PvhV4r/0bcX wk8Q== X-Gm-Message-State: AOAM533CY4Q+MafmnraW+egNIhK57GPPD2qhLZPXuqYHwe7/J1VcWsbd VOXo81SWRZy01E4SIH+xd6yoYEfyBL5YLLBrFcc= X-Google-Smtp-Source: ABdhPJxOE3ubuW4GEqolRBRwGlduogOw7cQhvjyt7P2PqlzxqT/AkscxlW8RbNcU9vkPwcufXoQUozkrsXC51WGS2ZQ= X-Received: by 2002:ac8:5bd0:: with SMTP id b16mr2139219qtb.547.1644923269252; Tue, 15 Feb 2022 03:07:49 -0800 (PST) MIME-Version: 1.0 References: <20220214114313.21258-1-k.torp@samsung.com> In-Reply-To: From: Karl Bonde Torp Date: Tue, 15 Feb 2022 12:07:55 +0100 Message-ID: Subject: Re: [PATCH] build: fix build on FreeBSD with Meson 0.61.1 To: Bruce Richardson Cc: dev@dpdk.org, Karl Bonde Torp Content-Type: text/plain; charset="UTF-8" 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 On Mon, 14 Feb 2022 at 14:48, Bruce Richardson wrote: > > 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 > > --- > > Can you perhaps provide some instructions or more details as to > how/when you see this issue? Some background info: I'm working on xNVMe and that depends on SPDK which in turn depends on DPDK. These are includes as subprojects on github which is why the FreeBSD port of DPDK is not an option for me. The steps I took to reproduce the issue are listed below, this assumes a clean img of FreeBSD 13: (I know some of them may be obvious, but I tried to avoid ambiguity) * install git and the pkg manager: pkg install git * get kernel source: git clone https://git.freebsd.org/src.git /usr/src * get ports: git clone https://git.freebsd.org/ports.git /usr/ports * install dependencies (except meson) with pkg: pkg install py38-pyelftools ninja pkgconf binutils * build meson 0.61.1 from port: cd /usr/ports/devel/meson/ && make install clean * clone dpdk repo: git clone https://github.com/DPDK/dpdk.git * inside dpdk folder run: meson builddir && meson compile -C builddir * encounter error: [466/1915] Generating drivers/rte_common_cpt.pmd.c with a custom command FAILED: drivers/rte_common_cpt.pmd.c /usr/local/bin/python3.8 ../buildtools/gen-pmdinfo-cfile.py /root/dpdk/builddir/buildtools ar /root/dpdk/builddir/drivers/libtmp_rte_common_cpt.a drivers/rte_common_cpt.pmd.c /usr/local/bin/python3.8 ../buildtools/pmdinfogen.py elf ar: fatal: Unrecognized archive format: Inappropriate file type or format Traceback (most recent call last): File "../buildtools/gen-pmdinfo-cfile.py", line 13, in for name in subprocess.run([ar, "t", archive], stdout=subprocess.PIPE, File "/usr/local/lib/python3.8/subprocess.py", line 516, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['ar', 't', '/root/dpdk/builddir/drivers/libtmp_rte_common_cpt.a']' returned non-zero exit status 70. > A clean build of mine on FreeBSD with meson 0.61.1 didn't seem to > flag up any problems and I'd like to reproduce the issue to verify the fix. I'm guessing you're refering to the port of DPDK here. If not I am very interested to hear how you go about this. > > 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' > > -- > > 2.35.1 > >