From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EAE39A04DC; Tue, 20 Oct 2020 16:44:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4C5EBACB6; Tue, 20 Oct 2020 16:44:47 +0200 (CEST) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by dpdk.org (Postfix) with ESMTP id 19B35AC57 for ; Tue, 20 Oct 2020 16:44:45 +0200 (CEST) Received: by mail-wr1-f47.google.com with SMTP id j7so2466139wrt.9 for ; Tue, 20 Oct 2020 07:44:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yTG6v2SRiFECFehpdS6jqnSkRHlmQRD7ZnfxXJKGnXQ=; b=N0LmDJ3mx4O081M6JebW97T1fP7z6DjhUkO78Vn8iyb9xhP/woxMvcHDLmP8uVzcV2 9Sb1Meu9KgXg53frvqWuGLS8SvdY06a+DARYl0rfxn/hYs8mhm48zDy87Q4BKyX8sc5O WkORaAX9PevkB/sMTEciL4wr1WgbFDSNre5sr7vPaNa0wO671zytFcephZun41Kcutsw LONY8Yg8fHgrOIzmtMtqEDPS3QuZFam5yNfSkCn+PYXLWLyoKLHCVhPg+V2eX8D+Efy0 15cP7B6mfDiaXl2CkVKtQbN/hoIr2BCVjdP3lxpURXKw6z2zvw3aXJRgsJBvSXHPiNJH Lb8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yTG6v2SRiFECFehpdS6jqnSkRHlmQRD7ZnfxXJKGnXQ=; b=MH90TBA94rKEoOC6BlXREA/uFXg5SncIVhQnqk+a7JJgMsCvGYV8M2xP66CreOQVGj JAqMJs8PtphDjL2Y+ZsjE6A0Bns/jCCuygE35AhGIYD7foy7kDdvWYgMe+yGh5nvN2om uvVIfvyFhduyxVqb6ooVgYeMpLGXso6yuaPC5lBIKyopQeuUxVWx/DZEgETpZDviVo62 hMhMHoHpD56RRBR4XA3trOQ9nplB195a43M/hi7LD1GfAANrH5+gLi6nkzoM1qblPepd vFfO0oVXAjOfBLNemGQ+YB/WJD77wNC2hmYvovqHrJ2CXTy0izBjoxBAvpZzznB/62lk AKJA== X-Gm-Message-State: AOAM53281TnU0q6XwOg9pO+tcGu6ZfT1IzDH9Ly9s6MUUwjV2XZ0p8TU RxpBZOwcnC842YvoTQ8qQ0liE5C3dGsuzS0KAMU= X-Google-Smtp-Source: ABdhPJwcWlUEIZ79T7zUldmgO9joOiWdR8LjVh4Ab/SCXw6SsTfNFq7bi1923Hw48BoERQvzNfsoN8UkfTeFkXlGUnU= X-Received: by 2002:adf:fd09:: with SMTP id e9mr3981902wrr.241.1603205083695; Tue, 20 Oct 2020 07:44:43 -0700 (PDT) MIME-Version: 1.0 References: <20201019133426.GB663@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20201019133426.GB663@bricha3-MOBL.ger.corp.intel.com> From: Ivan Serdyuk Date: Tue, 20 Oct 2020 17:44:32 +0300 Message-ID: To: Bruce Richardson Cc: dev@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] Building without AVX2 support, with Clang 11, on Ubuntu 20.04.1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Oct 19, 2020 at 4:34 PM Bruce Richardson 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:(. > data.rel.ro+0x18): > > > 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 (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 > bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds > swapgs itlb_multihit > bogomips : 5333.24 > clflush size : 64 > cache_alignment : 64 > address sizes : 36 bits physical, 48 bits virtual > power management: > processor : 1 > 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 : 1 > cpu cores : 2 > apicid : 1 > initial apicid : 1 > 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 > bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds > swapgs itlb_multihit > bogomips : 5333.24 > clflush size : 64 > cache_alignment : 64 > address sizes : 36 bits physical, 48 bits virtual > power management: > > Can you try deleting your build folder and configure it again without > overriding the environmental vars? If it still fails, please paste the > errors here, and also try configuring the build with "-Dmachine=default" to > turn off detecting the present instruction sets and assume an SSE4 > baseline. > I just did as you prosed. Here is my output. Something is missing, btw. I am curious why you haven't tried to use http://compiler-rt.llvm.org/, if there is a reason, instead of GCC's libraries. I would ask the similar question against https://llvm.org/docs/Proposals/LLVMLibC.html Hence https://llvm.org/docs/Proposals/LLVMLibC.html . I am compiling with Ninja, currently - so I shall report whether everything was compiled. Ivan