alliedvision / gst-vimbasrc

Official vimbasrc element for use of Vimba with GStreamer
Other
11 stars 9 forks source link

Getting vimbasrc on 32 bit arm linux #6

Closed Michal-Kochman closed 2 years ago

Michal-Kochman commented 2 years ago

I am trying to get vimbasrc to our custom linux on tinyrex dev board. I have suceesfully run the instalation script for vimbaC library on the board, I have added crosscompilation info to the cmake and using qtcreator builded the libgstvimbasrc.so. However, when trying to its presence in the target system using gst-inspect I found it blacklisted with warning ''' (gst-plugin-scanner:7174): GStreamer-WARNING **: 17:51:03.461: Plugin description for '/usr/lib/gstreamer-1.0/libgstvimbasrc.so' has no valid origin field '''

When attempting to use the pre-build release for 32bit ARM I got ''' (gst-plugin-scanner:9244): GStreamer-WARNING **: 19:06:02.250: Failed to load plugin '/usr/lib/gstreamer-1.0/libgstvimbasrc.so': libVimbaC.so: cannot open shared object file: No such file or directory ''' Since the system is quite barbeone, I do not have ldd or ldconfig available to find the path in which the library is expected.

Please advise.

NiklasKroeger-AlliedVision commented 2 years ago

(gst-plugin-scanner:7174): GStreamer-WARNING **: 17:51:03.461: Plugin description for '/usr/lib/gstreamer-1.0/libgstvimbasrc.so' has no valid origin field

I am not familiar with this exact error message. It seems to come from gstplugin.c: https://github.com/GStreamer/gstreamer/blob/b4ca58df7624b005a33e182a511904d7cceea890/gst/gstplugin.c#L666 Definitely something that should be looked at (thanks for pointing it out!), but since it is classified as a warning I would not assume that this is the reason for blacklisting the plugin... It seems more likely, that the blacklisting happened because of the missing libVimbaC.so so let's try to solve that first.

libVimbaC.so: cannot open shared object file: No such file or directory Since the system is quite barbeone, I do not have ldd or ldconfig available to find the path in which the library is expected.

This stackoverflow answer seems to provide some ways that can be used to figure out, where ld searches for libraries: https://stackoverflow.com/questions/9922949/how-to-print-the-ldlinker-search-path My first guess would be that putting libVimbaC.so into one of these directories should result in it being picked up during runtime. On the systems I used the element (mainly Ubuntu installations) I was able to place it in libVimbaC.so in /usr/local/lib` and it got picked up as expected.

It might be necessary for you to reset the GStreamer registry to remove the vimbasrc element from the blacklist. Resetting the registry may be done by removing the file in which it is stored. It is typically saved in ~/.cache/gstreamer-1.0/registry.x86_64.bin. The exact file name depends on the architecture of the system and is likely different for your board (as it is not an x86_64 machine). For more details see the official documentation on the registry.

NiklasKroeger-AlliedVision commented 2 years ago

PS: I took a quick look into the has no valid origin field and on my machine the element at least has some content in the "origin url" field.... Perhaps something went wrong during your cross compilation process and some of these fields were not filled correctly?

image

Michal-Kochman commented 2 years ago

ad has no valid origin field yes, that was my guess as wellad has no valid origin field yes, that was my guess as well. I'll try to look into it if I'll have the time, but for now I get the precompiled release to register correctly. Honestly I feel like an idiot. I did try the usuall paths for libVimbaC.so; seems I have managed to miss the correct one ('/usr/lib').

Thanks