DPDK patches and discussions
 help / color / mirror / Atom feed
From: Laurent GUERBY <laurent@guerby.net>
To: "Wiles, Keith" <keith.wiles@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] pktgen-2.9.13 not compiling with gcc 4.9 because of -Wdiscarded-qualifiers / 2.9.12 fine
Date: Sun, 10 Apr 2016 11:25:28 +0200	[thread overview]
Message-ID: <1460280328.25322.105.camel@guerby.net> (raw)
In-Reply-To: <A4EEC344-D999-4725-B50B-530C197C0C32@intel.com>

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
> >
> >
> >
> 
> 
> Regards,
> Keith
> 
> 
> 
> 

  reply	other threads:[~2016-04-10  9:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-09 22:00 Laurent GUERBY
2016-04-10  4:59 ` Wiles, Keith
2016-04-10  9:25   ` Laurent GUERBY [this message]
2016-04-10 17:47     ` Wiles, Keith

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=1460280328.25322.105.camel@guerby.net \
    --to=laurent@guerby.net \
    --cc=dev@dpdk.org \
    --cc=keith.wiles@intel.com \
    /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).