mos-stack / mOS-networking-stack

A Specialized Network Programming Library for Stateful Middleboxes:
http://mos.kaist.edu
Other
103 stars 21 forks source link

DBG_OPT flag cause compiling error #24

Closed Sen666666 closed 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,

I am assuming you found the fix for the reported problem. I tried compiling mOS with DBG_OPT flag, and the stack is compiling fine.