From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx3.tetaneutral.net (mx3.tetaneutral.net [89.234.156.169]) by dpdk.org (Postfix) with ESMTP id 5250A2956 for ; 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 To: "Wiles, Keith" Cc: "dev@dpdk.org" Date: Sun, 10 Apr 2016 11:25:28 +0200 In-Reply-To: References: <1460239200.25322.84.camel@guerby.net> 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2016 09:25:29 -0000 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 +#include #include #include 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 > > > >