DPDK patches and discussions
 help / color / mirror / Atom feed
From: Matthew Hall <mhall@mhcomputing.net>
To: "Van Haaren, Harry" <harry.van.haaren@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] x86_64-native-linuxapp-clang compilation broken?
Date: Mon, 15 Feb 2016 22:08:11 -0800	[thread overview]
Message-ID: <AEED0AEC-3D48-4455-A345-974CBA0870E0@mhcomputing.net> (raw)
In-Reply-To: <E923DB57A917B54B9182A2E928D00FA612869410@IRSMSX102.ger.corp.intel.com>

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 of -D for missing RTE CPUFLAGS macros. But then some further DPDK changes came and caused clang bud failures I could not debug and I had to give up and switch 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. 

I think the general problem is that there isn't much in the way of regression 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. 

Matthew. 

On Feb 15, 2016, at 2:14 AM, Van Haaren, Harry <harry.van.haaren@intel.com> wrote:

>> 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);
>>        ^
> 
> Can reproduce this here, Ubuntu clang version 3.6.2-1 (tags/RELEASE_362/final) (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=1 on the same machine (unnecessary output stripped):
> 
> 
> clang -Wp,-MD,./.eal_pci.o.d.tmp -m64 -pthread  -march=native -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_COMPILE_TIME_CPUFLAGS=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2
> 
> 
> gcc -Wp,-MD,./.eal_pci.o.d.tmp -m64 -pthread -fPIC  -march=native -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3 -DRTE_MACHINE_CPUFLAG_SSSE3 -DRTE_MACHINE_CPUFLAG_SSE4_1 -DRTE_MACHINE_CPUFLAG_SSE4_2 -DRTE_MACHINE_CPUFLAG_AES -DRTE_MACHINE_CPUFLAG_PCLMULQDQ -DRTE_MACHINE_CPUFLAG_AVX -DRTE_MACHINE_CPUFLAG_RDRAND -DRTE_MACHINE_CPUFLAG_FSGSBASE -DRTE_MACHINE_CPUFLAG_F16C -DRTE_MACHINE_CPUFLAG_AVX2 -DRTE_COMPILE_TIME_CPUFLAGS=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SSE3,RTE_CPUFLAG_SSSE3,RTE_CPUFLAG_SSE4_1,RTE_CPUFLAG_SSE4_2,RTE_CPUFLAG_AES,RTE_CPUFLAG_PCLMULQDQ,RTE_CPUFLAG_AVX,RTE_CPUFLAG_RDRAND,RTE_CPUFLAG_FSGSBASE,RTE_CPUFLAG_F16C,RTE_CPUFLAG_AVX2
> 
> 
> There is no copy-paste error above: the clang intrinsic CFLAGS is much shorter than GCC.
> 
> Strangely, this issue also exists when building i686 gcc target *on a 32bit host/VM*. Git bisect shows that this issue exists on 32bit target / 32bit host since commit 9144d6b, which optimized eal/x86 rte_memcpy.
> 
> 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.cpuflags.mk  but haven't seen anything I think could be the cause...
> 
> Perhaps somebody with familiarity with the build system could take a look?
> 
> -Harry

  reply	other threads:[~2016-02-16  6:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-14 22:21 Marc
2016-02-15  9:39 ` Mcnamara, John
2016-02-15 10:14   ` Van Haaren, Harry
2016-02-16  6:08     ` Matthew Hall [this message]
2016-02-15  9:44 ` Mcnamara, John
2016-02-16 11:49 ` Mcnamara, John
2016-02-16 12:15   ` Marc
2016-02-16 12:57     ` De Lara Guarch, Pablo
2016-02-16 18:47       ` Matthew Hall
2016-02-16 23:19         ` Marc
2016-02-17 11:07           ` De Lara Guarch, Pablo
2016-02-17 20:23             ` Matthew Hall

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=AEED0AEC-3D48-4455-A345-974CBA0870E0@mhcomputing.net \
    --to=mhall@mhcomputing.net \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.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).