mtcp-stack / mtcp

mTCP: A Highly Scalable User-level TCP Stack for Multicore Systems
Other
1.98k stars 435 forks source link

DBG_OPT flag cause compiling error #241

Open Sen666666 opened 5 years ago

Sen666666 commented 5 years ago

Hi,

After running ./configure --with-dpdk-lib=$RTE_SDK/$RTE_TARGET , I uncomment DBG_OPT in mtcp/src/Makefile and run make to compile the mtcp and examples, but get compiling error below:

In file included from io_module.c:26:0: io_module.c: In function ‘probe_all_rte_devices’: ./include/debug.h:50:16: error: ‘mtcp’ undeclared (first use in this function) thread_printf(mtcp, mtcp->log_fp, "[%10s:%4d] " \ ^ io_module.c:130:4: note: in expansion of macro ‘TRACE_DBG’ TRACE_DBG("Could not find pci info on dpdk " ^~~~~ ./include/debug.h:50:16: note: each undeclared identifier is reported only once for each function it appears in thread_printf(mtcp, mtcp->log_fp, "[%10s:%4d] " \ ^ io_module.c:130:4: note: in expansion of macro ‘TRACE_DBG’ TRACE_DBG("Could not find pci info on dpdk " ^~~~~

Is there anything wrong?

btw, I run mtcp in my VMware virtual machine.

thanks in advance

ajamshed commented 5 years ago

@Sen666666 ,

Apologies for the delayed response and thanks for catching the compile-time error. I will patch up a fix in my next commit. In the mean time, can you please replace line 130 in mtcp/src/io_module.c from TRACE_DBG to TRACE_INFO for the time being. This should resolve compile-time errors.