Closed OthmanLoutfi closed 1 year ago
Hi, could you please prove the full error report so that I could tell what's going on?
I am ommitting all the warnings because the report gets too long, here are the errors:
In file included from /usr/include/c++/9/fstream:42,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/x86_64-linux-gnu/c++/9/bits/basic_file.h: At global scope:
/usr/include/x86_64-linux-gnu/c++/9/bits/basic_file.h:85:32: error: ‘ios_base’ has not been declared
85 | open(const char __name, ios_base::openmode mode, int prot = 0664);
| ^~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/basic_file.h:85:51: error: expected ‘,’ or ‘...’ before ‘__mode’
85 | open(const char name, ios_base::openmode mode, int prot = 0664);
| ^~
/usr/include/x86_64-linux-gnu/c++/9/bits/basic_file.h:93:34: error: ‘ios_base’ has not been declared
93 | sys_open(__c_file* file, ios_base::openmode);
| ^~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/basic_file.h:96:26: error: ‘ios_base’ has not been declared
96 | sys_open(int fd, ios_base::openmode mode) throw ();
| ^~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/basic_file.h:96:45: error: expected ‘,’ or ‘...’ before ‘mode’
96 | sys_open(int fd, ios_base::openmode mode) throw ();
| ^~
/usr/include/x86_64-linux-gnu/c++/9/bits/basic_file.h:112:7: error: ‘streamsize’ does not name a type
112 | streamsize
| ^~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/basic_file.h:115:7: error: ‘streamsize’ does not name a type
115 | streamsize
| ^~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/basic_file.h:119:7: error: ‘streamsize’ does not name a type
119 | streamsize
| ^~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/basic_file.h:122:7: error: ‘streamoff’ does not name a type
122 | streamoff
| ^~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/basic_file.h:128:7: error: ‘streamsize’ does not name a type
128 | streamsize
| ^~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/basic_file.h: In member function ‘void ORB_SLAM3::std::basic_file~~~~
In file included from /usr/include/c++/9/fstream:1293,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/bits/fstream.tcc:64:40: error: invalid use of incomplete type ‘class ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>’
64 | _M_destroy_internal_buffer() throw()
| ^
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/fstream:80:11: note: declaration of ‘class ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>’
80 | class basic_filebuf : public basic_streambuf<_CharT, _Traits>
| ^~~~~
In file included from /usr/include/c++/9/fstream:1293,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/bits/fstream.tcc:81:19: error: invalid use of incomplete type ‘class ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>’
81 | basic_filebuf() : streambuf_type(), _M_lock(), _M_file(&_M_lock),
| ^
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/fstream:80:11: note: declaration of ‘class ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>’
80 | class basic_filebuf : public basic_streambuf<_CharT, _Traits>
| ^~~~~
In file included from /usr/include/c++/9/fstream:1293,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/bits/fstream.tcc:96:18: error: expected constructor, destructor, or type conversion before ‘(’ token
96 | basic_filebuf(basic_filebuf&& __rhs)
| ^
/usr/include/c++/9/bits/fstream.tcc:125:15: error: declaration of ‘operator=’ as non-function
125 | operator=(basic_filebuf&& rhs)
| ^~~~~
/usr/include/c++/9/bits/fstream.tcc:125:28: error: missing template arguments before ‘&&’ token
125 | operator=(basic_filebuf&& rhs)
| ^~
/usr/include/c++/9/bits/fstream.tcc:125:31: error: ‘rhs’ was not declared in this scope
125 | operator=(basic_filebuf&& rhs)
| ^~~~~
/usr/include/c++/9/bits/fstream.tcc:154:10: error: variable or field ‘swap’ declared void
154 | swap(basic_filebuf& __rhs)
| ^~~~~
/usr/include/c++/9/bits/fstream.tcc:154:23: error: missing template arguments before ‘&’ token
154 | swap(basic_filebuf& rhs)
| ^
/usr/include/c++/9/bits/fstream.tcc:154:25: error: ‘rhs’ was not declared in this scope
154 | swap(basic_filebuf& __rhs)
| ^~~~~
/usr/include/c++/9/bits/fstream.tcc:180:27: error: ‘ios_base’ has not been declared
180 | open(const char* s, ios_base::openmode mode)
| ^~~~
/usr/include/c++/9/bits/fstream.tcc:180:46: error: expected ‘,’ or ‘...’ before ‘mode’
180 | open(const char __s, ios_base::openmode __mode)
| ^~
/usr/include/c++/9/bits/fstream.tcc:180:52: error: invalid use of incomplete type ‘class ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>’
180 | open(const char s, ios_base::openmode mode)
| ^
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/fstream:80:11: note: declaration of ‘class ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>’
80 | class basic_filebuf : public basic_streambuf<_CharT, _Traits>
| ^~~~~
In file included from /usr/include/c++/9/fstream:1293,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/bits/fstream.tcc:250:11: error: invalid use of incomplete type ‘class ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>’
250 | close()
| ^
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/fstream:80:11: note: declaration of ‘class ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>’
80 | class basic_filebuf : public basic_streambuf<_CharT, _Traits>
| ^~~~~
In file included from /usr/include/c++/9/fstream:1293,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/bits/fstream.tcc:296:5: error: ‘streamsize’ does not name a type
296 | streamsize
| ^~~~~~
/usr/include/c++/9/bits/fstream.tcc:324:15: error: invalid use of incomplete type ‘class ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>’
324 | underflow()
| ^
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/fstream:80:11: note: declaration of ‘class ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>’
80 | class basic_filebuf : public basic_streambuf<_CharT, _Traits>
| ^~~~~
In file included from /usr/include/c++/9/fstream:1293,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/bits/fstream.tcc:483:15: error: template definition of non-template ‘typename ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>::int_type ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>::pbackfail’
483 | pbackfail(int_type i)
| ^~~~
/usr/include/c++/9/bits/fstream.tcc:483:15: error: ‘int_type’ was not declared in this scope
/usr/include/c++/9/bits/fstream.tcc:542:14: error: template definition of non-template ‘typename ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>::int_type ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>::overflow’
542 | overflow(int_type c)
| ^~~~
/usr/include/c++/9/bits/fstream.tcc:542:14: error: ‘int_type’ was not declared in this scope
/usr/include/c++/9/bits/fstream.tcc:607:44: error: ‘streamsize’ has not been declared
607 | _M_convert_to_external(_CharT ibuf, streamsize ilen)
| ^~~~~~
/usr/include/c++/9/bits/fstream.tcc:607:61: error: invalid use of incomplete type ‘class ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>’
607 | _M_convert_to_external(_CharT ibuf, streamsize ilen)
| ^
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/fstream:80:11: note: declaration of ‘class ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>’
80 | class basic_filebuf : public basic_streambuf<_CharT, _Traits>
| ^~~~~
In file included from /usr/include/c++/9/fstream:1293,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/bits/fstream.tcc:668:5: error: ‘streamsize’ does not name a type
668 | streamsize
| ^~~~~~
/usr/include/c++/9/bits/fstream.tcc:754:5: error: ‘streamsize’ does not name a type
754 | streamsize
| ^~~~~~
/usr/include/c++/9/bits/fstream.tcc:804:12: error: template definition of non-template ‘typename ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>::streambuf_type ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>::setbuf’
804 | setbuf(char_type s, streamsize n)
| ^~~~~
/usr/include/c++/9/bits/fstream.tcc:804:12: error: ‘char_type’ was not declared in this scope
/usr/include/c++/9/bits/fstream.tcc:804:23: error: ‘__s’ was not declared in this scope
804 | setbuf(char_type* s, streamsize n)
| ^~~
/usr/include/c++/9/bits/fstream.tcc:804:28: error: ‘streamsize’ was not declared in this scope; did you mean ‘std::streamsize’?
804 | setbuf(char_type* s, streamsize n)
| ^~~~~~
| std::streamsize
In file included from /usr/include/c++/9/bits/char_traits.h:40,
from /usr/include/c++/9/string:40,
from /home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:4,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/usr/include/c++/9/bits/postypes.h:98:21: note: ‘std::streamsize’ declared here
98 | typedef ptrdiff_t streamsize; // Signed integral type
| ^~~~~~
In file included from /usr/include/c++/9/fstream:1293,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/bits/fstream.tcc:833:13: error: template definition of non-template ‘typename ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>::pos_type ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>::seekoff’
833 | seekoff(off_type off, ios_base::seekdir way, ios_base::openmode)
| ^~~~
/usr/include/c++/9/bits/fstream.tcc:833:13: error: ‘off_type’ was not declared in this scope; did you mean ‘off_t’?
833 | seekoff(off_type off, ios_base::seekdir way, ios_base::openmode)
| ^~~~
| off_t
/usr/include/c++/9/bits/fstream.tcc:833:29: error: ‘ios_base’ has not been declared
833 | seekoff(off_type off, ios_base::seekdir way, ios_base::openmode)
| ^~~~
/usr/include/c++/9/bits/fstream.tcc:833:54: error: ‘ios_base’ has not been declared
833 | seekoff(off_type __off, ios_base::seekdir way, ios_base::openmode)
| ^~~~
/usr/include/c++/9/bits/fstream.tcc:893:13: error: template definition of non-template ‘typename ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>::pos_type ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>::seekpos’
893 | seekpos(pos_type pos, ios_base::openmode)
| ^~~~
/usr/include/c++/9/bits/fstream.tcc:893:13: error: ‘pos_type’ was not declared in this scope
/usr/include/c++/9/bits/fstream.tcc:893:29: error: ‘ios_base’ has not been declared
893 | seekpos(pos_type pos, ios_base::openmode)
| ^~~~
/usr/include/c++/9/bits/fstream.tcc:908:13: error: template definition of non-template ‘typename ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>::pos_type ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>::_M_seek’
908 | _M_seek(off_type off, ios_base::seekdir way, state_type state)
| ^~~~
/usr/include/c++/9/bits/fstream.tcc:908:13: error: ‘off_type’ was not declared in this scope; did you mean ‘off_t’?
908 | _M_seek(off_type off, ios_base::seekdir way, state_type state)
| ^~~~
| off_t
/usr/include/c++/9/bits/fstream.tcc:908:29: error: ‘ios_base’ has not been declared
908 | _M_seek(off_type off, ios_base::seekdir way, state_type state)
| ^~~~
/usr/include/c++/9/bits/fstream.tcc:908:54: error: ‘state_type’ was not declared in this scope
908 | _M_seek(off_type off, ios_base::seekdir way, state_type state)
| ^~~~
/usr/include/c++/9/bits/fstream.tcc:933:20: error: template definition of non-template ‘int ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>::_M_get_ext_pos’
933 | _M_get_ext_pos(state_type& state)
| ^~~~
/usr/include/c++/9/bits/fstream.tcc:933:20: error: ‘state_type’ was not declared in this scope
/usr/include/c++/9/bits/fstream.tcc:933:34: error: ‘state’ was not declared in this scope
933 | _M_get_ext_pos(state_type& state)
| ^~~
/usr/include/c++/9/bits/fstream.tcc:952:25: error: invalid use of incomplete type ‘class ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>’
952 | _M_terminate_output()
| ^
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/fstream:80:11: note: declaration of ‘class ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>’
80 | class basic_filebuf : public basic_streambuf<_CharT, _Traits>
| ^~~~~
In file included from /usr/include/c++/9/fstream:1293,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/bits/fstream.tcc:1013:10: error: invalid use of incomplete type ‘class ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>’
1013 | sync()
| ^
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/fstream:80:11: note: declaration of ‘class ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>’
80 | class basic_filebuf : public basic_streambuf<_CharT, _Traits>
| ^~~~~
In file included from /usr/include/c++/9/fstream:1293,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/bits/fstream.tcc:1030:17: error: ‘locale’ does not name a type; did you mean ‘locale_t’?
1030 | imbue(const locale& loc)
| ^~
| locale_t
/usr/include/c++/9/bits/fstream.tcc:1030:30: error: invalid use of incomplete type ‘class ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>’
1030 | imbue(const locale& loc)
| ^
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/fstream:80:11: note: declaration of ‘class ORB_SLAM3::std::basic_filebuf<_CharT, _Traits>’
80 | class basic_filebuf : public basic_streambuf<_CharT, _Traits>
| ^~~~~
In file included from /usr/include/c++/9/fstream:1293,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/bits/fstream.tcc:1086:43: error: wrong number of template arguments (1, should be 2)
1086 | extern template class basic_filebuf~~~~
In file included from /usr/include/c++/9/fstream:1293,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/bits/fstream.tcc:1087:44: error: wrong number of template arguments (1, should be 2)
1087 | extern template class basic_ifstream~~~~~
In file included from /usr/include/c++/9/fstream:1293,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/bits/fstream.tcc:1088:44: error: wrong number of template arguments (1, should be 2)
1088 | extern template class basic_ofstream~~~~~
In file included from /usr/include/c++/9/fstream:1293,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/bits/fstream.tcc:1089:43: error: wrong number of template arguments (1, should be 2)
1089 | extern template class basic_fstream~~~~
In file included from /usr/include/c++/9/fstream:1293,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/bits/fstream.tcc:1092:46: error: wrong number of template arguments (1, should be 2)
1092 | extern template class basic_filebuf~~~~
In file included from /usr/include/c++/9/fstream:1293,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/bits/fstream.tcc:1093:47: error: wrong number of template arguments (1, should be 2)
1093 | extern template class basic_ifstream~~~~~
In file included from /usr/include/c++/9/fstream:1293,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/bits/fstream.tcc:1094:47: error: wrong number of template arguments (1, should be 2)
1094 | extern template class basic_ofstream~~~~~
In file included from /usr/include/c++/9/fstream:1293,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7:
/usr/include/c++/9/bits/fstream.tcc:1095:46: error: wrong number of template arguments (1, should be 2)
1095 | extern template class basic_fstream~~~~
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:8:
/usr/include/x86_64-linux-gnu/NvOnnxParser.h:47:14: error: ‘pair’ in namespace ‘ORB_SLAM3::std’ does not name a template type
47 | typedef std::pair<std::vector~
/usr/include/x86_64-linux-gnu/NvOnnxParser.h:169:32: error: ‘SubGraphCollection_t’ has not been declared
169 | SubGraphCollection_t& sub_graph_collection,
| ^~~~~~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc: In member function ‘virtual void ORB_SLAM3::RTLogger::log(nvinfer1::ILogger::Severity, const AsciiChar*)’:
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:22:18: error: ‘cerr’ is not a member of ‘ORB_SLAM3::std’; did you mean ‘std::cerr’?
22 | std::cerr << "INTERNAL_ERROR";
| ^~~~
In file included from /home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:6,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/usr/include/c++/9/iostream:62:18: note: ‘std::cerr’ declared here
62 | extern ostream cerr; /// Linked to standard error (unbuffered)
| ^~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:25:18: error: ‘cerr’ is not a member of ‘ORB_SLAM3::std’; did you mean ‘std::cerr’?
25 | std::cerr << "ERROR";
| ^~~~
In file included from /home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:6,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/usr/include/c++/9/iostream:62:18: note: ‘std::cerr’ declared here
62 | extern ostream cerr; /// Linked to standard error (unbuffered)
| ^~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:28:18: error: ‘cerr’ is not a member of ‘ORB_SLAM3::std’; did you mean ‘std::cerr’?
28 | std::cerr << "WARNING";
| ^~~~
In file included from /home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:6,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/usr/include/c++/9/iostream:62:18: note: ‘std::cerr’ declared here
62 | extern ostream cerr; /// Linked to standard error (unbuffered)
| ^~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:31:18: error: ‘cerr’ is not a member of ‘ORB_SLAM3::std’; did you mean ‘std::cerr’?
31 | std::cerr << "INFO";
| ^~~~
In file included from /home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:6,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/usr/include/c++/9/iostream:62:18: note: ‘std::cerr’ declared here
62 | extern ostream cerr; /// Linked to standard error (unbuffered)
| ^~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:34:18: error: ‘cerr’ is not a member of ‘ORB_SLAM3::std’; did you mean ‘std::cerr’?
34 | std::cerr << "VERBOSE";
| ^~~~
In file included from /home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:6,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/usr/include/c++/9/iostream:62:18: note: ‘std::cerr’ declared here
62 | extern ostream cerr; /// Linked to standard error (unbuffered)
| ^~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:37:10: error: ‘cerr’ is not a member of ‘ORB_SLAM3::std’; did you mean ‘std::cerr’?
37 | std::cerr << ": " << msg << endl;
| ^~~~
In file included from /home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:6,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/usr/include/c++/9/iostream:62:18: note: ‘std::cerr’ declared here
62 | extern ostream cerr; /// Linked to standard error (unbuffered)
| ^~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:37:33: error: ‘endl’ was not declared in this scope; did you mean ‘std::endl’?
37 | std::cerr << ": " << msg << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/9/iostream:39,
from /home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:6,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/usr/include/c++/9/ostream:599:5: note: ‘std::endl’ declared here
599 | endl(basic_ostream<_CharT, _Traits>& ~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:40:1: error: no declaration matches ‘ORB_SLAM3::HFNetRTModel::HFNetRTModel(const int&, ORB_SLAM3::ModelDetectionMode, cv::Vec4i)’
40 | HFNetRTModel::HFNetRTModel(const std::string &strModelDir, ModelDetectionMode mode, const cv::Vec4i inputShape)
| ^~~~
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:38:7: note: candidates are: ‘ORB_SLAM3::HFNetRTModel::HFNetRTModel(const ORB_SLAM3::HFNetRTModel&)’
38 | class HFNetRTModel : public BaseModel
| ^~~~
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:41:5: note: ‘ORB_SLAM3::HFNetRTModel::HFNetRTModel(const string&, ORB_SLAM3::ModelDetectionMode, cv::Vec4i)’
41 | HFNetRTModel(const std::string &strModelDir, ModelDetectionMode mode, const cv::Vec4i inputShape);
| ^~~~
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:38:7: note: ‘class ORB_SLAM3::HFNetRTModel’ defined here
38 | class HFNetRTModel : public BaseModel
| ^~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:83:54: error: ‘ORB_SLAM3::std::vector’ has not been declared
83 | bool HFNetRTModel::Detect(const cv::Mat &image, std::vector~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:83:60: error: expected ‘,’ or ‘...’ before ‘<’ token
83 | bool HFNetRTModel::Detect(const cv::Mat &image, std::vector~~~
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:50:10: note: candidates are: ‘virtual bool ORB_SLAM3::HFNetRTModel::Detect(const cv::Mat&, cv::Mat&)’
50 | bool Detect(const cv::Mat &intermediate, cv::Mat &globalDescriptors) override;
| ^~
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:47:10: note: ‘virtual bool ORB_SLAM3::HFNetRTModel::Detect(const cv::Mat&, std::vector~
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:44:10: note: ‘virtual bool ORB_SLAM3::HFNetRTModel::Detect(const cv::Mat&, std::vector~
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:38:7: note: ‘class ORB_SLAM3::HFNetRTModel’ defined here
38 | class HFNetRTModel : public BaseModel
| ^~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:99:54: error: ‘ORB_SLAM3::std::vector’ has not been declared
99 | bool HFNetRTModel::Detect(const cv::Mat &image, std::vector~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:99:60: error: expected ‘,’ or ‘...’ before ‘<’ token
99 | bool HFNetRTModel::Detect(const cv::Mat &image, std::vector~~~
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:50:10: note: candidates are: ‘virtual bool ORB_SLAM3::HFNetRTModel::Detect(const cv::Mat&, cv::Mat&)’
50 | bool Detect(const cv::Mat &intermediate, cv::Mat &globalDescriptors) override;
| ^~
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:47:10: note: ‘virtual bool ORB_SLAM3::HFNetRTModel::Detect(const cv::Mat&, std::vector~
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:44:10: note: ‘virtual bool ORB_SLAM3::HFNetRTModel::Detect(const cv::Mat&, std::vector~
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:38:7: note: ‘class ORB_SLAM3::HFNetRTModel’ defined here
38 | class HFNetRTModel : public BaseModel
| ^~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:139:52: error: ‘ORB_SLAM3::std::vector’ has not been declared
139 | std::vector~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:139:58: error: expected ‘,’ or ‘...’ before ‘<’ token
139 | std::vector~~~
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:76:10: note: candidate is: ‘void ORB_SLAM3::HFNetRTModel::GetLocalFeaturesFromTensor(const ORB_SLAM3::RTTensor&, const ORB_SLAM3::RTTensor&, std::vector~~~~~
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:38:7: note: ‘class ORB_SLAM3::HFNetRTModel’ defined here
38 | class HFNetRTModel : public BaseModel
| ^~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc: In member function ‘bool ORB_SLAM3::HFNetRTModel::LoadHFNetTRModel()’:
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:209:20: error: ‘unique_ptr’ was not declared in this scope; did you mean ‘std::unique_ptr’?
209 | auto builder = unique_ptr~~~~~
| std::unique_ptr
In file included from /usr/include/c++/9/memory:80,
from /home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:5,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/usr/include/c++/9/bits/unique_ptr.h:172:11: note: ‘std::unique_ptr’ declared here
172 | class unique_ptr
| ^~~~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:209:39: error: expected primary-expression before ‘>’ token
209 | auto builder = unique_ptr~~~~~
In file included from /usr/include/c++/9/memory:80,
from /home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:5,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/usr/include/c++/9/bits/unique_ptr.h:172:11: note: ‘std::unique_ptr’ declared here
172 | class unique_ptr
| ^~~~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:232:33: error: expected primary-expression before ‘>’ token
232 | std::unique_ptr~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:234:51: error: expected primary-expression before ‘>’ token
234 | auto serializedEngine = unique_ptr~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:244:15: error: ‘shared_ptr’ was not declared in this scope; did you mean ‘std::shared_ptr’?
244 | mEngine = shared_ptr~~~~~
| std::shared_ptr
In file included from /usr/include/c++/9/bits/shared_ptr.h:52,
from /usr/include/c++/9/memory:81,
from /home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:5,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/usr/include/c++/9/bits/shared_ptr_base.h:348:11: note: ‘std::shared_ptr’ declared here
348 | class shared_ptr;
| ^~~~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:244:37: error: expected primary-expression before ‘>’ token
244 | mEngine = shared_ptr~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:255:77: error: ‘ORB_SLAM3::std::unique_ptr’ has not been declared
255 | void HFNetRTModel::LoadTimingCacheFile(const std::string& strFileName, std::unique_ptr~~~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:255:87: error: expected ‘,’ or ‘...’ before ‘<’ token
255 | void HFNetRTModel::LoadTimingCacheFile(const std::string& strFileName, std::unique_ptr~~~
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:62:10: note: candidate is: ‘void ORB_SLAM3::HFNetRTModel::LoadTimingCacheFile(const string&, std::unique_ptr~~~~~~
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:38:7: note: ‘class ORB_SLAM3::HFNetRTModel’ defined here
38 | class HFNetRTModel : public BaseModel
| ^~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:280:53: error: ‘string’ in namespace ‘ORB_SLAM3::std’ does not name a type
280 | void HFNetRTModel::UpdateTimingCacheFile(const std::string& strFileName, std::unique_ptr~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:280:79: error: ‘ORB_SLAM3::std::unique_ptr’ has not been declared
280 | void HFNetRTModel::UpdateTimingCacheFile(const std::string& strFileName, std::unique_ptr~~~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:280:89: error: expected ‘,’ or ‘...’ before ‘<’ token
280 | void HFNetRTModel::UpdateTimingCacheFile(const std::string& strFileName, std::unique_ptr~~~
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:64:10: note: candidate is: ‘void ORB_SLAM3::HFNetRTModel::UpdateTimingCacheFile(const string&, std::unique_ptr~~~~
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:38:7: note: ‘class ORB_SLAM3::HFNetRTModel’ defined here
38 | class HFNetRTModel : public BaseModel
| ^~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:317:6: error: ‘string’ in namespace ‘ORB_SLAM3::std’ does not name a type
317 | std::string HFNetRTModel::DecideEigenFileName(const std::string& strEngineSaveDir, ModelDetectionMode mode, const Dims4 inputShape)
| ^~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:328:48: error: ‘string’ in namespace ‘ORB_SLAM3::std’ does not name a type
328 | bool HFNetRTModel::SaveEngineToFile(const std::string& strEngineSaveFile, const unique_ptr~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:328:81: error: ‘unique_ptr’ does not name a type
328 | bool HFNetRTModel::SaveEngineToFile(const std::string& strEngineSaveFile, const unique_ptr~~~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:328:91: error: expected ‘,’ or ‘...’ before ‘<’ token
328 | bool HFNetRTModel::SaveEngineToFile(const std::string& strEngineSaveFile, const unique_ptr~~~
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:68:10: note: candidate is: ‘bool ORB_SLAM3::HFNetRTModel::SaveEngineToFile(const string&, const std::unique_ptr~~~
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:38:7: note: ‘class ORB_SLAM3::HFNetRTModel’ defined here
38 | class HFNetRTModel : public BaseModel
| ^~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:340:50: error: ‘string’ in namespace ‘ORB_SLAM3::std’ does not name a type
340 | bool HFNetRTModel::LoadEngineFromFile(const std::string& strEngineSaveFile)
| ^~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:340:6: error: no declaration matches ‘bool ORB_SLAM3::HFNetRTModel::LoadEngineFromFile(const int&)’
340 | bool HFNetRTModel::LoadEngineFromFile(const std::string& strEngineSaveFile)
| ^~~~
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:70:10: note: candidate is: ‘bool ORB_SLAM3::HFNetRTModel::LoadEngineFromFile(const string&)’
70 | bool LoadEngineFromFile(const std::string& strEngineSaveFile);
| ^~~~~~
In file included from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:38:7: note: ‘class ORB_SLAM3::HFNetRTModel’ defined here
38 | class HFNetRTModel : public BaseModel
| ^~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:372:45: error: variable or field ‘PrintInputAndOutputsInfo’ declared void
372 | void HFNetRTModel::PrintInputAndOutputsInfo(unique_ptr~~~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:372:45: error: ‘unique_ptr’ was not declared in this scope; did you mean ‘std::unique_ptr’?
372 | void HFNetRTModel::PrintInputAndOutputsInfo(unique_ptr~~~~~
| std::unique_ptr
In file included from /usr/include/c++/9/memory:80,
from /home/oloutfi/HFNet_SLAM/include/Extractors/HFNetRTModel.h:5,
from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:1:
/usr/include/c++/9/bits/unique_ptr.h:172:11: note: ‘std::unique_ptr’ declared here
172 | class unique_ptr
| ^~~~~~
/home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:372:74: error: expected primary-expression before ‘>’ token
372 | void HFNetRTModel::PrintInputAndOutputsInfo(unique_ptr
Sorry, I must say your problem is really weird, and I've never seen it before. It seems that the problem is mainly focused on the C++ STL library instead of my code. Can you also provide the output of executing the following command for CMake configuration on the project?
cd /home/oloutfi/HFNet_SLAM/
rm -r build
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
here is the output:
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
-- The C compiler identification is GNU 9.4.0 -- The CXX compiler identification is GNU 9.4.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done build type: Release -- Found OpenCV: /usr/local (found version "4.7.0") -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found CUDA: /usr/local/cuda (found version "11.6") -- Configuring done -- Generating done -- Build files have been written to: /home/oloutfi/HFNet_SLAM/build
The output of my configuration is:
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Release' as none was specified.
build type: Release
-- Found OpenCV: /usr (found version "4.2.0")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda (found version "11.6")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/llm/ROS/HFNet_SLAM/build
As you can see, some of them are different from your results. Your cmake version is newer than mine (3.16.3). Your OpenCV version is also newer than mine (please use 4.2.0 as it is tested). Are you compiling with Ubuntu 20.04?
If you are working with Ubuntu 20.04, maybe you could try sudo apt-get install build-essential
.
Another good suggestion is that you could start with the original ORB-SLAM3 project. Try to compile this project first.
I apologize that I can't give you more suggestions.
what cmake version are you using?
I will try that and come back to this issue
I tried installing everything on a clean Ubuntu 20.04 and i get the same configuration:
-- The C compiler identification is GNU 9.4.0 -- The CXX compiler identification is GNU 9.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done build type: Release -- Found OpenCV: /home/othman/build (found version "4.2.0") -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found CUDA: /usr/local/cuda-11.6 (found version "11.6") -- Configuring done -- Generating done -- Build files have been written to: /home/othman/Downloads/HFNet_SLAM/build
but the "make -j4" command fails with the same errors as before. I have tried sudo apt-get install build-essential to no avail. In the meantime i will try to compile orbslam3 first
Hi,
I am trying to build the project and I keep getting errors at the last step "Configuring and building ORB_SLAM3 ..."
I am getting the followgin errors:
/usr/include/c++/9/fstream:80:49: error: expected template-name before ‘<’ token 80 | class basic_filebuf : public basic_streambuf<_CharT, _Traits>
In file included from /usr/include/c++/9/fstream:1293, from /home/oloutfi/HFNet_SLAM/src/Extractors/HFNetRTModel.cc:7: /usr/include/c++/9/bits/fstream.tcc:96:18: error: expected constructor, destructor, or type conversion before ‘(’ token 96 | basic_filebuf(basic_filebuf&& rhs) | ^ /usr/include/c++/9/bits/fstream.tcc:125:15: error: declaration of ‘operator=’ as non-function 125 | operator=(basic_filebuf&& __rhs) | ^
~~~~ /usr/include/c++/9/bits/fstream.tcc:125:28: error: missing template arguments before ‘&&’ token 125 | operator=(basic_filebuf&& rhs) | ^~ /usr/include/c++/9/bits/fstream.tcc:125:31: error: ‘rhs’ was not declared in this scope 125 | operator=(basic_filebuf&& __rhs) | ^~~~~ /usr/include/c++/9/bits/fstream.tcc:154:10: error: variable or field ‘swap’ declared void 154 | swap(basic_filebuf& rhs) | ^~~~~ /usr/include/c++/9/bits/fstream.tcc:154:23: error: missing template arguments before ‘&’ token 154 | swap(basic_filebuf& rhs) | ^ /usr/include/c++/9/bits/fstream.tcc:154:25: error: ‘rhs’ was not declared in this scope 154 | swap(basic_filebuf& rhs) | ^~~~~ /usr/include/c++/9/bits/fstream.tcc:180:27: error: ‘ios_base’ has not been declared 180 | open(const char* __s, ios_base::openmode mode) | ^~~~and a lot more