DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Cc: dev@dpdk.org, techboard@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] eal: fix clang compilation error on ARM64
Date: Tue, 10 Apr 2018 23:35:15 +0200	[thread overview]
Message-ID: <3084545.g1xfDtWPys@xps> (raw)
In-Reply-To: <8961764.He0omIczL0@xps>

Hi, big issue here.
This patch does not compile on Linux with ICC or GCC < 4.9
because of a missing C11 header:
	#include <stdatomic.h>

GCC 4.9 is recommended in doc/guides/linux_gsg/sys_reqs.rst.
But GCC 4.8 is used by SLES 12, RHEL 7, etc...

Note: Intel compilation tests are running with a backlog of one week,
so cannot catch such fail.

Exceptionnaly, I have decided to remove this patch pushed few hours ago
(not reverting), in order to avoid a serious "git bisect" breakage
in the middle of the git history.

We'll need to find a better way of fixing the compilation error
seen on ARM with clang.
To make it clear: I believe it is more important to preserve GCC 4.8
than clang compilation.
By the way, what is the version of clang which was causing the error?

The error was:
	include/generic/rte_atomic.h:215:9: error:
		implicit declaration of function '__atomic_exchange_2'
		is invalid in C99
	include/generic/rte_atomic.h:494:9: error:
		implicit declaration of function '__atomic_exchange_4'
		is invalid in C99
	include/generic/rte_atomic.h:772:9: error:
		implicit declaration of function '__atomic_exchange_8'
		is invalid in C99

The proposed solution was:
	Use __atomic_exchange_n instead of __atomic_exchange_(2/4/8),
	and include stdatomic.h.



10/04/2018 17:07, Thomas Monjalon:
> 06/04/2018 20:25, Pavan Nikhilesh:
> > On Fri, Apr 06, 2018 at 06:24:34PM +0200, Thomas Monjalon wrote:
> > > 06/04/2018 13:01, Pavan Nikhilesh:
> > > > Use __atomic_exchange_n instead of __atomic_exchange_(2/4/8).
> > > >
> > > > Fixes: ff2863570fcc ("eal: introduce atomic exchange operation")
[...]
> Applied (with error log), thanks

  reply	other threads:[~2018-04-10 21:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-06 11:01 Pavan Nikhilesh
2018-04-06 16:24 ` Thomas Monjalon
2018-04-06 18:25   ` Pavan Nikhilesh
2018-04-10 15:07     ` Thomas Monjalon
2018-04-10 21:35       ` Thomas Monjalon [this message]
2018-04-11  8:38         ` Pavan Nikhilesh
2018-04-11  8:46           ` Thomas Monjalon
2018-04-11  9:00             ` Pavan Nikhilesh
2018-04-11 17:01 ` [dpdk-dev] [PATCH v2] " Pavan Nikhilesh
2018-04-11 20:42   ` Thomas Monjalon
2018-04-11 21:48     ` Stephen Hemminger

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=3084545.g1xfDtWPys@xps \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=pbhagavatula@caviumnetworks.com \
    --cc=techboard@dpdk.org \
    /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).