2017-07-28 81 views
0

我試圖從網站netdb.cis.upenn.edu/rapidnet/安裝rapidnet,然後按照github https://github.com/netdb2017/rapidnet_v1.0的說明安裝,但是仍然面臨着一些錯誤,因爲Script.py應該是Python.py(在github上的鏈接提到的)和我使用的命令構建rapidnet刺激器的Flex-lexer錯誤

解決了一些其他問題

命令和apt-get安裝的libboost-ALL-dev的的libssl-dev的

但是它有一些問題,彎曲 - 我覺得這是在 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的&) 無效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} 

我不知道做什麼用it.Can任何人幫我解決這個問題?

回答

1

這是一個Flex版本問題。在此patchistream*更改爲istream&。我猜RapidNet是在老版本的Flex上開發的,所以假設yyin被聲明爲istream*

我的解決方案:用我的機器中的/usr/include/FlexLexer.h替換此舊版本的file

(感謝Harshal Lehri,他是RapidNet的貢獻者之一,我給他發了電子郵件,他指了指該文件。)