Deploy Qt opencv how do it
-
i search several time in here and all web but i dont understand or i didnt make or not enough knowlodge.
i am using
Ubuntu Ubuntu 22.04.2 LTS
opencv 4.7.0
Qt Creator Qt Creator 9.0.1 Based on Qt 6.4.0 (GCC 10.3.1 20210422 (Red Hat 10.3.1-1), x86_64)
i want that, make a exacutable file on another linux system, Please explain how do it.
i try with linuxdeployqt-continuous-x86_64.AppImagethanks for advance
-
@asisisyah said in Deploy Qt opencv how do it:
linuxdeployqt-continuous-x86_64.AppImage
what exactly happened when you tried that?
-
@Abderrahmene_Rayene
yes ofcourse, developers says you must use old versions of Linux like this ubuntu 16.0. , its not to be such as hard . i want deploy with linked Qt library and opencv library ... than execute it on another linux computer or run on embeded linux..
is there lesson or tuttorial or anythig. -
@JonB
yep@yep:~/Desktop/deploy3$ sudo linuxdeployqt-continuous-x86_64.AppImage deploy12 -unsupported-allow-new-glibc
[sudo] password for yep:
linuxdeployqt (commit 8428c59), build 47 built on 2023-04-23 17:29:33 UTC
WARNING: Not checking glibc on the host system.
The resulting AppDir or AppImage may not run on older systems.
This mode is unsupported and discouraged.
For more information, please see
https://github.com/probonopd/linuxdeployqt/issues/340
Not using FHS-like mode
app-binary: "/home/yep/Desktop/deploy3/deploy12"
appDirPath: "/home/yep/Desktop/deploy3"
relativeBinPath: "deploy12"
qmakePath 3= ""
ERROR: ldd outputLine: "libQt6Gui.so.6 => not found"
ERROR: for binary: "/home/yep/Desktop/deploy3/lib//libQt6Widgets.so.6"
ERROR: Please ensure that all libraries can be found by ldd. Aborting. -
@asisisyah said in Deploy Qt opencv how do it:
it said that, your system is too new
That is what you said before. Are you now saying you have got past that via the
-unsupported-allow-new-glibc
and this is a new error? It helps if you explain....OK, I have not used
linuxdeployqt
before, but this looks likelibQt6Gui.so.6
, a Qt shared library file, cannot be found. So did that go into the the image created bylinuxdeployqt
? Did it get extracted? If so to where? -
@JonB said in Deploy Qt opencv how do it:
Are you now saying you have got past that via the -unsupported-allow-new-glibc and this is a new error?
It seems so, OP copied everything on the terminal and pasted here unformatted.
@asisisyah what do you get if you use this command:
ldd libQt6Gui.so.6
-
@JonB
if i tried with -unsupported-allow-new-glibc it show these error.
its not extract anywhere.
my app its working my computer with Qt release run and Qt make new folder called Release , its working may app in folder or anywhere in my computer Desktop ,Document or Download folder as single file no problem but when its work on another computer, my app says "error while loading shared libraries: libopencv_highgui.so.407"
may be i can should add theese library file in other computer , but how?
may be add all needed library add in myApp Static or Dinamik, i -
@asisisyah
Now you say it'slibopencv_highgui.so.407
when a moment ago you said it'slibQt6Gui.so.6
. It's really hard to follow what you are claiming....In any case, the whole point of
linuxdeployqt
is to bundle all the libraries you need for your application and copy them onto target system. You need to find out what it is bundling/why it isn't doing so. -
@JonB
libopencv_highgui.so.407 -> this error means if i run myApp on other linux computer. other computer says that error message.libQt6Gui.so.6 -> this error means , if i run linuxdeployqt on my computer in my terminal show error.
at the point , all error message for linking , i cant deploy with linking with QT or linuxdeploy, how is solve
thank you for interesting, -
@asisisyah said in Deploy Qt opencv how do it:
libopencv_highgui.so.407 -> this error means if i run myApp on other linux computer. other computer says that error message.
of course, because you did not properly deploy your app for your target.
@asisisyah said in Deploy Qt opencv how do it:
libQt6Gui.so.6 -> this error means , if i run linuxdeployqt on my computer in my terminal show error.
How about you just focus just on this error? solving it would solve your first issue.
You can answer my question if you'd like to troubleshoot this error further.
Once you get
linuxdeployqt
working properly, then it's much easier to help you with deploying opencv into your app. -
@Abderrahmene_Rayene said in Deploy Qt opencv how do it:
Once you get
linuxdeployqt
working properly, then it's much easier to help you with deploying opencv into your app.but How can i working properly ,
Usage: linuxdeployqt <app-binary|desktop file> [options]
i make lik this link link text
and i make structure tree -
@Abderrahmene_Rayene said in Deploy Qt opencv how do it:
@asisisyah what do you get if you use this command:
ldd libQt6Gui.so.6 -
@asisisyah said in Deploy Qt opencv how do it:
ERROR: Please ensure that all libraries can be found by ldd. Aborting.
it seems like your
ldd
cannot find Qt shared libraries because they are not in a standard path, it needs to be configured to find them, it might not be alinuxdeployqt
issue.qmakePath 3= ""
the above does not look right to me, so trying the below might help:
linuxdeployqt <your app> -qmake=/path/to/Qt/your Qt version/gcc_64/bin/qmake
this might be of some use as well : Qt deployment can't finde my libs but ldd can
-
@Abderrahmene_Rayene said in Deploy Qt opencv how do it:
linuxdeployqt <your app> -qmake=/path/to/Qt/your Qt version/gcc_64/bin/qmake
this command is work. al Qt libraries came in folder under the lib folder. YES.
qt library is okey i think,
so how i get opencv libsi tried just now that
sudo ./linuxdeployqt-continuous-x86_64.AppImage /home/yep/Desktop/deploy3/deploy12 -bundle-non-qt-libs -unsupported-allow-new-glibcits work all opencv libs came in same lib folder.
than i tried other computer i take this error message
libQt6Widgets.so.6: undefined symbol: _ZTIN4QCss13StyleSelectorE, version Qt_6_PRIVATE_API -
@asisisyah every solution I mentioned so far is just me using uncle google, try to google that error, try the solutions you find, and let us know when all of them do not work and why they did not work (error and so on).
You're making progress, so that's good.
Good luck!