ns2.1b8a安装bluehoc bug问题汇总

linxiaoyuan@linxiaoyuan-virtual-machine:~/ns-allinone-2.1b8a$ sudo patch -p0 -b < bt_patch
patching file ns-2.1b8a/god.cc
patching file ns-2.1b8a/god.h
Hunk #2 FAILED at 86.
1 out of 2 hunks FAILED -- saving rejects to file ns-2.1b8a/god.h.rej
patching file ns-2.1b8a/tcl/lib/ns-default.tcl
patching file ns-2.1b8a/tcl/lib/ns-lib.tcl
Hunk #1 succeeded at 207 with fuzz 1 (offset 46 lines).
Hunk #2 FAILED at 195.
1 out of 2 hunks FAILED -- saving rejects to file ns-2.1b8a/tcl/lib/ns-lib.tcl.rej
patching file ns-2.1b8a/tcl/lib/ns-packet.tcl
patching file ns-2.1b8a/packet.h
patching file ns-2.1b8a/template.h
patching file ns-2.1b8a/trace.cc
patching file ns-2.1b8a/trace.h


手动对应的更改!
==============================


linxiaoyuan@linxiaoyuan-virtual-machine:~/ns-allinone-2.1b8a/ns-2.1b8a$
 sudo touch *.cc && make -j4
 
rm: cannot remove `ranvar.o': Permission denied
rm: rm: cannot remove `rng.o': Permission denied
make: *** [ranvar.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [rng.o] Error 1
cannot remove `random.o': Permission denied
make: *** [random.o] Error 1
rm: cannot remove `misc.o': Permission denied
make: *** [misc.o] Error 1




分开写


====
-Wwrite-strings]
In file included from bt-core.h:155:0,
                 from trace.h:47,
                 from classifier-bst.cc:36:
globals.h: At global scope:
globals.h:203:7: error: ‘string’ does not name a type
globals.h:204:7: error: ‘string’ does not name a type
In file included from bt-core.h:155:0,
                 from trace.h:47,
                 from classifier-bst.cc:36:
globals.h:205:7: error: ‘string’ does not name a type
In file included from trace.h:47:0,
                 from classifier-bst.cc:36:
bt-core.h:255:2: error: ‘vector’ does not name a type
bt-core.h:303:2: error: ‘queue’ does not name a type
bt-core.h:481:2: error: ‘list’ does not name a type
bt-core.h:482:2: error: ‘queue’ does not name a type
bt-core.h:612:2: error: ‘vector’ does not name a type
bt-core.h:616:2: error: ‘string’ does not name a type
bt-core.h:625:27: error: ‘vector’ has not been declared
bt-core.h:625:33: error: expected ‘,’ or ‘...’ before ‘<’ token
make: *** [classifier-bst.o] Error 1




编辑 globals.h文件
+using namespace std;


error: ‘string’ does not name a type
添加using std::string或者使用using namespace std;


================
In file included from cmu-trace.h:43:0,
                 from mac-tdma.cc:48:
god.h: At global scope:
god.h:88:14: error: extra qualification ‘vector_ns::’ on member ‘operator=’ [-fpermissive]
god.h:93:14: error: extra qualification ‘vector_ns::’ on member ‘operator+=’ [-fpermissive]
god.h:98:13: error: extra qualification ‘vector_ns::’ on member ‘operator==’ [-fpermissive]
god.h:101:13: error: extra qualification ‘vector_ns::’ on member ‘operator!=’ [-fpermissive]
make: *** [mac-tdma.o] Error 1


去掉对应的vector_ns::




================
make: *** [bt-drr.o] Error 1
bt-host.cc: In constructor ‘BTHost::BTHost()’:
bt-host.cc:176:28: error: array bound forbidden after parenthesized type-id
bt-host.cc:176:28: note: try removing the parentheses around the type-id
bt-host.cc:178:39: error: array bound forbidden after parenthesized type-id
bt-host.cc:178:39: note: try removing the parentheses around the type-id
bt-host.cc:186:21: error: array bound forbidden after parenthesized type-id
bt-host.cc:186:21: note: try removing the parentheses around the type-id
make: *** [bt-host.o] Error 1
root@linxiaoyuan-virtual-machin




三个都去掉对应的括号 即可。


