DPDK patches and discussions
 help / color / mirror / Atom feed
From: Karl Bonde Torp <karlowich@gmail.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org, Karl Bonde Torp <k.torp@samsung.com>
Subject: Re: [PATCH] build: fix build on FreeBSD with Meson 0.61.1
Date: Tue, 15 Feb 2022 12:07:55 +0100	[thread overview]
Message-ID: <CAJ5eYd7TEvRLL4TWHa4F=fsGiYrrd0DCXDYTvAqSDf7UqcaNcA@mail.gmail.com> (raw)
In-Reply-To: <Ygpdp2rgIsoOyCyN@bricha3-MOBL.ger.corp.intel.com>

On Mon, 14 Feb 2022 at 14:48, Bruce Richardson
<bruce.richardson@intel.com> 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 <k.torp@samsung.com>
> > ---
>
> 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 <module>
    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
> >

  reply	other threads:[~2022-02-15 11:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14 11:43 Karl Bonde Torp
2022-02-14 13:48 ` Bruce Richardson
2022-02-15 11:07   ` Karl Bonde Torp [this message]
2022-02-15 11:27     ` Bruce Richardson
2022-02-15 13:50       ` Karl Bonde Torp
2022-02-15 15:34         ` Bruce Richardson
2022-03-07 16:43           ` Thomas Monjalon
2022-03-07 16:52             ` Bruce Richardson
2022-02-15 15:31 ` Bruce Richardson
2022-03-08 14:39   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ5eYd7TEvRLL4TWHa4F=fsGiYrrd0DCXDYTvAqSDf7UqcaNcA@mail.gmail.com' \
    --to=karlowich@gmail.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=k.torp@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).