[dpdk-dev] pktgen-2.9.13 not compiling with gcc 4.9 because of -Wdiscarded-qualifiers / 2.9.12 fine

Laurent GUERBY laurent at guerby.net
Sun Apr 10 00:00:00 CEST 2016


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

Sincerely,

Laurent

root at 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




More information about the dev mailing list