From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] eal: fix clang compilation error on ARM64 Date: Tue, 10 Apr 2018 23:35:15 +0200 Message-ID: <3084545.g1xfDtWPys@xps> References: <20180406110103.29163-1-pbhagavatula@caviumnetworks.com> <20180406182516.GA13313@ltp-pvn> <8961764.He0omIczL0@xps> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, techboard@dpdk.org To: Pavan Nikhilesh Return-path: In-Reply-To: <8961764.He0omIczL0@xps> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, big issue here. This patch does not compile on Linux with ICC or GCC < 4.9 because of a missing C11 header: #include 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