[dpdk-dev] [PATCH v2 2/2] fix building with clang-3.8.0 compiler

Thomas Monjalon thomas.monjalon at 6wind.com
Mon Jun 27 19:13:56 CEST 2016


2016-06-27 16:51, Wiles, Keith:
> On 6/27/16, 11:40 AM, "Richardson, Bruce" <bruce.richardson at intel.com> wrote:
> >On Mon, Jun 27, 2016 at 05:29:59PM +0100, Wiles, Keith wrote:
> >> On 6/27/16, 7:58 AM, on behalf of keith.wiles at intel.com> wrote:
> >> >On 6/27/16, 3:46 AM, "Richardson, Bruce" <bruce.richardson at intel.com> wrote:
> >> >>On Sun, Jun 26, 2016 at 10:54:12AM -0500, Keith Wiles wrote:
> >> I found the problem to the compile errors I am seeing with building with clang and shared libraries.
> >> 
> >> The x86_64-linux-gnu/bits/string2.h header file if getting included from string.h, but this would be mean __GNUC__ is defined and this is the clang compiler. After much investigation it turns out ‘ccache’ is the problem here. If ccache is enabled with clang builds the __GNUC__ is defined some how, I never did find the location.
> >> 
> >> Just a warning it appears ‘ccache’ for caching object files is not compatible with DPDK builds ☹ in all cases.
> >> 
> >Actually, I believe it's a more general ccache and clang problem, not DPDK specific.
> >
> >See e.g. http://petereisentraut.blogspot.com/2011/09/ccache-and-clang-part-2.html
> >
> >where the recommendation is to set "export CCACHE_CPP2=yes" in your environment.
> >This cleared quite a number of issues for me (and others) when compiling with
> >clang.
> 
> Adding the CCACHE_CPP2=yes
> 
> Cleaned up all of the compiler errors I was seeing ☺
> 
> Do we need to document this in DPDK and if so where in the docs would someone suggest it be placed?

I do not use ccache with clang because it is not known to work.
But if you are sure it can work with few configuration, I would be glad
to have a complete description.
However it is not related to DPDK at all. That's why a nice email well
written and explained on this ml looks enough to be found via Google.
Thanks


More information about the dev mailing list