使用build.py编译NetSys / bess时出现编译错误

时间:2018-09-28 05:50:01

标签: c++ compiler-errors

我正在尝试使用bess在Ubuntu中编译Linux localhost 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

整个项目的源代码位于:NetSys/bess in Github

但是,我运行.\build.py并遇到了一个令人沮丧的编译错误,如下所示:

In file included from utils/copy_bench.cc:34:0:
utils/copy_bench.cc:176:1: error: expected initializer at end of input
 BENCHMARK_MAIN()
 ^
[MODULE_CXX] modules/port_out.o
Error: copy_bench.o
g++ -o copy_bench.o -c utils/copy_bench.cc -std=c++17 -g3 -ggdb3 -march=native -isystem /home/xiarui/bess/deps/dpdk-17.11/build/include -isystem /home/xiarui/bess/core -isystem utils/.. -isystem /home/xiarui/bess/core/modules -D_GNU_SOURCE -Werror -Wall -Wextra -Wcast-align -Wno-error=deprecated-declarations -fno-gnu-unique -O3 -DNDEBUG -MT copy_bench.o -MMD -MP -MF .deps/copy_bench.d
Makefile:475: recipe for target 'copy_bench.o' failed
make: *** [copy_bench.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from /home/xiarui/bess/deps/dpdk-17.11/build/include/rte_spinlock.h:44:0,
                 from /home/xiarui/bess/deps/dpdk-17.11/build/include/rte_mempool.h:72,
                 from /home/xiarui/bess/deps/dpdk-17.11/build/include/rte_mbuf.h:65,
                 from /home/xiarui/bess/deps/dpdk-17.11/build/include/rte_ether.h:52,
                 from /home/xiarui/bess/deps/dpdk-17.11/build/include/rte_ethdev.h:185,
                 from drivers/pmd.h:38,
                 from drivers/pmd.cc:31:
drivers/../packet.h: In static member function ‘static void bess::Packet::Free(bess::Packet**, size_t)’:
drivers/../packet.h:346:23: error: ‘const class bess::Packet’ has no member named ‘refcnt’; did you mean ‘reset’?
                  pkt->refcnt() != 1)) {
                       ^
In file included from drivers/../utils/copy.h:38:0,
                 from drivers/../pktbatch.h:34,
                 from drivers/../gate.h:42,
                 from drivers/../module.h:44,
                 from drivers/../port.h:44,
                 from drivers/unix_socket.h:42,
                 from drivers/unix_socket.cc:38:
drivers/../packet.h: In static member function ‘static void bess::Packet::Free(bess::Packet**, size_t)’:
drivers/../packet.h:346:23: error: ‘const class bess::Packet’ has no member named ‘refcnt’; did you mean ‘reset’?
                  pkt->refcnt() != 1)) {

错误显示error: ‘const class bess::Packet’ has no member named ‘refcnt’; did you mean ‘reset’?。我经过bess/core,找到了packet.ccpacket.h。实际上,我找不到refcnt()函数,并且uint16_t refcnt_;的私有字段中仅存在class Packet

您能对我的问题发表一些看法吗?

最良好的祝愿。

0 个答案:

没有答案