DoubangoTelecom / ultimateALPR-SDK

World's fastest ANPR / ALPR implementation for CPUs, GPUs, VPUs and NPUs using deep learning (Tensorflow, Tensorflow lite, TensorRT, OpenVX, OpenVINO). Multi-Charset (Latin, Korean, Chinese) & Multi-OS (Jetson, Android, Raspberry Pi, Linux, Windows) & Multi-Arch (ARM, x86).
https://www.doubango.org/webapps/alpr/
Other
593 stars 157 forks source link

Unable to load openvino since 3.9.0 on linux #254

Closed Nook2007 closed 2 years ago

Nook2007 commented 2 years ago

run code javac @sources.txt -d . && \ java Recognizer --positive ../../../assets/images/lic_us_1280x720.jpg --negative ../../../assets/images/london_traffic.jpg --assets ../../../assets

with 3.8.4 https://gist.github.com/Nook2007/442b2ff8b5078877c05a3a25ad31a6a5 with 3.9.0 https://gist.github.com/Nook2007/9dbec85a9af2e9c3dbadf9da17bf67ec (only diff is libultimatePluginOpenVINO.so->libultimatePluginOpenVino.so)

*[COMPV INFO]: [UltAlprPlugin] Loading plugin: libultimatePluginOpenVino.so ...
*[COMPV INFO]: [CompVSharedLib] Loading sharded library from libultimatePluginOpenVino.so
***[COMPV ERROR]: function: "open()" 
file: "/home/ultimate/compv/base/compv_sharedlib.cxx" 
line: "71" 
message: [CompVSharedLib] Failed to load library with path=libultimatePluginOpenVino.so, Error: libultimatePluginOpenVino.so: cannot open shared object file: No such file or directory
***[COMPV ERROR]: function: "open()" 
file: "/home/ultimate/compv/base/compv_sharedlib.cxx" 
line: "73" 
message: Operation Failed (COMPV_ERROR_CODE_E_NOT_FOUND) -> 
***[COMPV ERROR]: function: "newObj()" 
file: "/home/ultimate/compv/base/compv_sharedlib.cxx" 
line: "119" 
message: Operation Failed (COMPV_ERROR_CODE_E_NOT_FOUND) -> 
***[COMPV ERROR]: function: "init()" 
file: "/home/ultimate/ultimateALPR/lib/source/ultimate_alpr_plugin.cxx" 
line: "96" 
message: Operation Failed (COMPV_ERROR_CODE_E_NOT_FOUND) -> 

libultimatePluginOpenVino.so file exists.

DoubangoTelecom commented 2 years ago

No regression, works fine. The binaries folder must be part of the PATH (e.g. using ldconfig) or set LD_LIBRARY_PATH. Otherwise we'll not be able to find the shared libs loaded at runtime. Check https://github.com/DoubangoTelecom/ultimateALPR-SDK/tree/master/samples/java/recognizer#examples LD_LIBRARY_PATH=../../../binaries/linux/x86_64:$LD_LIBRARY_PATH \ java Recognizer --image ../../../assets/images/lic_us_1280x720.jpg --assets ../../../assets

Nook2007 commented 2 years ago

in our app i load the libraries by myself, its hard to change env variable outside the app what changed since 3.9.0 except for the name of the library in case of load library? did you get it to run 3.9.0 sample https://gist.github.com/Nook2007/9dbec85a9af2e9c3dbadf9da17bf67ec ? it worked before

DoubangoTelecom commented 2 years ago

This is normal behavior on Linux: You cannot load a dependency if it's not in the system libs, or registered using ldconfig or part of LD_LIBRARY_PATH. Why not run 'export LD_LIBRARY_PATH ....' before running your app? We have only changed the name of the lib in v3.9.0. But, we didn't rebuild it. I'll try to rebuild the lib, maybe the old name is referenced in the meta-data