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 7B762A04DC; Mon, 19 Oct 2020 15:34:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F3E98C91E; Mon, 19 Oct 2020 15:34:40 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id DCE74C904 for ; Mon, 19 Oct 2020 15:34:38 +0200 (CEST) IronPort-SDR: QIQElGsKbLU+9JjOCMk3y6NZPu8nXgXfh5i0eMNa0/vODuGDrDO7VQ4ty8/5aVoBqcEyn4FWKP YvWlrWAMv55g== X-IronPort-AV: E=McAfee;i="6000,8403,9778"; a="146325093" X-IronPort-AV: E=Sophos;i="5.77,394,1596524400"; d="scan'208";a="146325093" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2020 06:34:32 -0700 IronPort-SDR: QHFaULao5BnndVnwlAPEiIMRZx4byLof2x0whOGLrSrRwBifK1+hWpQeOpYfXnm+dyzvJnYgyG ZIfFVrz7t4ug== X-IronPort-AV: E=Sophos;i="5.77,394,1596524400"; d="scan'208";a="347434400" Received: from bricha3-mobl.ger.corp.intel.com ([10.213.11.189]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 19 Oct 2020 06:34:30 -0700 Date: Mon, 19 Oct 2020 14:34:26 +0100 From: Bruce Richardson To: Ivan Serdyuk Cc: dev@dpdk.org Message-ID: <20201019133426.GB663@bricha3-MOBL.ger.corp.intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 04:17:36PM +0300, Ivan Serdyuk wrote: > Hi there. > I tried the following: > > export CPPFLAGS=' -stdlib=libc++ ' CXXFLAGS=' -stdlib=libc++ ' > > meson build-clang > > cd build-clang > > ninja -j 4 > > > Hi Ivan 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. > 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. 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. /Bruce