From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>, dev@dpdk.org
Subject: Re: [dpdk-dev] 32-bit compilation & debug logs
Date: Mon, 26 Feb 2018 18:55:01 +0000 [thread overview]
Message-ID: <ff6ce635-35b9-8d8d-7c7d-c5caa610a922@intel.com> (raw)
In-Reply-To: <1626400.QN1GMNLe81@xps>
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
prev parent reply other threads:[~2018-02-26 18:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-13 20:59 Thomas Monjalon
2018-02-26 18:55 ` Burakov, Anatoly [this message]
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=ff6ce635-35b9-8d8d-7c7d-c5caa610a922@intel.com \
--to=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
/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).