DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Ivan Serdyuk <local.tourist.kiev@gmail.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] Building without AVX2 support, with Clang 11, on Ubuntu 20.04.1
Date: Tue, 20 Oct 2020 16:59:34 +0100	[thread overview]
Message-ID: <20201020155934.GL558@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <CANFCsz8iPLgsWvunhJxq3q5+JjbRqgkxq06vwXeBOf=vayBbaA@mail.gmail.com>

On Tue, Oct 20, 2020 at 06:49:10PM +0300, Ivan Serdyuk wrote:
>    It was compiled - but I can't make it run:
> 
>      ~/dpdk-20.08/build-clang/app$ ./dpdk-pdump
>      Illegal instruction (core dumped)
>      ~/dpdk-20.08/build-clang/app$ ./dpdk-proc-info
>      Illegal instruction (core dumped)
>      ~/dpdk-20.08/build-clang/app$ ./dpdk-test-acl
>      Illegal instruction (core dumped)
>      ~/dpdk-20.08/build-clang/app$ ./dpdk-test-bbdev
>      Illegal instruction (core dumped)
>      ~/dpdk-20.08/build-clang/app$ ./dpdk-test-cmdline
>      Illegal instruction (core dumped)
>      ~/dpdk-20.08/build-clang/app$ ./dpdk-test-compress-perf
>      Illegal instruction (core dumped)
>      ~/dpdk-20.08/build-clang/app$ ./dpdk-test-crypto-perf
>      Illegal instruction (core dumped)
>      ~/dpdk-20.08/build-clang/app$ ./dpdk-test-eventdev
>      Illegal instruction (core dumped)
>      ~/dpdk-20.08/build-clang/app$ ./dpdk-test-fib
>      Illegal instruction (core dumped)
>      ~/dpdk-20.08/build-clang/app$ ./dpdk-test-flow-perf
>      Illegal instruction (core dumped)
>      ~/dpdk-20.08/build-clang/app$ ./dpdk-test-pipeline
>      Illegal instruction (core dumped)
>      ~/dpdk-20.08/build-clang/app$ ./dpdk-test-regex
>      Illegal instruction (core dumped)
>      ~/dpdk-20.08/build-clang/app$ ./dpdk-test-sad
>      Illegal instruction (core dumped)
>      ~/dpdk-20.08/build-clang/app$ ./dpdk-testpmd
>      Illegal instruction (core dumped)
> 
>    Ivan
> 
>    On Tue, Oct 20, 2020 at 5:44 PM Ivan Serdyuk
>    <[1]local.tourist.kiev@gmail.com> wrote:
> 
>    On Mon, Oct 19, 2020 at 4:34 PM Bruce Richardson
>    <[2]bruce.richardson@intel.com> wrote:
> 
>      On Mon, Oct 19, 2020 at 04:17:36PM +0300, Ivan Serdyuk wrote:
>      Hi Ivan
> 
> 
>    Hello, Bruce.
> 
>      Why are you exporting these CPP and CXX flags? The CXX flags will
>      have no
>      effect on the DPDK build as it does not use c++ code.
> 
>    Probably my mistake.
> 
>      > and got such issues:
>      >
>      >
>      > > [213/2379] Compiling C object 'lib/76b5a35@@rte_bitratestats@sta
>      > > /librte_bitratestats_rte_bitrate.c.o'.
>      > > clang-11: warning: argument unused during compilation:
>      '-stdlib=libc++'
>      > > [-Wunused-command-line-argument]
>      > > [219/2379] Compiling C object 'lib/76b5a35@@rte_cfgfile@sta
>      > > /librte_cfgfile_rte_cfgfile.c.o'.
>      > > clang-11: warning: argument unused during compilation:
>      '-stdlib=libc++'
>      > > [-Wunused-command-line-argument]
>      > > [222/2379] Linking target lib/librte_acl.so.20.0.3.
>      > > FAILED: lib/librte_acl.so.20.0.3
>      > > clang  -o lib/librte_acl.so.20.0.3
>      'lib/76b5a35@@rte_acl@sta/librte_acl_acl_bld.c.o'
>      > > 'lib/76b5a35@@rte_acl@sta/librte_acl_acl_gen.c.o' 'lib/76b5a35@
>      > > @rte_acl@sta/librte_acl_acl_run_scalar.c.o'
>      'lib/76b5a35@@rte_acl@sta/librte_acl_rte_acl.c.o'
>      > > 'lib/76b5a35@@rte_acl@sta/librte_acl_tb_mem.c.o'
>      'lib/76b5a35@@rte_acl@sta/librte_acl_acl_run_sse.c.o'
>      > > -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC
>      -Wl,--start-group
>      > > -Wl,-soname,librte_acl.so.20.0 -Wl,--no-as-needed -pthread -lm
>      -ldl
>      > > lib/librte_eal.so.20.0.3 lib/librte_kvargs.so.20.0.3
>      > > lib/librte_telemetry.so.20.0.3 -Wl,--end-group
>      > >
>      -Wl,--version-script=/home/oceanfish81/dpdk-20.08/lib/librte_acl/rte
>      _acl_version.map
>      > > '-Wl,-rpath,$ORIGIN/'
>      > > -Wl,-rpath-link,/home/oceanfish81/dpdk-20.08/build-clang/lib
>      > > /usr/bin/ld:
>      lib/76b5a35@@rte_acl@sta/librte_acl_rte_acl.c.o:(.[3]data.rel.ro+0x1
>      8):
>      > > undefined reference to `rte_acl_classify_avx2'
>      > > clang-11: error: linker command failed with exit code 1 (use -v
>      to see
>      > > invocation)
>      > > [225/2379] Generating bbdev.sym_chk with a meson_exe.py custom
>      command.
>      > > ninja: build stopped: subcommand failed.
>      >
>      >
>      > I am using
>      >
>      > > $ clang --version
>      > > clang version 11.0.0
>      ([4]https://github.com/llvm/llvm-project.git
>      > > 0160ad802e899c2922bc9b29564080c22eb0908c)
>      > > Target: x86_64-unknown-linux-gnu
>      >
>      >
>      > I am working under Virtualbox, currently. My host CPU doesn't have
>      any AVX
>      > support - and there is no guest emulation support for them. Could
>      I bypass
>      > this somehow, while building librte, as a dependency?
>      >
>      I'm not sure exactly what the problem is here, because DPDK should
>      build
>      fine on any system that has SSE4.2 support - no AVX2 support is
>      required.
>      To test, I've done a build of DPDK on an old Core i7 machine with
>      AVX, but
>      not AVX2, and it built fine with clang 8 (this was using FreeBSD
>      12),
>      including the ACL library.
> 
>    Here is what I have here:
> 
>      $ cat /proc/cpuinfo
>      processor : 0
>      vendor_id : GenuineIntel
>      cpu family : 6
>      model : 23
>      model name : Intel(R) Core(TM)2 Quad CPU    Q9400  @ 2.66GHz
>      stepping : 10
>      microcode : 0x60b
>      cpu MHz : 2666.620
>      cache size : 3072 KB
>      physical id : 0
>      siblings : 2
>      core id : 0
>      cpu cores : 2
>      apicid : 0
>      initial apicid : 0
>      fpu : yes
>      fpu_exception : yes
>      cpuid level : 13
>      wp : yes
>      flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
>      cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm
>      constant_tsc rep_good nopl cpuid tsc_known_freq pni ssse3 sse4_1
>      x2apic hypervisor lahf_lm pti

This processor is missing SSE4.2 and so can't run DPDK, since SSE 4.2 is
part of the minimum requirements. [Core 2 Quad is, what, 12 years old now?]

/Bruce

      reply	other threads:[~2020-10-20 15:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-19 13:17 Ivan Serdyuk
2020-10-19 13:34 ` Bruce Richardson
2020-10-20 14:44   ` Ivan Serdyuk
2020-10-20 15:49     ` Ivan Serdyuk
2020-10-20 15:59       ` Bruce Richardson [this message]

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=20201020155934.GL558@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=local.tourist.kiev@gmail.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).