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:
Yuan Hu 2022-08-29 15:14:00 +08:00 committed by GitHub
parent d1765d1df8
commit f633286a75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,7 @@ static std::string _get_frontend_library_path() {
#elif defined(__APPLE__) || defined(__linux__)
Dl_info 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
# error "Unsupported OS"
#endif // _WIN32