From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH v2 02/13] eventdev: fix errors with strict compilation flags Date: Wed, 26 Apr 2017 09:06:24 +0200 Message-ID: <20170426070624.GP3790@6wind.com> References: <743ea1c06b9307c8fc68a399244b8aeab606878e.1493108423.git.adrien.mazarguil@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "dev@dpdk.org" , Jerin Jacob To: "De Lara Guarch, Pablo" Return-path: Received: from mail-wr0-f172.google.com (mail-wr0-f172.google.com [209.85.128.172]) by dpdk.org (Postfix) with ESMTP id 362DC695D for ; Wed, 26 Apr 2017 09:06:32 +0200 (CEST) Received: by mail-wr0-f172.google.com with SMTP id w50so96776391wrc.0 for ; Wed, 26 Apr 2017 00:06:32 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Apr 25, 2017 at 03:31:45PM +0000, De Lara Guarch, Pablo wrote: > Hi Adrien, > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Adrien Mazarguil > > Sent: Tuesday, April 25, 2017 9:30 AM > > To: dev@dpdk.org > > Cc: Jerin Jacob > > Subject: [dpdk-dev] [PATCH v2 02/13] eventdev: fix errors with strict > > compilation flags > > > > Exported headers must allow compilation with the strictest flags. This > > commit addresses the following errors: > > > > In file included from build/include/rte_eventdev_pmd.h:55:0, > > from /tmp/check-includes.sh.25816.c:1: > > build/include/rte_eventdev.h:908:8: error: struct has no named members > > [-Werror=pedantic] > > [...] > > In file included from /tmp/check-includes.sh.25816.c:1:0: > > build/include/rte_eventdev_pmd.h:65:35: error: ISO C does not permit > > named > > variadic macros [-Werror=variadic-macros] > > [...] > > > > Also enabling RTE_LIBRTE_EVENTDEV_DEBUG causes redefinitions: > > > > In file included from /tmp/check-includes.sh.18921.c:27:0: > > build/include/rte_eventdev_pmd.h:58:0: error: > > "RTE_PMD_DEBUG_TRACE" > > redefined [-Werror] > > [...] > > > > Rely on the rte_ethdev.h version instead. > > > > Fixes: 71f238432865 ("eventdev: introduce event driven programming > > model") > > Fixes: 4f0804bbdfb9 ("eventdev: implement the northbound APIs") > > > > Cc: Jerin Jacob > > Signed-off-by: Adrien Mazarguil > > I am seeing the following error due to this patch: > In file included from /root/tmp/dpdk-17.05-rc2/lib/librte_eventdev/rte_eventdev.c:62:0: > /root/tmp/dpdk-17.05-rc2/lib/librte_eventdev/rte_eventdev_pmd.h:54:24: fatal error: rte_ethdev.h: No such file or directory > #include > > It only happens when I compile with "-j", so it looks like dependencies have to be fixed? You're right, actually rte_eventdev_pmd.h is not even supposed to have a dependency on rte_ethdev.h. The problem comes from RTE_FUNC_PTR_OR_ERR_RET() defined in rte_dev.h, itself relying on the RTE_PMD_DEBUG_TRACE() macro without any kind of dependency. This makes no sense, RTE_PMD_DEBUG_TRACE() should be defined along with rte_pmd_debug_trace() in rte_dev.h. I'll move this fix to a separate commit to remove all duplicate definitions. -- Adrien Mazarguil 6WIND