-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libvpl does not find backend although it's visible to dynamic linker, and installed to same place as libvpl #56
Comments
I've tried stracing syscalls used in both cases, but I still do not fully understand how VPL messes this up. There are no failing file system checks, from which libvpl could deduce that backend is missing:
Whereas with LD_LIBRARY_PATH, it just "magically" decides to try loading the relevant libraries, and finds them (to reduce output, only successfully opened files are shown):
Between the failing and successful cases, LD_LIBRARY_PATH use is the only difference. In the strace output, the only differences are that in latter case:
Because dynamic linker takes things from cache, I think it's VPL itself doing those directory opens, and open missing for |
I found the place where VPL dispatcher actually checks LD_LIBRARY_PATH by itself: https://github.com/oneapi-src/oneVPL/blob/master/dispatcher/vpl/mfx_dispatcher_vpl_loader.cpp#L537 And adds that to some kind of directory search list. If VPL is doing that by itself instead of simply just:
I think it's broken. That kind of "magical" behaviour is both too fragile, and annoying to debug when it fails. (And it will fail. Mysteriously.) |
The current non-standard / manual method for locating shared libraries appears to be encoded in the spec: https://spec.oneapi.io/versions/latest/elements/oneVPL/source/programming_guide/VPL_prg_session.html Which actually does not list OneVPL installation path as one of the library search paths. However, it states that for the legacy MSDK (mfx) backends, it would check also |
Yes, oneVPL dispatcher searches for runtime libs in the directories listed in the spec - latest version is here. To add locations to the search process, they can be added either to LD_LIBRARY_PATH or ONEVPL_SEARCH_PATH. The spec should add a clarification that ld.so.cache is not used when searching for legacy (MSDK) runtimes with oneVPL dispatcher. This was noted in a previous update for oneVPL but did not clarify that this applies to legacy RT also. I'll make a request for that in the next spec update. The reason the behavior is different is because MSDK dispatcher loads a specific library by basename, so the search order is defined by the default behavior for dlopen. oneVPL instead searches a list of directories for all libraries starting with libvpl* and opens any candidate runtime libs by absolute path, which skips ld.so.cache. Requests for changes and improvements to the oneVPL spec can also be filed as in the spec repository here. |
@jonrecker Thanks, I filed a spec ticket. IMHO the minimum expected fix is OneVPL build option for specifying the default driver load directory. |
Closed since this has been transferred to the spec. Thanks for reporting the issue! |
There have been no comments on the spec ticket despite it being open for almost 4 months: uxlfoundation/oneAPI-spec#418 |
It has been one year since the spec bug about obviously broken behavior being specified was filed. Still no comments or fix for it. |
Setup
Ubuntu 22.04 container build
All media stack components built with
/usr/local/lib
as their installation destinationDynamic linker see the relevant libraries, and lists them before the system ones:
Use-case
sample_multi_transcode -i::h265 /media/test_yuv420p.h265 -o::h264 /dev/null
vpl-inspect
Actual outcome
Expected outcome
Because all relevant libraries are visible to dynamic linker, and in the same install target directory as libvpl, backend should be found/loaded, like happens when LD_LIBRARY_PATH is pointed to that directory:
The text was updated successfully, but these errors were encountered: