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 2F092A00C5; Tue, 15 Feb 2022 12:28:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC2CC410F3; Tue, 15 Feb 2022 12:28:00 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 3F1BF40E78 for ; Tue, 15 Feb 2022 12:27:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644924479; x=1676460479; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=2rVk5Eupyz4EFZCKNU1Cci191kc3H2zLVIbh1I+fdMY=; b=JQKIqLVaU4Xta2z4ujomg1jCnOLByMOkGohYuHpRrpAr4wSAkxHATJUL S8qgp0S425HIjIBIiLp/dC1k6jFJ3tnV/Yh465bvJS5YnCvMcylQ/V1O8 CoS/bEpdhYjGWCoXLCPfIrJXKAQNDs84FC1GL60fSxNvMD+m7vj1bzdaX 4cnSPwOdDnVAh+fbupT9xdvKsF/NSuV1peKvxtm9SDBlwvhp7irQe9m6m UCMnHVwZpJF4dfQH7aYmAjksw506zjVYLLGfpf4TSf6y0FjDNs6TDbRKm Lemhwz9YUvSXaUQT4AY8G8lT8cXV5xfklLVFQ/hEjIgfwkGDVgCXmDKxu w==; X-IronPort-AV: E=McAfee;i="6200,9189,10258"; a="249165757" X-IronPort-AV: E=Sophos;i="5.88,370,1635231600"; d="scan'208";a="249165757" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2022 03:27:54 -0800 X-IronPort-AV: E=Sophos;i="5.88,370,1635231600"; d="scan'208";a="528800747" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.14.135]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 15 Feb 2022 03:27:53 -0800 Date: Tue, 15 Feb 2022 11:27:49 +0000 From: Bruce Richardson To: Karl Bonde Torp Cc: dev@dpdk.org, Karl Bonde Torp Subject: Re: [PATCH] build: fix build on FreeBSD with Meson 0.61.1 Message-ID: References: <20220214114313.21258-1-k.torp@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, 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? I'll create a new vm image of BSD 13 and try and reproduce using your instructions above. /Bruce