From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 43FA549E0 for ; Mon, 26 Feb 2018 19:55:04 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Feb 2018 10:55:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,397,1515484800"; d="scan'208";a="20445541" Received: from bculhanx-mobl.ger.corp.intel.com (HELO [10.252.20.162]) ([10.252.20.162]) by orsmga007.jf.intel.com with ESMTP; 26 Feb 2018 10:55:03 -0800 To: Thomas Monjalon , dev@dpdk.org References: <1626400.QN1GMNLe81@xps> From: "Burakov, Anatoly" Message-ID: Date: Mon, 26 Feb 2018 18:55:01 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1626400.QN1GMNLe81@xps> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] 32-bit compilation & debug logs 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: , X-List-Received-Date: Mon, 26 Feb 2018 18:55:05 -0000 On 13-Feb-18 8:59 PM, Thomas Monjalon wrote: > Hi all, > > There is a very common pattern with build failures in DPDK. > When compiling in 32-bit mode, there are some mismatches between > printf format "%lu" / "%lx" and the size of the data being 64-bit. > In 32-bit mode, a long is 32 bits long :) > That's why "%lx" must be replaced by "%" PRIx64. > > long -> %lx > uint64_t -> %PRIx64 > > Most of the times, using %l is wrong (except when printing a long). > So next time you write %l, please think "I am probably wrong". > > For the existing codebase, please grep "%l". > There are probably some remaining wrong "%l" which are not detected > when compiling, because the code is in debug functions never enabled. > Note that debug code should be tested but there can be some forgotten > code paths. > > Thanks > This sounds like something that should be part of build automation or check-build script. -- Thanks, Anatoly