fix get front library issue (#12707)
when cpuFuncTest and libopenvino.so in sampe directory on redhat8, cpuFuncTest can't find front library path Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com> Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
This commit is contained in:
parent
d1765d1df8
commit
f633286a75
@ -42,7 +42,7 @@ static std::string _get_frontend_library_path() {
|
|||||||
#elif defined(__APPLE__) || defined(__linux__)
|
#elif defined(__APPLE__) || defined(__linux__)
|
||||||
Dl_info info;
|
Dl_info info;
|
||||||
dladdr(reinterpret_cast<void*>(ov::frontend::get_frontend_library_path), &info);
|
dladdr(reinterpret_cast<void*>(ov::frontend::get_frontend_library_path), &info);
|
||||||
return ov::util::get_directory(std::string(info.dli_fname)).c_str();
|
return ov::util::get_directory(ov::util::get_absolute_file_path(std::string(info.dli_fname))).c_str();
|
||||||
#else
|
#else
|
||||||
# error "Unsupported OS"
|
# error "Unsupported OS"
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
Loading…
Reference in New Issue
Block a user