====================
gs]
baseband.cc: In constructor ‘Baseband::Baseband()’:
baseband.cc:215:21: error: array bound forbidden after parenthesized type-id
baseband.cc:215:21: note: try removing the parentheses around the type-id
baseband.cc: In member function ‘virtual void RecvHandler::handle(Event*)’:
baseband.cc:913:96: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat]
baseband.cc:924:103: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat]
baseband.cc:939:97: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat]
baseband.cc:950:108: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long int’ [-Wformat]
baseband.cc:951:57: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat]
baseband.cc:962:107: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long int’ [-Wformat]
baseband.cc:974:102: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long int’ [-Wformat]
baseband.cc:1008:102: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long int’ [-Wformat]
baseband.cc:1033:114: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long int’ [-Wformat]
In file included from bt-def.h:147:0,
                 from bt-core.h:148,
                 from bt-host.cc:159:
packet.h: In constructor ‘p_info::p_info()’:
packet.h:153:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:154:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:155:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:156:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:157:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:158:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:159:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:160:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:161:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:162:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:163:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:164:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:165:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:166:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:167:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:168:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:169:25: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:170:29: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:171:29: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:172:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:174:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:175:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:176:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:177:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:178:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:179:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:181:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:182:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:183:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:184:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:185:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:186:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:187:27: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:188:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:189:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:190:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:191:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:192:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:193:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:194:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:196:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:197:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:199:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:200:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:201:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:204:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:207:26: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:210:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:213:33: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:216:25: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:219:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
packet.h:221:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
make: *** [baseband.o] Error 1
make: *** Waiting for unfinished jobs....
bt-drr.cc: In constructor ‘BT_DRRScheduler::BT_DRRScheduler()’:
bt-drr.cc:177:31: error: array bound forbidden after parenthesized type-id
bt-drr.cc:177:31: note: try removing the parentheses around the type-id
bt-drr.cc:179:23: error: array bound forbidden after parenthesized type-id
bt-drr.cc:179:23: note: try removing the parentheses around the type-id
make: *** [bt-drr.o] Error 1
bt-host.cc: In constructor ‘BTHost::BTHost()’:
bt-host.cc:176:28: error: array bound forbidden after parenthesized type-id
bt-host.cc:176:28: note: try removing the parentheses around the type-id
bt-host.cc:178:39: error: array bound forbidden after parenthesized type-id
bt-host.cc:178:39: note: try removing the parentheses around the type-id
bt-host.cc:186:21: error: array bound forbidden after parenthesized type-id
bt-host.cc:186:21: note: try removing the parentheses around the type-id
make: *** [bt-host.o] Error 1


baseband.cc:215  去掉括号


======================
config.h:99:0: warning: "STRTOI64_FMTSTR" redefined [enabled by default]
/home/linxiaoyuan/ns-allinone-2.1b8a/tclcl-1.18/tclcl-config.h:37:0: note: this is the location of the previous definition
bt-drr.cc: In constructor ‘BT_DRRScheduler::BT_DRRScheduler()’:
bt-drr.cc:177:31: error: array bound forbidden after parenthesized type-id
bt-drr.cc:177:31: note: try removing the parentheses around the type-id
bt-drr.cc:179:23: error: array bound forbidden after parenthesized type-id
bt-drr.cc:179:23: note: try removing the parentheses around the type-id
make: *** [bt-drr.o] Error 1
make: *** Waiting for unfinished jobs....
bt-host.cc: In constructor ‘BTHost::BTHost()’:
bt-host.cc:176:28: error: array bound forbidden after parenthesized type-id
bt-host.cc:176:28: note: try removing the parentheses around the type-id
bt-host.cc:178:39: error: array bound forbidden after parenthesized type-id
bt-host.cc:178:39: note: try removing the parentheses around the type-id
bt-host.cc:186:21: error: array bound forbidden after parenthesized type-id
bt-host.cc:186:21: note: try removing the parentheses around the type-id






l2cap.cc: In constructor ‘L2CAP::L2CAP()’:
l2cap.cc:176:40: error: array bound forbidden after parenthesized type-id
l2cap.cc:176:40: note: try removing the parentheses around the type-id
make: *** [l2cap.o] Error 1


===================




执行完毕:




[code omitted because of length]
: invalid command name "%source"
    while executing
"%source ../webcache/http-server.tcl"



























  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值