How do I build 32-bit Qt under 64-bit Linux? I have trouble with libraries, notably with x11 (“X11 functionality failed” message during configure). What packages do I have to install and what mkspec I have to use? I tried linux-g++-32, is it correct?
Do you have the 32-bit X11 libraries installed? You'll probably have problems linking against 64-bit libraries.
Related
I want to run a program which needs Qt5.8 libraries, and the underlying OS is Ubuntu 14.05.5 LTS
This OS seems to include a prebuilt package for Qt 5.2.1 and nothing later in the repos.
Can I safely add Qt5.8 libraries? How would I do so? (I can only find instructions for installing the full Qt IDE)
As per my information, Binaries (or offline/online installers) for installing Qt (>= 5.6) on 32-bit linux are not provided. For example, If I want to use Qt 5.9.0 on 32-bit linux (debian, specifically), the only option is to download Qt source and build it. I have successfully built Qt 5.9.0 on my 32-bit linux machine. But I have to do this on all my development PC's. Instead if I can build it once and create an installer somehow, that will save a lot of time. Is there a way to create offline installer (e.g. *.run files) for installing Qt 5.9.0 on 32-bit Linux (e.g. debian)?
As stated by #Velkan, Qt is available on 32 bit Debian from the official repos.
But, indeed, there is no 32-bit Linux installer from the Qt project.
Regarding copying a Qt install from a Debian PC to another, you do not need to create an installer. Just copy/tar/zip the directory in which Qt is installed. The only requirement is that you must keep the installation in the same absolute path as the Qt Core library has the path hardcoded in it and it is use for plugin detection.
NB1: It is possible to patch Qt Core library to change the hardcoded path and even make it relative. It is not officially documented but you can take a look in the sources of tools like windeployqt or the online installer
NB2: Do not use Qt 5.9.0, prefer 5.9.2. Both are forward and backward binary compatible, but the latter received bug fixes.
I have 64bit intel machine.
I am running windows 7 (64 bit) on this machine.
I have installed Visual Studio Ultimate 2012 on my machine.
I have installed Qt Creator 3.0.1 based on Qt 5.2.1 (MSVC 2010, 32bit)
I am not able to configure opencv 2.4.8 on this Qt on my machine.
I have tried many things but I am not able to get opencv 2.4.8 work on qt.
Please tell me the necessary steps.
Please note, I guess there is some twist because of my software versions e.g. 64 bit machine, opencv 2.4.8 and qt based on MSVC2010, but I am not sure.
Please..please..please help me.
Thank you in advance.
Are you failing to compile OpenCV, link it with your application or running your executable from Qt? Are you linking statically? The problems can be quite different.
If you are linking statically everything needs to be compiled with the same Microsoft Visual C++ compiler AFAIK [VC11 (2012) in your case]. OpenCV is Ok because they provide binaries for vc10 (VS2010), vc11 (VS2012) and vc12 (VS2013). For Qt itself download the version compiled against VS2012 available here.
If you are required to use Qt libraries compiled against vc10, then make sure you install the redistributables for Microsoft Visual C++ 2010 Redistributable Package (x86) and link your application dynamically. And of course, use Dependency Walker if you have problems with wrong DLLs.
I created a development environment with Fedora 18 and Qt 5
When I compile my app it will be 64 bit, and depend on Qt 5. After some research it seems that will be a problem since Centos 6.x is still dependong on Qt 4.6, and Centos 5.x is dependant on earlier Qt, and I'm guessin Ubuntu has its own package limitations.
Is there a "safe" version of Qt I can compile against to ensure it runs everywhere? If not, how can I expect customers to run my program?
If you want to target Linux, then I would recommend using Qt 4.8 (available on most of the Linux Distros), forget about Qt 5 for a year or so. Hardly any Linux distro other than Ubuntu 13.04 and above comes with Qt 5.
Secondly, as far as compiling is considered, if you wish to target Linux distros other than Ubuntu and Fedora than never use Ubuntu or Fedora for compilation. These are bleeding edge Linux distros which include new libraries without much testing. You will not only face the problem of old Qt versions in some Linux distros as you will face the bigger problem of glibc (C library). Make sure the Linux distro you use for compilation has a minimum possible glibc version for Qt 4.8, otherwise even if any Linux distro has Qt 4.8 installed, but has a lower version of glibc, you app still won't run. You can check out distrowatch.com to find out glibc and Qt versions for any Linux Distro
Example:
I compiled my app on Ubuntu 12.04, Qt 4.8.1 with glibc v 2.16 (perhaps). I got a bug report than application does not run on CrunchBang which also has Qt 4.8.1 available but since it is a Debian unstable Linux Distro it uses glibc v2.13. Since that day I always compile my application on CrunchBang (very lighweight, you can Virtual Box for this) and hardly some one complains now.
As far as CentOs is considered, you will need to recompile your code on CentOS.
I want to install Oracle's JDK (32 bit version) under Ubuntu Natty (64 bit version). While there is a package for JRE (32 bit version), I want JDK (32 bit version).
I want to avoid the installer provided with the .bin file, and rather use a .deb file. However, it seems the package java-helper has disappeared in Natty. What can I do?
The Java compiler produces byte code which is same whether you use the 32-bit or 64-bit JDK and plan to use the 32-bit or 64-bit JRE.
The bit-ness of the JDK and JRE don't have to be the same and its unlikely you will notice the difference. (The maximum memory is possibly the main one)
The JDK installation can be treated as 'zip' installation, which means that the installer simply unzips the content of jdk to the target directory on your machine. You can try to copy-paste the required jdk directory to your machine and probably set JAVA_HOME variable if needed. The above should do the magic.
Happy coding!