From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.mhcomputing.net (master.mhcomputing.net [74.208.228.170]) by dpdk.org (Postfix) with ESMTP id AD1129A8E for ; Tue, 16 Feb 2016 07:08:13 +0100 (CET) Received: from [192.168.1.231] (99-34-229-174.lightspeed.sntcca.sbcglobal.net [99.34.229.174]) by mail.mhcomputing.net (Postfix) with ESMTPSA id 184F6121; Mon, 15 Feb 2016 22:08:13 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) From: Matthew Hall X-Mailer: iPhone Mail (13D15) In-Reply-To: Date: Mon, 15 Feb 2016 22:08:11 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: "Van Haaren, Harry" Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] x86_64-native-linuxapp-clang compilation broken? X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2016 06:08:14 -0000 I had all kinds of very weird failures using the 64 bit clang target related= to missing CPUFLAGS. For a while I hacked around it by adding a whole ton o= f -D for missing RTE CPUFLAGS macros. But then some further DPDK changes cam= e and caused clang bud failures I could not debug and I had to give up and s= witch back to GCC. While I can't confirm this exact error I can 100% confirm= very similar errors using Ubuntu 15.10 and the included clang with it.=20 I think the general problem is that there isn't much in the way of regressio= n testing for the build on this compile target. So unless it breaks for just= the right expert at the right time nobody finds it and tracks it down.=20 Matthew.=20 On Feb 15, 2016, at 2:14 AM, Van Haaren, Harry w= rote: >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Marc >> In file included from >> /home/marc/dpdk/lib/librte_eal/linuxapp/eal/eal_pci.c:42: >> /home/marc/dpdk/x86_64-native-linuxapp-clang/include/rte_memcpy.h:870:2: >> error: implicit declaration of function '_mm_alignr_epi8' is invalid in >> C99 >> [-Werror,-Wimplicit-function-declaration] >> MOVEUNALIGNED_LEFT47(dst, src, n, srcofs); >> ^ >=20 > Can reproduce this here, Ubuntu clang version 3.6.2-1 (tags/RELEASE_362/fi= nal) (based on LLVM 3.6.2) > This issue seems to be caused by a lack of intrinsic CFLAGS, clang and GCC= build output with make V=3D1 on the same machine (unnecessary output stripp= ed): >=20 >=20 > clang -Wp,-MD,./.eal_pci.o.d.tmp -m64 -pthread -march=3Dnative -DRTE_MACH= INE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_COMPILE_TIME_CPUFLAGS=3DRTE= _CPUFLAG_SSE,RTE_CPUFLAG_SSE2 >=20 >=20 > gcc -Wp,-MD,./.eal_pci.o.d.tmp -m64 -pthread -fPIC -march=3Dnative -DRTE_= MACHINE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3 -D= RTE_MACHINE_CPUFLAG_SSSE3 -DRTE_MACHINE_CPUFLAG_SSE4_1 -DRTE_MACHINE_CPUFLAG= _SSE4_2 -DRTE_MACHINE_CPUFLAG_AES -DRTE_MACHINE_CPUFLAG_PCLMULQDQ -DRTE_MACH= INE_CPUFLAG_AVX -DRTE_MACHINE_CPUFLAG_RDRAND -DRTE_MACHINE_CPUFLAG_FSGSBASE -= DRTE_MACHINE_CPUFLAG_F16C -DRTE_MACHINE_CPUFLAG_AVX2 -DRTE_COMPILE_TIME_CPUFL= AGS=3DRTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SSE3,RTE_CPUFLAG_SSSE3,RT= E_CPUFLAG_SSE4_1,RTE_CPUFLAG_SSE4_2,RTE_CPUFLAG_AES,RTE_CPUFLAG_PCLMULQDQ,RT= E_CPUFLAG_AVX,RTE_CPUFLAG_RDRAND,RTE_CPUFLAG_FSGSBASE,RTE_CPUFLAG_F16C,RTE_C= PUFLAG_AVX2 >=20 >=20 > There is no copy-paste error above: the clang intrinsic CFLAGS is much sho= rter than GCC. >=20 > Strangely, this issue also exists when building i686 gcc target *on a 32bi= t host/VM*. Git bisect shows that this issue exists on 32bit target / 32bit h= ost since commit 9144d6b, which optimized eal/x86 rte_memcpy. >=20 > It looks like the build-system is not correctly identifying the intrinsics= to build with. I've had a look through mk/toolchain/clang/* and mk/rte.cpu= flags.mk but haven't seen anything I think could be the cause... >=20 > Perhaps somebody with familiarity with the build system could take a look?= >=20 > -Harry