Really scared about deploying any little Qt-program in Linux
-
Hello,
I am a newbie on both Qt and Linux and I habe a big problem. I never dreamed,
it ever could be a problem - I always thought, Linux people would like to see their programs run
on thousands of other peoples computers ;-) But in fact it should be quite impossible mission...What have I done. I managed to install Qt Creator 5.13.2 and G++ 7.30 on both Linux Mint 19.2 32/64bit
and Windows 7 32/64bit.
I wrote a litte Gui, showing a slider and an LCD. Works fine in the IDE and works outside the IDE
in Windows only.
I run windeployqt and added 3 more DLL and then moved to another fresh Windows installation
(Virtual box guest). It works fine for all 32/64bit Debug/Release model.
As much as I have seen from other projects (like GNU GPG) - it is common pratice, every project
has its own set of Qt DLL. For me is fine too. I can pack it in a ZIP.But not in Linux :-( My trial-and-error strategy (run the executable and let say which .SO left) don't work.
My 32bit executable run - may be funny the target Linux had the suitable Qt .SO files.
My 64bit executable dont run. Tells me it needs the first .SO /usr/lib/gnu_x86_64/libQt5core.so.5.13
if I remember right. I habe only Version 5.9 there (from what I dont know, may be it's Lazarus because
I also installed for some tests).
So what is now my way to move my program to another Linux? A simple, working, normal way.
The internet tells me always there are a million ways - but none of them I understand nor does one works.
I know Linux is some different. What should I do? Make my own deb-package? Let Install any?
Change a path? Let the user compile from my source?
I am little confused about the internet tips. None works... I even have any permission to copy any file to
/usr/lib/gnu_x86_64/
And I dont know how to automatically do my installation. I read about APPIMAGE - okay other people
say "bad".
How do you move and spread your applications in a normal way???
For me its the first question even before I just think of begin to learning C++
Do you understand my problem? -
Hi,
You should take a look at the linuxdeployqt project.
There are indeed several ways. One that is appreciated is to build one package for Debian based distributions and also Red Hat based distributions.
-
Thanks for advice.
This tool worked at the 26st try for me.
BUT ONLY FOR 64bit?!?!?!
Really??? Is that, what millions of programmers advice to do? Kill all 32bt Hardware?For sure. I got the sources from the project and I compiled it using Qt.
When starting, the tools tells me an error, problably not suitable for me as a beginner,
but it denies to run,Really. I didnt program a moon landing satellite - only simple Hello-World Gui?
I am unable to understand -
Thanks for advice.
This tool worked at the 26st try for me.
BUT ONLY FOR 64bit?!?!?!
Really??? Is that, what millions of programmers advice to do? Kill all 32bt Hardware?For sure. I got the sources from the project and I compiled it using Qt.
When starting, the tools tells me an error, problably not suitable for me as a beginner,
but it denies to run,Really. I didnt program a moon landing satellite - only simple Hello-World Gui?
I am unable to understand@alfware said in Really scared about deploying any little Qt-program in Linux:
When starting, the tools tells me an error, problably not suitable for me as a beginner,
What's the actual error? Nobody can help you understand it if you keep it a secret.
-
Thanks for advice.
This tool worked at the 26st try for me.
BUT ONLY FOR 64bit?!?!?!
Really??? Is that, what millions of programmers advice to do? Kill all 32bt Hardware?For sure. I got the sources from the project and I compiled it using Qt.
When starting, the tools tells me an error, problably not suitable for me as a beginner,
but it denies to run,Really. I didnt program a moon landing satellite - only simple Hello-World Gui?
I am unable to understand@alfware said in Really scared about deploying any little Qt-program in Linux:
My trial-and-error strategy (run the executable and let say which .SO left) don't work.
My 32bit executable run - may be funny the target Linux had the suitable Qt .SO files.
My 64bit executable dont run. Tells me it needs the first .SO /usr/lib/gnu_x86_64/libQt5core.so.5.13...
This tool worked at the 26st try for me.
BUT ONLY FOR 64bit?!?!?!Good. Now you have a method that works for 32-bit apps, and a method that works for 64-bit apps.
@alfware said in Really scared about deploying any little Qt-program in Linux:
Is that, what millions of programmers advice to do? Kill all 32bt Hardware?
See https://www.zdnet.com/article/fedora-drops-32-bit-linux/
Some time in the past, 16-bit hardware was retired. Some time in the future, 32-bit hardware will be retired.
-
Beside what my fellow wrote, you have to build your application for the architectures you want to support. That's exactly what Linux distribution as well as developers do.
-
@alfware said in Really scared about deploying any little Qt-program in Linux:
My trial-and-error strategy (run the executable and let say which .SO left) don't work.
My 32bit executable run - may be funny the target Linux had the suitable Qt .SO files.
My 64bit executable dont run. Tells me it needs the first .SO /usr/lib/gnu_x86_64/libQt5core.so.5.13...
This tool worked at the 26st try for me.
BUT ONLY FOR 64bit?!?!?!Good. Now you have a method that works for 32-bit apps, and a method that works for 64-bit apps.
@alfware said in Really scared about deploying any little Qt-program in Linux:
Is that, what millions of programmers advice to do? Kill all 32bt Hardware?
See https://www.zdnet.com/article/fedora-drops-32-bit-linux/
Some time in the past, 16-bit hardware was retired. Some time in the future, 32-bit hardware will be retired.
@JKSH
No sorry, its a misunderstanding - sorry for my bad English. The program run 'randomly' on one specific 32bit Linux Mint,
because may be another application provided the needed .SO in correct version. First hit with only the executable, one go.I tested another 32bit Ubuntu and it didn't run.
Neigther my trial-and-error strategy nor linuxdeployqt works for 32bit (I must repeat to find out the error message
but it was something like my system or any library is too new, sorry I am a newbie).So I have only linuxdeployqt for 64bit - NOT for 32bit.
But true - I am more using 32bit hardware and software.
My problem is not to find the most excellent way to deploy an application but only one!
I cannot believe nobody else EVER IN THE PAST deployed any 32bit Qt application? Thats why, really :-)I take any solution I can understand as a Windows educated Newbie in Linux.
Just the day before I couldnt even image I ever download any source of a system tool (even the linuxdeployqt)
and compile for myself (sorry it tells me now I am too new - I never was, mostly me and my systems are too old).And you're wrong - 16bit is not dead. Its still alive and works for me in real not only virtual. I just this week wrote an application
for it and I had not any problem deploying (only for smile). -
Again me.
Sorry - to make clear: I most of the time use 32bit hardware and software, therefore I want to develope and deploy for
32bit Linux.
In Windows I have no problem running the 32bit EXE in both 32bit/64bit target computers.
Until now in such like Lazarus or similar, my applications are simple and mostly console-based. sometimes gui.
I only use 64bit compilers for interest (does it run and if, faster? nope)So I came to Qt 64bit Linux only because I couldnt well install Qt creator in 32bit Linux.
Ok I did - but then the question: develope only for the IDE??? Nobody ever deployes to any other computer?
I cannot understand. -
@JKSH
No sorry, its a misunderstanding - sorry for my bad English. The program run 'randomly' on one specific 32bit Linux Mint,
because may be another application provided the needed .SO in correct version. First hit with only the executable, one go.I tested another 32bit Ubuntu and it didn't run.
Neigther my trial-and-error strategy nor linuxdeployqt works for 32bit (I must repeat to find out the error message
but it was something like my system or any library is too new, sorry I am a newbie).So I have only linuxdeployqt for 64bit - NOT for 32bit.
But true - I am more using 32bit hardware and software.
My problem is not to find the most excellent way to deploy an application but only one!
I cannot believe nobody else EVER IN THE PAST deployed any 32bit Qt application? Thats why, really :-)I take any solution I can understand as a Windows educated Newbie in Linux.
Just the day before I couldnt even image I ever download any source of a system tool (even the linuxdeployqt)
and compile for myself (sorry it tells me now I am too new - I never was, mostly me and my systems are too old).And you're wrong - 16bit is not dead. Its still alive and works for me in real not only virtual. I just this week wrote an application
for it and I had not any problem deploying (only for smile).@alfware said in Really scared about deploying any little Qt-program in Linux:
The program run 'randomly' on one specific 32bit Linux Mint
...
I tested another 32bit Ubuntu and it didn't run.
- Which version of Linux Mint did you deploy to?
- Which version of Ubuntu did you deploy to?
I managed to install Qt Creator 5.13.2 and G++ 7.30 on both Linux Mint 19.2 32/64bit
and Windows 7 32/64bit.If you want to deploy a 32-bit app, it is easiest to use a 32-bit OS to build your app.
Neigther my trial-and-error strategy nor linuxdeployqt works for 32bit (I must repeat to find out the error message
but it was something like my system or any library is too new, sorry I am a newbie).- Please get the exact error message. It will help you solve the problem.
- Run your app on your development PC and use
ldd
to see which *.so files it needs: https://www.lifewire.com/find-shared-libraries-ldd-command-4017941 - Read this article, it should contain the information you need: http://www.tripleboot.org/?p=138#Linux
I cannot believe nobody else EVER IN THE PAST deployed any 32bit Qt application? Thats why, really :-)
Nobody said that.
Just the day before I couldnt even image I ever download any source of a system tool (even the linuxdeployqt)
and compile for myselfYou are making good progress. Keep investigating, and good luck!
And you're wrong - 16bit is not dead. Its still alive and works for me in real not only virtual. I just this week wrote an application
for it and I had not any problem deploying (only for smile).When I said that "16-bit hardware was retired", I don't mean that they have stopped working.
I mean that they are no longer supported: Developers don't create new 16-bit software anymore. Bugs don't get fixed anymore. Security issues are not patched anymore. New software don't get tested on them anymore. They continue to work, but they do not improve.
The same thing is starting to happen to 32-bit Linux systems now. Existing systems will continue to work for many many years, but support is slowly disappearing.
-
@alfware said in Really scared about deploying any little Qt-program in Linux:
The program run 'randomly' on one specific 32bit Linux Mint
...
I tested another 32bit Ubuntu and it didn't run.
- Which version of Linux Mint did you deploy to?
- Which version of Ubuntu did you deploy to?
I managed to install Qt Creator 5.13.2 and G++ 7.30 on both Linux Mint 19.2 32/64bit
and Windows 7 32/64bit.If you want to deploy a 32-bit app, it is easiest to use a 32-bit OS to build your app.
Neigther my trial-and-error strategy nor linuxdeployqt works for 32bit (I must repeat to find out the error message
but it was something like my system or any library is too new, sorry I am a newbie).- Please get the exact error message. It will help you solve the problem.
- Run your app on your development PC and use
ldd
to see which *.so files it needs: https://www.lifewire.com/find-shared-libraries-ldd-command-4017941 - Read this article, it should contain the information you need: http://www.tripleboot.org/?p=138#Linux
I cannot believe nobody else EVER IN THE PAST deployed any 32bit Qt application? Thats why, really :-)
Nobody said that.
Just the day before I couldnt even image I ever download any source of a system tool (even the linuxdeployqt)
and compile for myselfYou are making good progress. Keep investigating, and good luck!
And you're wrong - 16bit is not dead. Its still alive and works for me in real not only virtual. I just this week wrote an application
for it and I had not any problem deploying (only for smile).When I said that "16-bit hardware was retired", I don't mean that they have stopped working.
I mean that they are no longer supported: Developers don't create new 16-bit software anymore. Bugs don't get fixed anymore. Security issues are not patched anymore. New software don't get tested on them anymore. They continue to work, but they do not improve.
The same thing is starting to happen to 32-bit Linux systems now. Existing systems will continue to work for many many years, but support is slowly disappearing.
@JKSH Okay, finally I did it. I wasnt able to compile any of this tools (cqtdeployer, deployqt) with my standard qt installation (5.5) in Linux Mint 19.2/32. Maybe there is only needed one preference or any other - it's too hard for me as a beginner.
BUT I analyzed the output of cqtdeployer (a structure of folders with the needed libraries and finally a shell-script) and I could adopt it for another simple application. And for some of the qt-examples, all worked - I only added 3 more .SO (all for 64 bit).
THEN I made a similar structure for 32bit and collected the needed .SO
So far it worked. I seen my applications on Mint 17, 18, 19, Ubuntu Mate (64bit) and on Mint 18, 19 and Debian (32bit). So its prove enough for me it works.I packed all with 7zip so it becomes in fact a portable application to can run anywhere.
AND for me as a Windows-User it's logical solution and similar to that what many applications do there: bring along their
own runtimes (.SO)Probably there are 1000 more efficient and clever solutions to deploy - but nobody even told me any one working. And my
Linux dont let me copy even my own files... forbidden, forbidden, forbidden.... :-)