Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Running Qt5 app on embedded platform
Without last edited by A Former User
For some years I run my QT5 applications on embedded platforms such as the beaglebone. I am only able to run these applications when I install qt5-default on the embedded platform. Without qt5-default the application will not run.
I have created a little server test program that needs to run on a router that runs debian jessie (EdgeOS) on ARM v7. But I am unable to install qt5-default on this device.
How can I run my program without installing qt5-default?
debian last edited by debian
What is qt5-default?
I think you can simple copy qt libraries and all should work.
qt5-default is a development package which contains all the dependencies to run a QT application.
Unless you static link you app, it's not possible to run without the Qt so/dll files.
( static building require a Qt license or that the app is open source)
So you must build a deployment folder containing these
Scroll down to linux part.
Thank you. That is exactly what I need. For future purposes I will build the QT5 sources for static linking but this will do for now.
It is not a commercial project. We will use it for a in-house HTTP server.
I just build QT5.7 from source for static linking against the QT libs.
This is the config I use fot static building: ./configure -static -opensource -release -developer-build -prefix /opt/Qt-5.7 -nomake examples -nomake tests
I thought that the executable would run on a fresh install of Ubuntu without the need of installing external libs but I was wrong.
Instead there is a huge list of dependencies. Do I have to install these by hand or are these libs part of a package?
objdump -p TestServer | grep NEEDED
Hmm, i expected it to just run also.
That is what happened in Windows.
You are 100% sure, you used the static version of qt when compiling?
I guess yes since no Qt seems listed.
Also, this is a completely normal Ubuntu you run on ?
( not a reduced or special)
I never tried static in linux so Let's see if we get get some input from others :)
Qt might be build statically that doesn't mean that each of its dependencies are done the same way.
From what I see, here are the dependencies of the xcb, sql and image plugins.
If you want a full static application you also have to build against all dependencies built statically.
Ok thank you. I will investigate further.
Hooray for Microsoft. In visual studio you only have to set the build to static and in release mode and the exe runs on virgin Windows installs. If you want to do the same with QT you are screwed and have to build QT yourself and spend many hours / days trying to figure out why it is not working. Why bother the programmer with such crap.
Yes it is a complete Ubuntu install. If I install qt5-default the program runs fine but with static compiling of QT I thought that I did not need qt5-default anymore. But I was wrong..
No it won't unless you specify that you also want the static runtime to be used which means that you have to follow updates to the runtime because your application won't benefit from new versions of it.
Most libraries don't use the static runtime. In the end it's the programmers responsibility to choose one or the other mode.
If you don't want that, then use MinGW in place of VS.
I switched to MS MFC instead. Visual studio compiles a static exe when I set the build to static / release and runs fine on Win7, Win8, Win10. I like QT but it bothers me with complicated configuration which is not very well documented and differs from time to time due to different QT and OS versions. And my personal opinion is that you don`t have to bother the application programmer with that.
Thank you mrjj for your support!