How to install Qt for 32-bit compilation on an Ubuntu x86_64 machine
-
Hi, I have qt 5.15.2 installed for gcc64 and I want to install it to compile 32-bit programs on my x86_64 Ubuntu machine. This is the first time I'm trying to install something 32-bit on a 64-bit Linux. How do I do it? Another question, will the binary from my code's compilation be able to run on my x86_64 Ubuntu?
@JonexElectronic
I will just say that I played around trying to do this a year or so ago, and gave up, couldn't be bothered. It seemed a lot simpler to just compile for 64-bit. My recollection is you had to get so much 32-bit stuff for system libraries it was a pain. -
Hi, I have qt 5.15.2 installed for gcc64 and I want to install it to compile 32-bit programs on my x86_64 Ubuntu machine. This is the first time I'm trying to install something 32-bit on a 64-bit Linux. How do I do it? Another question, will the binary from my code's compilation be able to run on my x86_64 Ubuntu?
@JonexElectronic QtCompany does not provide 32bit Qt binaries anymore, you will have to build it by yourself.
A 32bit application can run on a 64bit OS.
An alternative would be to install a 32bit Ubuntu, but I'm not sure whether Ubuntu provides 32bit versions of their recent distributions. -
@JonexElectronic QtCompany does not provide 32bit Qt binaries anymore, you will have to build it by yourself.
A 32bit application can run on a 64bit OS.
An alternative would be to install a 32bit Ubuntu, but I'm not sure whether Ubuntu provides 32bit versions of their recent distributions.@JonB @hskoglund @jsulm
Hi, I need to install qt-opensource-linux-x86-5.5.1. I have this file qt-opensource-linux-x86-5.5.1.run saved from many years ago, but I need to install on a lubuntu-16.04.2-desktop-amd64 and I have the next problem when I try to execute../qt-opensource-linux-x86-5.5.1.run Unable to execute ./qt-opensource-linux-x86-5.5.1.run: No such file or directory
Of course, I know it is an old one bu my project need it
-
@JonB @hskoglund @jsulm
Hi, I need to install qt-opensource-linux-x86-5.5.1. I have this file qt-opensource-linux-x86-5.5.1.run saved from many years ago, but I need to install on a lubuntu-16.04.2-desktop-amd64 and I have the next problem when I try to execute../qt-opensource-linux-x86-5.5.1.run Unable to execute ./qt-opensource-linux-x86-5.5.1.run: No such file or directory
Of course, I know it is an old one bu my project need it
@JonexElectronic
But this says the file does not exist, what do you expect someone to say?Verify (a) the file exists, (b) you are executing your command from the correct directory and lastly (c) that the file has been marked executable (
chmod +x
)? -
@JonexElectronic
But this says the file does not exist, what do you expect someone to say?Verify (a) the file exists, (b) you are executing your command from the correct directory and lastly (c) that the file has been marked executable (
chmod +x
)?@JonB yes I did all of that, I tried with an other .run file for x64 that I had and it runs but with x86 I am not able to do it
-
@JonB yes I did all of that, I tried with an other .run file for x64 that I had and it runs but with x86 I am not able to do it
@JonexElectronic
Then I am surprised that the error message outputsNo such file or directory
....What does
file ./qt-opensource-linux-x86-5.5.1.run
report? Also, just to humour me,ls -l ./qt-opensource-linux-x86-5.5.1.run
? -
@JonexElectronic
Then I am surprised that the error message outputsNo such file or directory
....What does
file ./qt-opensource-linux-x86-5.5.1.run
report? Also, just to humour me,ls -l ./qt-opensource-linux-x86-5.5.1.run
?$ file ./qt-opensource-linux-x86-5.5.1.run ./qt-opensource-linux-x86-5.5.1.run: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=79271cb8c75b1fe1aca6ebc3c32468c6e46a8a3a, not stripped $ ls -l ./qt-opensource-linux-x86-5.5.1.run -rwxrwxrwx 1 lt-light lt-light 664790208 dic 29 2016 ./qt-opensource-linux-x86-5.5.1.run
-
$ file ./qt-opensource-linux-x86-5.5.1.run ./qt-opensource-linux-x86-5.5.1.run: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=79271cb8c75b1fe1aca6ebc3c32468c6e46a8a3a, not stripped $ ls -l ./qt-opensource-linux-x86-5.5.1.run -rwxrwxrwx 1 lt-light lt-light 664790208 dic 29 2016 ./qt-opensource-linux-x86-5.5.1.run
@JonexElectronic
Fair enough. So this is 32-bit executable on a 64-bit x86_64 Ubuntu machine?It may be that the error message is misleading then. There may be a dependency file missing. Now run
ldd ./qt-opensource-linux-x86-5.5.1.run
Does that show any dependent library file as "not found"?
-
@JonexElectronic
Fair enough. So this is 32-bit executable on a 64-bit x86_64 Ubuntu machine?It may be that the error message is misleading then. There may be a dependency file missing. Now run
ldd ./qt-opensource-linux-x86-5.5.1.run
Does that show any dependent library file as "not found"?
@JonB
It is 32-bit executable on x86_64 lubuntu$ uname -a Linux ltlight-NF894 4.15.0-142-generic #146~16.04.1-Ubuntu SMP Tue Apr 13 09:27:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Here you have
$ ldd ./qt-opensource-linux-x86-5.5.1.run not a dynamic executable
I think that I do not have configured something on my lubuntu or something like that
-
@JonB
It is 32-bit executable on x86_64 lubuntu$ uname -a Linux ltlight-NF894 4.15.0-142-generic #146~16.04.1-Ubuntu SMP Tue Apr 13 09:27:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Here you have
$ ldd ./qt-opensource-linux-x86-5.5.1.run not a dynamic executable
I think that I do not have configured something on my lubuntu or something like that
@JonexElectronic said in How to install Qt for 32-bit compilation on an Ubuntu x86_64 machine:
qt-opensource-linux-x86-5.5.1.run
This is a script as far as I know. What I think the issue is: your Ubuntu 64bit does not provide the 32bit runtime.
-
@JonexElectronic said in How to install Qt for 32-bit compilation on an Ubuntu x86_64 machine:
qt-opensource-linux-x86-5.5.1.run
This is a script as far as I know. What I think the issue is: your Ubuntu 64bit does not provide the 32bit runtime.
@jsulm said in How to install Qt for 32-bit compilation on an Ubuntu x86_64 machine:
This is a script as far as I know.
That is what I thought, but I asked OP and earlier he reported
$ file ./qt-opensource-linux-x86-5.5.1.run ./qt-opensource-linux-x86-5.5.1.run: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=79271cb8c75b1fe1aca6ebc3c32468c6e46a8a3a, not stripped
So how is it a script??
- Does
/lib/ld-linux.so.2
exist? - If you look at the file (e.g.
more ./qt-opensource-linux-x86-5.5.1.run
) does it look like text/shell script or binary??
- Does
-
@jsulm said in How to install Qt for 32-bit compilation on an Ubuntu x86_64 machine:
This is a script as far as I know.
That is what I thought, but I asked OP and earlier he reported
$ file ./qt-opensource-linux-x86-5.5.1.run ./qt-opensource-linux-x86-5.5.1.run: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=79271cb8c75b1fe1aca6ebc3c32468c6e46a8a3a, not stripped
So how is it a script??
- Does
/lib/ld-linux.so.2
exist? - If you look at the file (e.g.
more ./qt-opensource-linux-x86-5.5.1.run
) does it look like text/shell script or binary??
- Does
-
@JonB Well, I guess I'm wrong. But it looks like it is not dinamically linked, so ldd will not work.
@jsulm said in How to install Qt for 32-bit compilation on an Ubuntu x86_64 machine:
looks like it is not dinamically linked
Interesting, since it reports:
./qt-opensource-linux-x86-5.5.1.run: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=79271cb8c75b1fe1aca6ebc3c32468c6e46a8a3a, not stripped => ... (GNU/Linux), dynamically linked, interpreter ...
? :)
I am working on one possible alternate theory, awaiting OP's response to
Does
/lib/ld-linux.so.2
exist? -
@jsulm said in How to install Qt for 32-bit compilation on an Ubuntu x86_64 machine:
looks like it is not dinamically linked
Interesting, since it reports:
./qt-opensource-linux-x86-5.5.1.run: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=79271cb8c75b1fe1aca6ebc3c32468c6e46a8a3a, not stripped => ... (GNU/Linux), dynamically linked, interpreter ...
? :)
I am working on one possible alternate theory, awaiting OP's response to
Does
/lib/ld-linux.so.2
exist?@JonB
Yes it existls -l /lib/ld-linux.so.2 lrwxrwxrwx 1 root root 25 abr 21 2021 /lib/ld-linux.so.2 -> i386-linux-gnu/ld-2.23.so
Also I tried to install more things from apt
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
Now it gives me the next error
sudo ./qt-opensource-linux-x86-5.5.1.run ./qt-opensource-linux-x86-5.5.1.run: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory
I Installed
$ sudo apt-get install libx11-6:i386
And...
$./qt-opensource-linux-x86-5.5.1.run ./qt-opensource-linux-x86-5.5.1.run: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
Install
sudo apt-get install libx11-xcb1:i386
and..
error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory
Install:
sudo apt-get install libfontconfig1:i386
and..
./qt-opensource-linux-x86-5.5.1.run Could not register file downloader for https protocol: QSslSocket::supportsSsl() returns false [9] Warning: QSslSocket: cannot call unresolved function d2i_X509 [9] Warning: QSslSocket: cannot call unresolved function d2i_X509 [9] Warning: QSslSocket: cannot call unresolved function d2i_X509 Segmentation fault (core dumped)
I Tried to solve with:
sudo apt-get install libssl1.0.0:i386 sudo apt-get install libssl-dev:i386
and..
lt-light@ltlight-NF894:~$ sudo ./Desktop/qt-opensource-linux-x86-5.5.1.run qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method qt.network.ssl: QSslSocket: cannot resolve SSLv2_server_method Segmentation fault (core dumped)
Tried
sudo apt-get update sudo apt-get install libutil1:i386 sudo apt-get install libx11-6:i386 sudo apt-get install libx11-xcb1:i386 sudo apt-get install libxcb1:i386 sudo apt-get install libfontconfig1:i386 sudo apt-get install libfreetype6:i386 sudo apt-get install libdl2:i386 sudo apt-get install librt1:i386 sudo apt-get install libpthread0:i386 sudo apt-get install libstdc++6:i386 sudo apt-get install libm6:i386 sudo apt-get install libgcc1:i386 sudo apt-get install libc6:i386 sudo apt-get install libxau6:i386 sudo apt-get install libxdmcp6:i386 sudo apt-get install libexpat1:i386 sudo apt-get install libz1:i386 sudo apt-get install libpng12-0:i386
-
@JonB
Yes it existls -l /lib/ld-linux.so.2 lrwxrwxrwx 1 root root 25 abr 21 2021 /lib/ld-linux.so.2 -> i386-linux-gnu/ld-2.23.so
Also I tried to install more things from apt
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
Now it gives me the next error
sudo ./qt-opensource-linux-x86-5.5.1.run ./qt-opensource-linux-x86-5.5.1.run: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory
I Installed
$ sudo apt-get install libx11-6:i386
And...
$./qt-opensource-linux-x86-5.5.1.run ./qt-opensource-linux-x86-5.5.1.run: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
Install
sudo apt-get install libx11-xcb1:i386
and..
error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory
Install:
sudo apt-get install libfontconfig1:i386
and..
./qt-opensource-linux-x86-5.5.1.run Could not register file downloader for https protocol: QSslSocket::supportsSsl() returns false [9] Warning: QSslSocket: cannot call unresolved function d2i_X509 [9] Warning: QSslSocket: cannot call unresolved function d2i_X509 [9] Warning: QSslSocket: cannot call unresolved function d2i_X509 Segmentation fault (core dumped)
I Tried to solve with:
sudo apt-get install libssl1.0.0:i386 sudo apt-get install libssl-dev:i386
and..
lt-light@ltlight-NF894:~$ sudo ./Desktop/qt-opensource-linux-x86-5.5.1.run qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method qt.network.ssl: QSslSocket: cannot resolve SSLv2_server_method Segmentation fault (core dumped)
Tried
sudo apt-get update sudo apt-get install libutil1:i386 sudo apt-get install libx11-6:i386 sudo apt-get install libx11-xcb1:i386 sudo apt-get install libxcb1:i386 sudo apt-get install libfontconfig1:i386 sudo apt-get install libfreetype6:i386 sudo apt-get install libdl2:i386 sudo apt-get install librt1:i386 sudo apt-get install libpthread0:i386 sudo apt-get install libstdc++6:i386 sudo apt-get install libm6:i386 sudo apt-get install libgcc1:i386 sudo apt-get install libc6:i386 sudo apt-get install libxau6:i386 sudo apt-get install libxdmcp6:i386 sudo apt-get install libexpat1:i386 sudo apt-get install libz1:i386 sudo apt-get install libpng12-0:i386
@JonexElectronic
OK, so you must be getting somewhere! It must indeed be some 32-bit on 64-bit issue.For which I remind you I wrote initially
I will just say that I played around trying to do this a year or so ago, and gave up, couldn't be bothered. It seemed a lot simpler to just compile for 64-bit. My recollection is you had to get so much 32-bit stuff for system libraries it was a pain
Best of luck then, because I found it too difficult....
-
@JonexElectronic
OK, so you must be getting somewhere! It must indeed be some 32-bit on 64-bit issue.For which I remind you I wrote initially
I will just say that I played around trying to do this a year or so ago, and gave up, couldn't be bothered. It seemed a lot simpler to just compile for 64-bit. My recollection is you had to get so much 32-bit stuff for system libraries it was a pain
Best of luck then, because I found it too difficult....
@JonB Thanks, I will share all process
-
@JonB
Yes it existls -l /lib/ld-linux.so.2 lrwxrwxrwx 1 root root 25 abr 21 2021 /lib/ld-linux.so.2 -> i386-linux-gnu/ld-2.23.so
Also I tried to install more things from apt
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
Now it gives me the next error
sudo ./qt-opensource-linux-x86-5.5.1.run ./qt-opensource-linux-x86-5.5.1.run: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory
I Installed
$ sudo apt-get install libx11-6:i386
And...
$./qt-opensource-linux-x86-5.5.1.run ./qt-opensource-linux-x86-5.5.1.run: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
Install
sudo apt-get install libx11-xcb1:i386
and..
error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory
Install:
sudo apt-get install libfontconfig1:i386
and..
./qt-opensource-linux-x86-5.5.1.run Could not register file downloader for https protocol: QSslSocket::supportsSsl() returns false [9] Warning: QSslSocket: cannot call unresolved function d2i_X509 [9] Warning: QSslSocket: cannot call unresolved function d2i_X509 [9] Warning: QSslSocket: cannot call unresolved function d2i_X509 Segmentation fault (core dumped)
I Tried to solve with:
sudo apt-get install libssl1.0.0:i386 sudo apt-get install libssl-dev:i386
and..
lt-light@ltlight-NF894:~$ sudo ./Desktop/qt-opensource-linux-x86-5.5.1.run qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method qt.network.ssl: QSslSocket: cannot resolve SSLv2_server_method Segmentation fault (core dumped)
Tried
sudo apt-get update sudo apt-get install libutil1:i386 sudo apt-get install libx11-6:i386 sudo apt-get install libx11-xcb1:i386 sudo apt-get install libxcb1:i386 sudo apt-get install libfontconfig1:i386 sudo apt-get install libfreetype6:i386 sudo apt-get install libdl2:i386 sudo apt-get install librt1:i386 sudo apt-get install libpthread0:i386 sudo apt-get install libstdc++6:i386 sudo apt-get install libm6:i386 sudo apt-get install libgcc1:i386 sudo apt-get install libc6:i386 sudo apt-get install libxau6:i386 sudo apt-get install libxdmcp6:i386 sudo apt-get install libexpat1:i386 sudo apt-get install libz1:i386 sudo apt-get install libpng12-0:i386
@JonexElectronic said in How to install Qt for 32-bit compilation on an Ubuntu x86_64 machine:
libX11.so.6
You would need to also install 32bit version of this lib. Maybe there is a way to install without opening UI? Can you try
./qt-opensource-linux-x86-5.5.1.run -h
to see what parameters it supports?
-
@JonexElectronic said in How to install Qt for 32-bit compilation on an Ubuntu x86_64 machine:
libX11.so.6
You would need to also install 32bit version of this lib. Maybe there is a way to install without opening UI? Can you try
./qt-opensource-linux-x86-5.5.1.run -h
to see what parameters it supports?
@jsulm
After many installations, I have:./qt-opensource-linux-x86-5.5.1.run -h Usage: ./qt-opensource-linux-x86-5.5.1.run [options] Key=Value Options: -h, --help Displays this help. --version Displays version information. --framework-version Displays the version of the Qt Installer Framework. -v, --verbose Verbose mode. Prints out more information. --proxy Use system proxy on Windows and Linux. This option has no effect on OS X. --script <file> Execute the script given as argument. --checkupdates Check for updates and return an XML description. --updater Start application in updater mode. --manage-packages Start application in package manager mode. --no-force-installations Allow deselecting components that are marked as forced. --show-virtual-components Show virtual components in installer and package manager. --logging-rules <rules> Enables logging according to passed rules. Comma separated logging rules have the following syntax: loggingCategory=true/false. Passing empty logging rules enables all logging categories. The following rules enable a single category: ifw.*=false,ifw.category=true The following logging categories are available: ifw.componentChecker ifw.resources ifw.translations --create-local-repository Create a local repository inside the installation directory. This option has no effect on online installers. --addRepository <URI,...> Add a local or remote repository to the list of user defined repositories. --addTempRepository <URI,...> Add a local or remote repository to the list of temporary available repositories. --setTempRepository <URI,...> Set a local or remote repository as temporary repository, it is the only one used during fetch. Note: URI must be prefixed with the protocol, i.e. file:///, https://, http:// or ftp://. --startserver <mode,socketname,key> Starts the application as headless process waiting for commands to execute. Mode can be DEBUG or PRODUCTION. In DEBUG mode, the option values can be omitted.Note: The server will not shutdown on his own, you need to quit the process by hand. --startclient <socketname,key> Starts the application to debug the client-server communication. If a value is omitted, the client will use a default instead. Note: The server process is not started by the client application in that case, you need to start it on your own. Arguments: Key=Value Key Value pair to be set.
How could I Install?
-
@jsulm
After many installations, I have:./qt-opensource-linux-x86-5.5.1.run -h Usage: ./qt-opensource-linux-x86-5.5.1.run [options] Key=Value Options: -h, --help Displays this help. --version Displays version information. --framework-version Displays the version of the Qt Installer Framework. -v, --verbose Verbose mode. Prints out more information. --proxy Use system proxy on Windows and Linux. This option has no effect on OS X. --script <file> Execute the script given as argument. --checkupdates Check for updates and return an XML description. --updater Start application in updater mode. --manage-packages Start application in package manager mode. --no-force-installations Allow deselecting components that are marked as forced. --show-virtual-components Show virtual components in installer and package manager. --logging-rules <rules> Enables logging according to passed rules. Comma separated logging rules have the following syntax: loggingCategory=true/false. Passing empty logging rules enables all logging categories. The following rules enable a single category: ifw.*=false,ifw.category=true The following logging categories are available: ifw.componentChecker ifw.resources ifw.translations --create-local-repository Create a local repository inside the installation directory. This option has no effect on online installers. --addRepository <URI,...> Add a local or remote repository to the list of user defined repositories. --addTempRepository <URI,...> Add a local or remote repository to the list of temporary available repositories. --setTempRepository <URI,...> Set a local or remote repository as temporary repository, it is the only one used during fetch. Note: URI must be prefixed with the protocol, i.e. file:///, https://, http:// or ftp://. --startserver <mode,socketname,key> Starts the application as headless process waiting for commands to execute. Mode can be DEBUG or PRODUCTION. In DEBUG mode, the option values can be omitted.Note: The server will not shutdown on his own, you need to quit the process by hand. --startclient <socketname,key> Starts the application to debug the client-server communication. If a value is omitted, the client will use a default instead. Note: The server process is not started by the client application in that case, you need to start it on your own. Arguments: Key=Value Key Value pair to be set.
How could I Install?
@JonexElectronic
I don't understand whether/how you say you have got it to run now.If you still need help identifying missing 32-bit libraries I would try following https://superuser.com/a/908417, copying
ldd
and changing it along the lines ofChanging this line to
RTLDLIST="/lib32/ld-linux.so.2 /lib64/..."
immediately fixed the problem.