Closed alex-kozinov closed 4 years ago
Hello @alex-kozinov,
It seems like your problem is more related to qibuild than libqi, but maybe we can help you as it seems you have an issue of library search paths.
What system are you using ? Which version of qibuild ?
Could you try to run ldd ./build-linux-sdk/sdk/bin/remotevision
and see if it outputs the path to the missing library or not, and also readelf -d ./build-linux-sdk/sdk/bin/remotevision
and check that the RPATH (or RUNPATH) variable contains the path to the library directory.
Thank for your attention to this problem! I am using:
Ubuntu 18.04
qibuild version 3.12
OpenCV version 3.1.0
nao SDK for linux64 version 2.8.5.10
Also I've ran command ldd ./build-linux-sdk/sdk/bin/remotevision
and revealed that this library was mentioned:
/lib64/ld-linux-x86-64.so.2 (0x00007f8edf41c000)
libopencv_imgproc.so.3.1 => not found
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f8ed98a3000)
libopencv_imgproc.so.3.1 => not found
Then i've looked up to RPATH:
0x0000000000000001 (NEEDED) Shared library: [libalproxies.so]
0x0000000000000001 (NEEDED) Shared library: [libalcommon.so]
0x0000000000000001 (NEEDED) Shared library: [libalvalue.so]
0x0000000000000001 (NEEDED) Shared library: [libalerror.so]
0x0000000000000001 (NEEDED) Shared library: [libqi.so]
0x0000000000000001 (NEEDED) Shared library: [libboost_system.so.1.59.0]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [libopencv_highgui.so.3.1]
0x0000000000000001 (NEEDED) Shared library: [libopencv_imgcodecs.so.3.1]
0x0000000000000001 (NEEDED) Shared library: [libopencv_objdetect.so.3.1]
0x0000000000000001 (NEEDED) Shared library: [libopencv_core.so.3.1]
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000001d (RUNPATH) Library runpath: [/home/aleksey/sdks/linux-sdk/lib:]
``
Its quite strange for me that there isn't libopencv_imgproc in this list.
But i don't know exactly how it works(:
Are you building libqi yourself ?
Are you using a Makefile generator when configuring your project with qibuild ? If so can you do a grep -R "\-Wl,\-rpath"
in your build directory ?
We have had issues with the RUNPATH option from Ubuntu 18.04 as the behavior changed from the RPATH of Ubuntu 16.04. Technically we only support 16.04 at the moment, but as a workaround you can try using export LD_LIBRARY_PATH=$HOME/.local/share/qi/toolchains/linux-sdk/opencv3/lib
before running your program (if you have a similar error but with another library, try adding the path to the lib to the LD_LIBRARY_PATH).
Note that we do not advise using a LD_LIBRARY_PATH as a long-term solution, see it as a workaround for now.
Ohh i've been so afraid when reinsall ubuntu. Thanks you that help to find solution.
In Makefile I just run qibuild configure
and qibuild make
grep -R "\-Wl,\-rpath"
cdbuild-linux-sdk/CMakeFiles/remotevision.dir/link.txt:/usr/bin/c++ -std=gnu++11 -D_GLIBCXX_USE_CXX11_ABI=0 -g -rdynamic CMakeFiles/remotevision.dir/balldetector.cpp.o CMakeFiles/remotevision.dir/markdetector.cpp.o CMakeFiles/remotevision.dir/kernelcv.cpp.o CMakeFiles/remotevision.dir/remotevision.cpp.o CMakeFiles/remotevision.dir/main.cpp.o -o sdk/bin/remotevision -Wl,-rpath,/home/aleksey/sdks/linux-sdk/lib: /home/aleksey/sdks/linux-sdk/lib/libalvision.so /home/aleksey/sdks/linux-sdk/lib/libalextractor.so /home/aleksey/sdks/linux-sdk/lib/libalthread.so /home/aleksey/sdks/linux-sdk/lib/libalproxies.so /home/aleksey/sdks/linux-sdk/lib/libalcommon.so /home/aleksey/sdks/linux-sdk/lib/libboost_signals.so /home/aleksey/sdks/linux-sdk/lib/librttools.so /home/aleksey/sdks/linux-sdk/lib/libalvalue.so /home/aleksey/sdks/linux-sdk/lib/libalerror.so /home/aleksey/sdks/linux-sdk/lib/libqi.so /home/aleksey/sdks/linux-sdk/lib/libboost_date_time.so /home/aleksey/sdks/linux-sdk/lib/libboost_chrono.so /home/aleksey/sdks/linux-sdk/lib/libboost_filesystem.so /home/aleksey/sdks/linux-sdk/lib/libboost_system.so /home/aleksey/sdks/linux-sdk/lib/libboost_regex.so /home/aleksey/sdks/linux-sdk/lib/libboost_program_options.so /home/aleksey/sdks/linux-sdk/lib/libssl.so /home/aleksey/sdks/linux-sdk/lib/libcrypto.so /home/aleksey/sdks/linux-sdk/lib/libboost_locale.so /home/aleksey/sdks/linux-sdk/lib/libboost_thread.so /home/aleksey/sdks/linux-sdk/lib/libicudata.so /home/aleksey/sdks/linux-sdk/lib/libicudata.so.52 /home/aleksey/sdks/linux-sdk/lib/libicui18n.so /home/aleksey/sdks/linux-sdk/lib/libicui18n.so.52 /home/aleksey/sdks/linux-sdk/lib/libicuio.so /home/aleksey/sdks/linux-sdk/lib/libicuio.so.52 /home/aleksey/sdks/linux-sdk/lib/libicule.so /home/aleksey/sdks/linux-sdk/lib/libicule.so.52 /home/aleksey/sdks/linux-sdk/lib/libiculx.so /home/aleksey/sdks/linux-sdk/lib/libiculx.so.52 /home/aleksey/sdks/linux-sdk/lib/libicutest.so /home/aleksey/sdks/linux-sdk/lib/libicutest.so.52 /home/aleksey/sdks/linux-sdk/lib/libicutu.so /home/aleksey/sdks/linux-sdk/lib/libicutu.so.52 /home/aleksey/sdks/linux-sdk/lib/libicuuc.so /home/aleksey/sdks/linux-sdk/lib/libicuuc.so.52 -lpthread -ldl -lrt /home/aleksey/sdks/linux-sdk/lib/libopencv_highgui.so /home/aleksey/sdks/linux-sdk/lib/libopencv_imgcodecs.so /home/aleksey/sdks/linux-sdk/lib/libopencv_imgproc.so /home/aleksey/sdks/linux-sdk/lib/libopencv_objdetect.so /home/aleksey/sdks/linux-sdk/lib/libopencv_features2d.so /home/aleksey/sdks/linux-sdk/lib/libopencv_flann.so /home/aleksey/sdks/linux-sdk/lib/libopencv_core.so /home/aleksey/sdks/linux-sdk/lib/libz.so
export LD_LIBRARY_PATH=$HOME/.local/share/qi/toolchains/linux-sdk/opencv3/lib
, it doesn't work. I've looked up to dir $HOME/.local/share/qi/toolchains/linux-sdk
and found only one file - toolchain-linux-sdk.cmakeAh yes my bad, it seems your packages are in $HOME/sdks/linux-sdk, and it seems like opencv is missing in the rpath arguments of the linker.
You can try export LD_LIBRARY_PATH=$HOME/sdks/linux-sdk/lib
before running your program then.
I've wrote my own module, using openCV and
qitoolchain
tolinux-sdk
. And after running executable file I always receive such error:Please help me. I've been searching for solutions several days