From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2 2/2] fix building with clang-3.8.0 compiler Date: Mon, 27 Jun 2016 19:13:56 +0200 Message-ID: <2606479.aT4DI5EUNP@xps13> References: <1757902E-701B-4C42-BF80-285F37F50526@intel.com> <20160627164056.GF17808@bricha3-MOBL3> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, "Richardson, Bruce" To: "Wiles, Keith" Return-path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 1970A56AB for ; Mon, 27 Jun 2016 19:13:59 +0200 (CEST) Received: by mail-wm0-f44.google.com with SMTP id 187so22476570wmz.1 for ; Mon, 27 Jun 2016 10:13:59 -0700 (PDT) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-06-27 16:51, Wiles, Keith: > On 6/27/16, 11:40 AM, "Richardson, Bruce" 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@intel.com> wrote: > >> >On 6/27/16, 3:46 AM, "Richardson, Bruce" 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 buildin= g with clang and shared libraries. > >>=20 > >> The x86_64-linux-gnu/bits/string2.h header file if getting include= d from string.h, but this would be mean __GNUC__ is defined and this is= the clang compiler. After much investigation it turns out =E2=80=98cca= che=E2=80=99 is the problem here. If ccache is enabled with clang build= s the __GNUC__ is defined some how, I never did find the location. > >>=20 > >> Just a warning it appears =E2=80=98ccache=E2=80=99 for caching obj= ect files is not compatible with DPDK builds =E2=98=B9 in all cases. > >>=20 > >Actually, I believe it's a more general ccache and clang problem, no= t DPDK specific. > > > >See e.g. http://petereisentraut.blogspot.com/2011/09/ccache-and-clan= g-part-2.html > > > >where the recommendation is to set "export CCACHE_CPP2=3Dyes" in you= r environment. > >This cleared quite a number of issues for me (and others) when compi= ling with > >clang. >=20 > Adding the CCACHE_CPP2=3Dyes >=20 > Cleaned up all of the compiler errors I was seeing =E2=98=BA >=20 > 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