我试图从网站netdb.cis.upenn.edu/rapidnet/安装rapidnet,然后按照github https://github.com/netdb2017/rapidnet_v1.0的说明操作,但是仍然遇到一些错误,因为Script.py应该是Python.py(在github链接中提到)以及我使用命令解决的一些其他问题
sudo apt-get install libboost-all-dev libssl-dev
然而它有一些flex-lexer的问题我认为哪个是提到的 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=812974
并收到错误
/usr/include/FlexLexer.h:160:7:注意:候选人:无效 yyFlexLexer :: yy_init_buffer(yy_buffer_state *,std :: istream&) void yy_init_buffer(struct yy_buffer_state * b,FLEX_STD istream& s);
完整的错误详情如下
[743/947] cxx: src/rapidnet-compiler/ol-lexer.cc -> build/debug/src/rapidnet-compiler/ol-lexer_1.o
[745/947] cxx: src/rapidnet-compiler/table-store.cc -> build/debug/src/rapidnet-compiler/table-store_1.o
[746/947] cxx: src/rapidnet-compiler/all-values.cc -> build/debug/src/rapidnet-compiler/all-values_1.o
[747/947] cxx: src/rapidnet-compiler/parser-util.cc -> build/debug/src/rapidnet-compiler/parser-util_1.o
src/rapidnet-compiler/ol-lexer.cc: In member function ‘int ns3::rapidnet_compiler::OlLexer::yylex(YYSTYPE*, ns3::rapidnet_compiler::OlContext*)’:
src/rapidnet-compiler/ol-lexer.cc:765:9: error: no match for ‘operator=’ (operand types are ‘std::istream {aka std::basic_istream<char>}’ and ‘std::istream* {aka std::basic_istream<char>*}’)
In file included from /usr/include/c++/5/iostream:40:0,
from src/rapidnet-compiler/ol-lexer.cc:95:
/usr/include/c++/5/istream:58:11: note: candidate: std::basic_istream<char>& std::basic_istream<char>::operator=(const std::basic_istream<char>&)
class basic_istream : virtual public basic_ios<_CharT, _Traits>
^
/usr/include/c++/5/istream:58:11: note: no known conversion for argument 1 from ‘std::istream* {aka std::basic_istream<char>*}’ to ‘const std::basic_istream<char>&’
src/rapidnet-compiler/ol-lexer.cc:768:10: error: no match for ‘operator=’ (operand types are ‘std::ostream {aka std::basic_ostream<char>}’ and ‘std::ostream* {aka std::basic_ostream<char>*}’)
In file included from /usr/include/c++/5/iostream:39:0,
from src/rapidnet-compiler/ol-lexer.cc:95:
/usr/include/c++/5/ostream:58:11: note: candidate: std::basic_ostream<char>& std::basic_ostream<char>::operator=(const std::basic_ostream<char>&)
class basic_ostream : virtual public basic_ios<_CharT, _Traits>
^
/usr/include/c++/5/ostream:58:11: note: no known conversion for argument 1 from ‘std::ostream* {aka std::basic_ostream<char>*}’ to ‘const std::basic_ostream<char>&’
src/rapidnet-compiler/ol-lexer.cc:1312:46: error: invalid user-defined conversion from ‘std::istream {aka std::basic_istream<char>}’ to ‘std::istream* {aka std::basic_istream<char>*}’ [-fpermissive]
In file included from /usr/include/c++/5/ios:44:0,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from src/rapidnet-compiler/ol-lexer.cc:95:
/usr/include/c++/5/bits/basic_ios.h:120:7: note: candidate is: std::basic_ios<_CharT, _Traits>::operator void*() const [with _CharT = char; _Traits = std::char_traits<char>] <near match>
operator void*() const
^
/usr/include/c++/5/bits/basic_ios.h:120:7: note: no known conversion from ‘void*’ to ‘std::istream* {aka std::basic_istream<char>*}’
In file included from /usr/include/c++/5/iostream:40:0,
from src/rapidnet-compiler/ol-lexer.cc:95:
/usr/include/c++/5/istream: In constructor ‘OLBaseFlexLexer::OLBaseFlexLexer(std::istream*, std::ostream*)’:
/usr/include/c++/5/istream:606:7: error: ‘std::basic_istream<_CharT, _Traits>::basic_istream() [with _CharT = char; _Traits = std::char_traits<char>]’ is protected
basic_istream()
^
src/rapidnet-compiler/ol-lexer.cc:1422:75: error: within this context
In file included from /usr/include/c++/5/iostream:39:0,
from src/rapidnet-compiler/ol-lexer.cc:95:
/usr/include/c++/5/ostream:384:7: error: ‘std::basic_ostream<_CharT, _Traits>::basic_ostream() [with _CharT = char; _Traits = std::char_traits<char>]’ is protected
basic_ostream()
^
src/rapidnet-compiler/ol-lexer.cc:1422:75: error: within this context
src/rapidnet-compiler/ol-lexer.cc:1424:7: error: no match for ‘operator=’ (operand types are ‘std::istream {aka std::basic_istream<char>}’ and ‘std::istream* {aka std::basic_istream<char>*}’)
In file included from /usr/include/c++/5/iostream:40:0,
from src/rapidnet-compiler/ol-lexer.cc:95:
/usr/include/c++/5/istream:58:11: note: candidate: std::basic_istream<char>& std::basic_istream<char>::operator=(const std::basic_istream<char>&)
class basic_istream : virtual public basic_ios<_CharT, _Traits>
^
/usr/include/c++/5/istream:58:11: note: no known conversion for argument 1 from ‘std::istream* {aka std::basic_istream<char>*}’ to ‘const std::basic_istream<char>&’
src/rapidnet-compiler/ol-lexer.cc:1425:8: error: no match for ‘operator=’ (operand types are ‘std::ostream {aka std::basic_ostream<char>}’ and ‘std::ostream* {aka std::basic_ostream<char>*}’)
In file included from /usr/include/c++/5/iostream:39:0,
from src/rapidnet-compiler/ol-lexer.cc:95:
/usr/include/c++/5/ostream:58:11: note: candidate: std::basic_ostream<char>& std::basic_ostream<char>::operator=(const std::basic_ostream<char>&)
class basic_ostream : virtual public basic_ios<_CharT, _Traits>
^
/usr/include/c++/5/ostream:58:11: note: no known conversion for argument 1 from ‘std::ostream* {aka std::basic_ostream<char>*}’ to ‘const std::basic_ostream<char>&’
src/rapidnet-compiler/ol-lexer.cc: In member function ‘virtual void OLBaseFlexLexer::switch_streams(std::istream*, std::ostream*)’:
src/rapidnet-compiler/ol-lexer.cc:1471:9: error: no match for ‘operator=’ (operand types are ‘std::ostream {aka std::basic_ostream<char>}’ and ‘std::ostream* {aka std::basic_ostream<char>*}’)
In file included from /usr/include/c++/5/iostream:39:0,
from src/rapidnet-compiler/ol-lexer.cc:95:
/usr/include/c++/5/ostream:58:11: note: candidate: std::basic_ostream<char>& std::basic_ostream<char>::operator=(const std::basic_ostream<char>&)
class basic_ostream : virtual public basic_ios<_CharT, _Traits>
^
/usr/include/c++/5/ostream:58:11: note: no known conversion for argument 1 from ‘std::ostream* {aka std::basic_ostream<char>*}’ to ‘const std::basic_ostream<char>&’
src/rapidnet-compiler/ol-lexer.cc: In member function ‘virtual int OLBaseFlexLexer::LexerInput(char*, int)’:
src/rapidnet-compiler/ol-lexer.cc:1480:11: error: base operand of ‘->’ has non-pointer type ‘std::istream {aka std::basic_istream<char>}’
src/rapidnet-compiler/ol-lexer.cc:1480:26: error: base operand of ‘->’ has non-pointer type ‘std::istream {aka std::basic_istream<char>}’
src/rapidnet-compiler/ol-lexer.cc:1484:6: error: base operand of ‘->’ has non-pointer type ‘std::istream {aka std::basic_istream<char>}’
src/rapidnet-compiler/ol-lexer.cc:1486:11: error: base operand of ‘->’ has non-pointer type ‘std::istream {aka std::basic_istream<char>}’
src/rapidnet-compiler/ol-lexer.cc:1489:11: error: base operand of ‘->’ has non-pointer type ‘std::istream {aka std::basic_istream<char>}’
src/rapidnet-compiler/ol-lexer.cc: In member function ‘virtual void OLBaseFlexLexer::LexerOutput(const char*, int)’:
src/rapidnet-compiler/ol-lexer.cc:1506:14: error: base operand of ‘->’ has non-pointer type ‘std::ostream {aka std::basic_ostream<char>}’
src/rapidnet-compiler/ol-lexer.cc: In member function ‘virtual void OLBaseFlexLexer::yyrestart(std::istream*)’:
src/rapidnet-compiler/ol-lexer.cc:1800:48: error: no matching function for call to ‘OLBaseFlexLexer::yy_init_buffer(yy_buffer_state*, std::istream*&)’
In file included from src/rapidnet-compiler/ol-lexer.cc:326:0:
/usr/include/FlexLexer.h:160:7: note: candidate: void OLBaseFlexLexer::yy_init_buffer(yy_buffer_state*, std::istream&)
void yy_init_buffer( struct yy_buffer_state* b, FLEX_STD istream& s );
^
/usr/include/FlexLexer.h:160:7: note: no known conversion for argument 2 from ‘std::istream* {aka std::basic_istream<char>*}’ to ‘std::istream& {aka std::basic_istream<char>&}’
src/rapidnet-compiler/ol-lexer.cc: In member function ‘void OLBaseFlexLexer::yy_load_buffer_state()’:
src/rapidnet-compiler/ol-lexer.cc:1843:7: error: no match for ‘operator=’ (operand types are ‘std::istream {aka std::basic_istream<char>}’ and ‘std::istream* {aka std::basic_istream<char>*}’)
In file included from /usr/include/c++/5/iostream:40:0,
from src/rapidnet-compiler/ol-lexer.cc:95:
/usr/include/c++/5/istream:58:11: note: candidate: std::basic_istream<char>& std::basic_istream<char>::operator=(const std::basic_istream<char>&)
class basic_istream : virtual public basic_ios<_CharT, _Traits>
^
/usr/include/c++/5/istream:58:11: note: no known conversion for argument 1 from ‘std::istream* {aka std::basic_istream<char>*}’ to ‘const std::basic_istream<char>&’
src/rapidnet-compiler/ol-lexer.cc: In member function ‘virtual yy_buffer_state* OLBaseFlexLexer::yy_create_buffer(std::istream*, int)’:
src/rapidnet-compiler/ol-lexer.cc:1872:26: error: no matching function for call to ‘OLBaseFlexLexer::yy_init_buffer(yy_buffer_state*&, std::istream*&)’
In file included from src/rapidnet-compiler/ol-lexer.cc:326:0:
/usr/include/FlexLexer.h:160:7: note: candidate: void OLBaseFlexLexer::yy_init_buffer(yy_buffer_state*, std::istream&)
void yy_init_buffer( struct yy_buffer_state* b, FLEX_STD istream& s );
^
/usr/include/FlexLexer.h:160:7: note: no known conversion for argument 2 from ‘std::istream* {aka std::basic_istream<char>*}’ to ‘std::istream& {aka std::basic_istream<char>&}’
src/rapidnet-compiler/ol-lexer.cc: At global scope:
src/rapidnet-compiler/ol-lexer.cc:23:25: error: prototype for ‘void OLBaseFlexLexer::yy_init_buffer(YY_BUFFER_STATE, std::istream*)’ does not match any in class ‘OLBaseFlexLexer’
src/rapidnet-compiler/ol-lexer.cc:1902:10: note: in expansion of macro ‘yyFlexLexer’
In file included from src/rapidnet-compiler/ol-lexer.cc:326:0:
/usr/include/FlexLexer.h:160:7: error: candidate is: void OLBaseFlexLexer::yy_init_buffer(yy_buffer_state*, std::istream&)
void yy_init_buffer( struct yy_buffer_state* b, FLEX_STD istream& s );
^
Waf: Leaving directory `/home/ali/Downloads/rapidnet_v1.0-master/build'
Build failed
-> task failed (err #1):
{task: cxx ol-lexer.cc -> ol-lexer_1.o}
我不知道如何处理它。任何人都可以帮我解决这个错误吗?