[dpdk-dev] pktgen-2.9.13 not compiling with gcc 4.9 because of -Wdiscarded-qualifiers / 2.9.12 fine
Message ID | 1460280328.25322.105.camel@guerby.net (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id C89612BCE; Sun, 10 Apr 2016 11:25:30 +0200 (CEST) Received: from mx3.tetaneutral.net (mx3.tetaneutral.net [89.234.156.169]) by dpdk.org (Postfix) with ESMTP id 5250A2956 for <dev@dpdk.org>; Sun, 10 Apr 2016 11:25:29 +0200 (CEST) Received: from lgnuc (ip165.tetaneutral.net [91.224.148.165]) by mx3.tetaneutral.net (Postfix) with ESMTP id 0CAB7320195; Sun, 10 Apr 2016 11:25:29 +0200 (CEST) Message-ID: <1460280328.25322.105.camel@guerby.net> From: Laurent GUERBY <laurent@guerby.net> To: "Wiles, Keith" <keith.wiles@intel.com> Cc: "dev@dpdk.org" <dev@dpdk.org> Date: Sun, 10 Apr 2016 11:25:28 +0200 In-Reply-To: <A4EEC344-D999-4725-B50B-530C197C0C32@intel.com> References: <1460239200.25322.84.camel@guerby.net> <A4EEC344-D999-4725-B50B-530C197C0C32@intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] pktgen-2.9.13 not compiling with gcc 4.9 because of -Wdiscarded-qualifiers / 2.9.12 fine X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Laurent GUERBY
April 10, 2016, 9:25 a.m. UTC
On Sun, 2016-04-10 at 04:59 +0000, Wiles, Keith wrote: > >Hi, > > > >pktgen-2.9.13 is not compiling with gcc 4.9, see below > > > >2.9.12 is compiling fine with gcc 4.9, so looks like new > >IPv6 code recently added is the culprit. > > > >I think -Wdiscarded-qualifiers is available only with gcc 5+ > >https://gcc.gnu.org/gcc-5/changes.html > > Thanks I have fixed the problem on Ubuntu 15.10 using gcc 4.9 and 5.x plus pushed a new version. Please give it a try. Hi Keith, The original error is gone, thanks! But I get another one a bit later (source up to date from git for pktgen, DPDK 2.2.0 as SDK) : CC pktgen-capture.o In file included from /root/pktgen-dpdk/app/pktgen-seq.h:72:0, from /root/pktgen-dpdk/app/pktgen-port-cfg.h:80, from /root/pktgen-dpdk/app/pktgen-capture.h:77, from /root/pktgen-dpdk/app/pktgen-capture.c:68: /root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/cmdline_parse_ipaddr.h:89:27: error: field ‘hdr’ has incomplete type struct cmdline_token_hdr hdr; ^ /root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/cmdline_parse_ipaddr.h:96:26: error: unknown type name ‘cmdline_parse_token_hdr_t’ int cmdline_parse_ipaddr(cmdline_parse_token_hdr_t *tk, const char *srcbuf, ^ /root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/cmdline_parse_ipaddr.h:98:29: error: unknown type name ‘cmdline_parse_token_hdr_t’ int cmdline_get_help_ipaddr(cmdline_parse_token_hdr_t *tk, char *dstbuf, ^ /root/dpdk-2.2.0/mk/internal/rte.compile-pre.mk:126: recipe for target 'pktgen-capture.o' failed make[2]: *** [pktgen-capture.o] Error 1 /root/dpdk-2.2.0/mk/rte.extapp.mk:42: recipe for target 'all' failed make[1]: *** [all] Error 2 /root/dpdk-2.2.0/mk/rte.extsubdir.mk:46: recipe for target 'app' failed make: *** [app] Error 2 This is fixed by this patch: root@dpdk3:~/pktgen-dpdk/app# git diff Then it fails linking: LD pktgen /usr/bin/ld: cannot find -llua collect2: error: ld returned 1 exit status I tried a few things and got this link working but then I got errors about implicit declaration of function ‘lua_putstring’ and this is a macro in 5.3.0 but not present in 5.3.2, a bit more lua transition work is probably needed :). Sincerely, Laurent > > > >Sincerely, > > > >Laurent > > > >root@dpdk3:~/pktgen-2.9.13# make > >== lib > >== common > > CC wr_copyright_info.o > > CC wr_port_config.o > > CC wr_core_info.o > > CC wr_lscpu.o > > CC wr_utils.o > > CC wr_coremap.o > > CC wr_pcap.o > >In file included from /root/pktgen-2.9.13/lib/common/wr_pcap.c:122:0: > >/root/pktgen-2.9.13/lib/common/wr_inet.h:755:9: error: unknown option > >after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas] > > #pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" > > ^ > >/root/pktgen-2.9.13/lib/common/wr_inet.h: In function ‘inet_ntop6’: > >/root/pktgen-2.9.13/lib/common/wr_inet.h:758:2: error: return discards > >‘const’ qualifier from pointer target type [-Werror] > > return inet_ntop(AF_INET6, ip6, buff, len); > > ^ > >cc1: all warnings being treated as errors > >/root/dpdk-2.2.0/mk/internal/rte.compile-pre.mk:126: recipe for target > >'wr_pcap.o' failed > >make[3]: *** [wr_pcap.o] Error 1 > >/root/dpdk-2.2.0/mk/rte.extlib.mk:44: recipe for target 'all' failed > >make[2]: *** [all] Error 2 > >/root/dpdk-2.2.0/mk/rte.extsubdir.mk:46: recipe for target 'common' > >failed > >make[1]: *** [common] Error 2 > >/root/dpdk-2.2.0/mk/rte.extsubdir.mk:46: recipe for target 'lib' failed > >make: *** [lib] Error 2 > > > > > > > > > Regards, > Keith > > > >
Comments
>On Sun, 2016-04-10 at 04:59 +0000, Wiles, Keith wrote: >> >Hi, >> > >> >pktgen-2.9.13 is not compiling with gcc 4.9, see below >> > >> >2.9.12 is compiling fine with gcc 4.9, so looks like new >> >IPv6 code recently added is the culprit. >> > >> >I think -Wdiscarded-qualifiers is available only with gcc 5+ >> >https://gcc.gnu.org/gcc-5/changes.html >> >> Thanks I have fixed the problem on Ubuntu 15.10 using gcc 4.9 and 5.x plus pushed a new version. Please give it a try. > >Hi Keith, > >The original error is gone, thanks! But I get another one a bit later >(source up to date from git for pktgen, DPDK 2.2.0 as SDK) : > > CC pktgen-capture.o >In file included from /root/pktgen-dpdk/app/pktgen-seq.h:72:0, > from /root/pktgen-dpdk/app/pktgen-port-cfg.h:80, > from /root/pktgen-dpdk/app/pktgen-capture.h:77, > from /root/pktgen-dpdk/app/pktgen-capture.c:68: >/root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/cmdline_parse_ipaddr.h:89:27: error: field ‘hdr’ has incomplete type > struct cmdline_token_hdr hdr; > ^ >/root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/cmdline_parse_ipaddr.h:96:26: error: unknown type name ‘cmdline_parse_token_hdr_t’ > int cmdline_parse_ipaddr(cmdline_parse_token_hdr_t *tk, const char >*srcbuf, > ^ >/root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include/cmdline_parse_ipaddr.h:98:29: error: unknown type name ‘cmdline_parse_token_hdr_t’ > int cmdline_get_help_ipaddr(cmdline_parse_token_hdr_t *tk, char >*dstbuf, > ^ >/root/dpdk-2.2.0/mk/internal/rte.compile-pre.mk:126: recipe for target >'pktgen-capture.o' failed >make[2]: *** [pktgen-capture.o] Error 1 >/root/dpdk-2.2.0/mk/rte.extapp.mk:42: recipe for target 'all' failed >make[1]: *** [all] Error 2 >/root/dpdk-2.2.0/mk/rte.extsubdir.mk:46: recipe for target 'app' failed >make: *** [app] Error 2 > >This is fixed by this patch: > >root@dpdk3:~/pktgen-dpdk/app# git diff >diff --git a/app/pktgen-seq.h b/app/pktgen-seq.h >index a48fbe0..ba787ff 100644 >--- a/app/pktgen-seq.h >+++ b/app/pktgen-seq.h >@@ -69,6 +69,7 @@ > #define _PKTGEN_SEQ_H_ > > #include <rte_ether.h> >+#include <cmdline_parse.h> > #include <cmdline_parse_ipaddr.h> > #include <wr_inet.h> > >Then it fails linking: > > LD pktgen >/usr/bin/ld: cannot find -llua >collect2: error: ld returned 1 exit status > >I tried a few things and got this link working but then I got errors >about implicit declaration of function ‘lua_putstring’ and this is a >macro in 5.3.0 but not present in 5.3.2, a bit more lua transition work >is probably needed :). > >Sincerely, > >Laurent > >> > >> >Sincerely, >> > >> >Laurent >> > >> >root@dpdk3:~/pktgen-2.9.13# make >> >== lib >> >== common >> > CC wr_copyright_info.o >> > CC wr_port_config.o >> > CC wr_core_info.o >> > CC wr_lscpu.o >> > CC wr_utils.o >> > CC wr_coremap.o >> > CC wr_pcap.o >> >In file included from /root/pktgen-2.9.13/lib/common/wr_pcap.c:122:0: >> >/root/pktgen-2.9.13/lib/common/wr_inet.h:755:9: error: unknown option >> >after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas] >> > #pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" >> > ^ >> >/root/pktgen-2.9.13/lib/common/wr_inet.h: In function ‘inet_ntop6’: >> >/root/pktgen-2.9.13/lib/common/wr_inet.h:758:2: error: return discards >> >‘const’ qualifier from pointer target type [-Werror] >> > return inet_ntop(AF_INET6, ip6, buff, len); >> > ^ >> >cc1: all warnings being treated as errors >> >/root/dpdk-2.2.0/mk/internal/rte.compile-pre.mk:126: recipe for target >> >'wr_pcap.o' failed >> >make[3]: *** [wr_pcap.o] Error 1 >> >/root/dpdk-2.2.0/mk/rte.extlib.mk:44: recipe for target 'all' failed >> >make[2]: *** [all] Error 2 >> >/root/dpdk-2.2.0/mk/rte.extsubdir.mk:46: recipe for target 'common' >> >failed >> >make[1]: *** [common] Error 2 >> >/root/dpdk-2.2.0/mk/rte.extsubdir.mk:46: recipe for target 'lib' failed >> >make: *** [lib] Error 2 Try out the dev branch on dpdk.org and see if that fixes the problems. >> > >> > >> > >> >> >> Regards, >> Keith >> >> >> >> > > > Regards, Keith
diff --git a/app/pktgen-seq.h b/app/pktgen-seq.h index a48fbe0..ba787ff 100644 --- a/app/pktgen-seq.h +++ b/app/pktgen-seq.h @@ -69,6 +69,7 @@ #define _PKTGEN_SEQ_H_ #include <rte_ether.h> +#include <cmdline_parse.h> #include <cmdline_parse_ipaddr.h> #include <wr_inet.h>