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 864A3A00C5; Tue, 15 Feb 2022 14:50:45 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1FC984113E; Tue, 15 Feb 2022 14:50:45 +0100 (CET) Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) by mails.dpdk.org (Postfix) with ESMTP id D6F1E410F7 for ; Tue, 15 Feb 2022 14:50:43 +0100 (CET) Received: by mail-qv1-f52.google.com with SMTP id e22so2932708qvf.9 for ; Tue, 15 Feb 2022 05:50:43 -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=yOrx1NPoglMmsBWDgI+b07HlhhwwoqY9xBAAit5TBHA=; b=i3+4nFT1bBwWp5tUBcLETw5RjC33EqT56AbakIz6xqasGq9oXPiXO2EpEl5cJPQOEf +CKUsnJmlQfS2vh6T4LheHRLNyZWNKjSYZXkAWv6y1lgeQe/DvfEVhcAN+w+6npwGVJk xJY1mQtdKGWpGEqaHLUU3BvFWQiaAmLkTtseaAAmnQTa1hWWLyjHhmFz3qyeoJcdmn8v Lo/eJRZ/0lpnCtqCYdX01JT7LKCnYzcelHEyuCxHxySaipaL53ZenHt2ASBiFT94DMUN VTUkKTKfhMwuu5Dext4wI24v0xeh7BlFAlGgen34qrEaS7D5wosvPYrTbwPfK4d/taQy 1vwQ== 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=yOrx1NPoglMmsBWDgI+b07HlhhwwoqY9xBAAit5TBHA=; b=IE3CQ6j/aj2epw7Vr/ZA20rRWhVD9rgsFoOwSuYOVORWwp0QMEB6tp347jHTnIlU+W vZdPNN+jkml1lmG4RD/yz7trkX4IGnka5osMfnbQ+kIiPtfJKY78ALunubL8Uf643zu8 6j0NwchuPu0dBUaY1mGXUGG95QxJu4LTjR4S2T/TgUdBi78W6FkTjMZmnpCsnx/OGAmk Yd2QemiUTTmaaz3apMMFuqVoBfcbs/Q45a71FXS5vCNGNtTqIOinXpQmYpInPa7hAdtP N261ECmWqM0pD72GE6eRjKSBBeE6Lqug+VQjnRabSk7TbtxdbwVsV42Q+plqsBurJZou sK3w== X-Gm-Message-State: AOAM533GXabbHhgm1awfc0WVpMvGbp8MvVGWP/dtpMMup3h1pM7w2Tdc o0CZJYxL/nWONvrnub7H+9b04ifCHNPIt1LUCHK7bAZY8qU= X-Google-Smtp-Source: ABdhPJxVkm1Lv3reTrEqsj7QweyeTW7Zop6QGw7ExjNgfaSZY1Pv1uU+6bFsoyRbU57r4wtZeBVft09fv8nB2+LDLPc= X-Received: by 2002:a05:6214:508c:: with SMTP id kk12mr2741375qvb.46.1644933043097; Tue, 15 Feb 2022 05:50:43 -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 14:50:48 +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 Tue, 15 Feb 2022 at 12:27, Bruce Richardson wrote: > > On Tue, Feb 15, 2022 at 12:07:55PM +0100, Karl Bonde Torp wrote: > > 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. > > > > I tested with latest DPDK on a FreeBSD machine also, not using the BSD > ports version. Unfortunately it wasn't a clean install, but still a fairly > new one. I updated the BSD pkg config to use "latest" rather than > "quarterly" snapshot and then ran an "pkg upgrade". This gave me meson > 0.61.1, and updated other packages too. Build of DPDK then ran cleanly. > > I wonder if the version of binutils or some other package might be the > difference. The version I have is "GNU ar (GNU Binutils) 2.37". What > version of binutils is installed on your system? My version of binutils is 2.37_2,1, so that is the same. However, I think you're onto something here. When I run "ar --version" I get "BSD ar 1.1.0 - libarchive 3.5.1". The problem my patch aimed to solve was 'BSD ar' behaving differently than 'GNU ar'. So if you somehow got the 'ar' command to invoke 'GNU ar' on your system, maybe I just need to do the same. > I'll create a new vm image of BSD 13 and try and reproduce using your > instructions above. > > /Bruce