Hi,
I have an IMX8 based target system for which i need to implement OpenCV4.7
So I downloaded the sources and did the build on my development PC by:
Downloaded the sources
Compiled the opencv sources with
cmake -DWITH_OPENCL=ON -DBUILD_SHARED_LIBS=ON -DBUILD_OPENJPEG=ON -DCMAKE_INSTALL_PREFIX=/opt/imx8/sysroots/cortexa35-poky-linux/usr …
then did make and install.
Then i wrote a sample program to display image slideshow and compiled the program with target’s compiler on the development pc.
Then i copied all the opencv libraries to the target board and i tried to execute the program on my target
I got the following error:
home/Development_PC/opencv/opencv-4.7.0/modules/highgui/src/windows.cpp error: (-2:unspecified error). the function is not implemented. rebuild the library with windows, gtk+ 2.x or cocoa support. if you are on ubuntu or debian install libgtk2.0-dev and pkgconfig, then re-run cmake or configure script in function ‘cvNamedWindow’
It is trying to access a file in my development pc
I dont know what to do
IDK. what GUI libraries do you think are available for that target? GTK? you’ll have to figure out how to have this available in your crosscompilation environment.
always check the output of the cmake configuration step. it’s a report of OpenCV’s build time configuration. you can get also at runtime by calling std::cout << cv::getBuildInformation();
So I should try to redo the cmake with GTK and then check it right?
also after build and compilation
if copying the libraries from the target’s /usr/lib present in the developement board to the target’s /usr/lib is enough for the program to run ro do i need to do anything else?
It seems You have an amd64 Ubuntu environment and you are trying to build an application with OpenCV with cross compilation to an arm64 device.
I guess the cmake options are set right, but there are issues with the gtk.
Please install the gtk-dev for the target platform:
apt-get install libgtk2.0-dev:arm64
apt-get install libgtk3-dev:arm64
As I see it still results some errors as cannot solve some dependencies for the gtk. I hope somebody can help with that:
Package ‘renderproto’, required by ‘xrender’, not found
Package ‘xproto’, required by ‘x11’, not found
Package ‘kbproto’, required by ‘x11’, not found
A lot of packages have been installed for both the host and the target system, but did not help. With QT, the GUI is built, but it is not the goal.
Can somebody help with the renderproto, xproto, kbproto issue?