Error with numbat and omnet4.2(.1)

225 views
Skip to first unread message

Si Chen

unread,
Feb 1, 2012, 1:05:51 AM2/1/12
to omn...@googlegroups.com
I have gone through this group for a wimax model, but haven't seen anyone with a successful experience yet.  Is inetmanet a better choice than numbat?

I am now troubled with the following error. Any help is appreciated! 
The message is below:

out/gcc-debug//xMIPv6/src/linklayer/ext/cSocketRTScheduler.o: In function `cSocketRTScheduler::endRun()':
/home/chensi/omnetpp-4.2.1/samples/numbat/xMIPv6/src/linklayer/ext/cSocketRTScheduler.cc:89: undefined reference to `pcap_stats'
/home/chensi/omnetpp-4.2.1/samples/numbat/xMIPv6/src/linklayer/ext/cSocketRTScheduler.cc:90: undefined reference to `pcap_geterr'
/home/chensi/omnetpp-4.2.1/samples/numbat/xMIPv6/src/linklayer/ext/cSocketRTScheduler.cc:93: undefined reference to `pcap_close'
out/gcc-debug//xMIPv6/src/linklayer/ext/cSocketRTScheduler.o: In function `cSocketRTScheduler::setInterfaceModule(cModule*, char const*, char const*)':
/home/chensi/omnetpp-4.2.1/samples/numbat/xMIPv6/src/linklayer/ext/cSocketRTScheduler.cc:124: undefined reference to `pcap_open_live'
/home/chensi/omnetpp-4.2.1/samples/numbat/xMIPv6/src/linklayer/ext/cSocketRTScheduler.cc:130: undefined reference to `pcap_compile'
/home/chensi/omnetpp-4.2.1/samples/numbat/xMIPv6/src/linklayer/ext/cSocketRTScheduler.cc:131: undefined reference to `pcap_geterr'
/home/chensi/omnetpp-4.2.1/samples/numbat/xMIPv6/src/linklayer/ext/cSocketRTScheduler.cc:134: undefined reference to `pcap_setfilter'
/home/chensi/omnetpp-4.2.1/samples/numbat/xMIPv6/src/linklayer/ext/cSocketRTScheduler.cc:135: undefined reference to `pcap_geterr'
/home/chensi/omnetpp-4.2.1/samples/numbat/xMIPv6/src/linklayer/ext/cSocketRTScheduler.cc:137: undefined reference to `pcap_datalink'
/home/chensi/omnetpp-4.2.1/samples/numbat/xMIPv6/src/linklayer/ext/cSocketRTScheduler.cc:138: undefined reference to `pcap_geterr'
/home/chensi/omnetpp-4.2.1/samples/numbat/xMIPv6/src/linklayer/ext/cSocketRTScheduler.cc:141: undefined reference to `pcap_setnonblock'
out/gcc-debug//xMIPv6/src/linklayer/ext/cSocketRTScheduler.o: In function `cSocketRTScheduler::receiveWithTimeout()':
/home/chensi/omnetpp-4.2.1/samples/numbat/xMIPv6/src/linklayer/ext/cSocketRTScheduler.cc:250: undefined reference to `pcap_dispatch'
/home/chensi/omnetpp-4.2.1/samples/numbat/xMIPv6/src/linklayer/ext/cSocketRTScheduler.cc:251: undefined reference to `pcap_geterr'
collect2: ld returned 1 exit status
make: *** [out/gcc-debug//numbat] Error 1

pcap.h is included by "#include <pcap.h>"

I'm using the latest numbat and have libpcap-dev installed. I haven't changed anything with omnet or numbat. 

I tried changing HAVE_PCAP in makefrag file, but same error occurs.

Si Chen

unread,
Feb 1, 2012, 11:14:08 AM2/1/12
to omn...@googlegroups.com
OK. after I commented out stuff between #ifden HAVE_PCAP and #endif, it compiled.

Bernardo B, Mejia Huerta

unread,
Feb 1, 2012, 1:17:18 PM2/1/12
to omnetpp
Are you able to run any simulation using Numbat? I've never been able
to.

Blair

unread,
Feb 19, 2012, 6:53:04 AM2/19/12
to omn...@googlegroups.com
Hi Chen si,

How's going with your numbat? I am also trying it to simulate WiMAX. But I noticed that it was developed based on 802.16e-2005. The model i wanna use, however, is 802.16j-2009 which supports multi-hop relay. Besides, I am using Mac and still cannot compile numbat successfully on mac lion... I have no idea where to go. Is inetmanet a better choice?

Hopefully we could help each other to get out of this.

Regards,

Blair

pintu karn

unread,
May 2, 2012, 11:35:48 PM5/2/12
to omn...@googlegroups.com

 Dear sir

 i have got the same error(i.e undefined reference to 'pcap_geterr') while simulating NUMBAT on OMNETPP-4.1. so please give me some idea to remove the error

regard
Pintu
Message has been deleted

Mohammad Zulqarnain

unread,
Jun 1, 2012, 2:59:48 AM6/1/12
to omn...@googlegroups.com


sir i am using numbat for using wimax in mu final year project but i am facing problems in importing 3 ned files in it namely

MAC.ned
common.ned
and internet.ned

can you please help me with this or mention any other wimax module present for omnet 4.2 

Kentaroh Toyoda

unread,
Jan 16, 2013, 9:56:57 AM1/16/13
to omn...@googlegroups.com
Hi, all

I've met same error output but I altered "rebuild-makefiles" file as follows. 
Then, I re-commanded "./rebuild-makefiles" and "make" and it works.

#!/bin/bash
opp_makemake -f --deep -X obsolete -X xMIPv6/obsolete -X xMIPv6/doc -X xMIPv6/examples -X xMIPv6/tests -X results -X scripts -X doc -X out -O numbat -lpcap -o numbat_out

The solution is to add "-lpcap" option.
The last option "-o numbat_out" is to avoid "make" from trying to overwrite the directory "numbat".

2012年6月1日金曜日 15時59分48秒 UTC+9 Mohammad Zulqarnain:
Reply all
Reply to author
Forward
0 new messages