Closed wnzhyee closed 3 years ago
Is the folder /home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/onnxruntime-1.3.0/cmake/external/googletest empty?
Is the folder /home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/onnxruntime-1.3.0/cmake/external/googletest empty?
yes, i found that the external is empty and i use --recursive, now it's work, but i find that i can compile success when i use gcc==7.4.0 but when i use gcc==4.8.4, it'll build error. How can i comile it in low version gcc? because if i use high version compiled libonnxruntime.so in my project, it seems glibc is mismatching, the error is like:
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `VTT for std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::logic_error::logic_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned long)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_last_of(char const*, unsigned long, unsigned long) const@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream(std::_Ios_Openmode)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::logic_error::logic_error(char const*)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::resize(unsigned long, char)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `vtable for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_erase(unsigned long, unsigned long)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::logic_error::logic_error(char const*)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::runtime_error::runtime_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_first_not_of(char const*, unsigned long, unsigned long) const@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::numpunct<char> const& std::use_facet<std::__cxx11::numpunct<char> >(std::locale const&)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::invalid_argument::invalid_argument(char const*)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `logf@GLIBC_2.27'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::push_back(char)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_stringstream()@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::runtime_error::runtime_error(char const*)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct(unsigned long, char)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `__cxa_throw_bad_array_new_length@CXXABI_1.3.8'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::runtime_error::runtime_error(std::runtime_error const&)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `vtable for std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(unsigned long, unsigned long, char const*) const@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::runtime_error::runtime_error(std::runtime_error const&)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace_aux(unsigned long, unsigned long, unsigned long, char)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::basic_istream<char, std::char_traits<char> >& std::getline<char, std::char_traits<char>, std::allocator<char> >(std::basic_istream<char, std::char_traits<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::_M_sync(char*, unsigned long, unsigned long)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream(std::_Ios_Openmode)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_M_replace(unsigned long, unsigned long, wchar_t const*, unsigned long)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_M_assign(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::swap(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_first_of(char const*, unsigned long, unsigned long) const@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `VTT for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_mutate(unsigned long, unsigned long, char const*, unsigned long)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::logic_error::logic_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `operator delete(void*, unsigned long)@CXXABI_1.3.9'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::basic_ifstream<char, std::char_traits<char> >::basic_ifstream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::_Ios_Openmode)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::invalid_argument::invalid_argument(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `powf@GLIBC_2.27'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char const*, unsigned long, unsigned long) const@GLIBCXX_3.4.21'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `expf@GLIBC_2.27'
/home/yckj3844/signet_sdk_ubuntu1404/library/onnxruntime/lib/libonnxruntime.so: undefined reference to `std::runtime_error::runtime_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21'
collect2: error: ld returned 1 exit status
make[2]: *** [run] Error 1
make[1]: *** [CMakeFiles/run.dir/all] Error 2
make: *** [all] Error 2
Here is the build error log via gcc4.8(the error log is begin at line600): build.log
the build command is:
python3 $DIR/tools/ci_build/build.py --build_dir $DIR/build/Linux --config RelWithDebInfo --parallel --skip_tests --build_shared_lib
thanks for your reply
AFAIK, onnxruntime works well with gcc 4.8.5. I haven't tried gcc 4.8.4. It failed because it can't recognize the macro POPULATE_OP_DOC_STR @pranavsharma FYI.
AFAIK, onnxruntime works well with gcc 4.8.5. I haven't tried gcc 4.8.4. It failed because it can't recognize the macro POPULATE_OP_DOC_STR @pranavsharma FYI.
The introduction of the POPULATE_OP_DOC_STR macro along with string literals surfaced a compiler bug that got fixed only in gcc 4.9.0 and after.
AFAIK, onnxruntime works well with gcc 4.8.5. I haven't tried gcc 4.8.4. It failed because it can't recognize the macro POPULATE_OP_DOC_STR @pranavsharma FYI.
The introduction of the POPULATE_OP_DOC_STR macro along with string literals surfaced a compiler bug that got fixed only in gcc 4.9.0 and after.
thanks for ur reply! i tried centos7.6 with gcc4.8.5, and it compiles success. so is it only a compile bug on old ubuntu version with gcc 4.8? is there any advise to make this work?
AFAIK, onnxruntime works well with gcc 4.8.5. I haven't tried gcc 4.8.4. It failed because it can't recognize the macro POPULATE_OP_DOC_STR @pranavsharma FYI.
The introduction of the POPULATE_OP_DOC_STR macro along with string literals surfaced a compiler bug that got fixed only in gcc 4.9.0 and after.
thanks for ur reply! i tried centos7.6 with gcc4.8.5, and it compiles success. so is it only a compile bug on old ubuntu version with gcc 4.8? is there any advise to make this work?
Well, we can try avoiding the usage of string literals. Contributions are welcome.
AFAIK, onnxruntime works well with gcc 4.8.5. I haven't tried gcc 4.8.4. It failed because it can't recognize the macro POPULATE_OP_DOC_STR @pranavsharma FYI.
The introduction of the POPULATE_OP_DOC_STR macro along with string literals surfaced a compiler bug that got fixed only in gcc 4.9.0 and after.
thanks for ur reply! i tried centos7.6 with gcc4.8.5, and it compiles success. so is it only a compile bug on old ubuntu version with gcc 4.8? is there any advise to make this work?
Well, we can try avoiding the usage of string literals. Contributions are welcome.
well, i simply delete all the linefeed in the POPULATE_OP_DOC_STR doc definition and it works, just like this: old:
POPULATE_OP_DOC_STR(doc=R"aaa
bbb
ccc";);
new:
POPULATE_OP_DOC_STR(doc=R"aaa bbb ccc";);
it seems gcc4.8.4 can't handle multi line raw string lol
thanks for your help~
I need to build basic cpu onnxruntime and get shared libs on ubuntu14.04, and i pull the official ubuntu14.04 docker from docker hub. I installed gcc and g++ (version is 4.8.4) and cmake(3.13) in the image, and download onnxruntime 1.3.0 sources. I run the recommend command:
And i meet the error:
How to solve this? Is there any advise?