Solved Install qt 5.6.1 x86 in platform CentOS7.0 x64
-
HI,
I have downloaded qt-everywhere-opensource-src-5.6.1.tar.gz, and want to
install qt 5.6.1 x86 in platform CentOS7.0 x64. Where can I find the refrence document
?Thanks
-
@fighter Do you want to compile Qt by yourself? I'm asking because you downloaded Qt source code.
Also, if you want to use Qt 5.6 you should use 5.6.2 (http://download.qt.io/official_releases/qt/5.6/5.6.2/qt-opensource-linux-x64-5.6.2.run).
If you need x86 32bit build then you will need to build it by yourself: http://doc.qt.io/qt-5/build-sources.html -
@jsulm Thank you for your reply.
Yes. I wanted to find qt 5.6.1 x86 installation packages, but failed. So I have to download
qt 5.6.1 source and compile qt 5.6.1 x86 source.The reason of select 5.6.1 is my Windows project use 5.6.1 x86 32bit. Now I want to transplant Windows project to Linux project, so I select 5.6.1.
-
@fighter There shouldn't be any problems if you use 5.6.2 instead of 5.6.1. You could even have less problems, as it has more bugs fixed :-)
-
@jsulm Thank you. I will read http://doc.qt.io/qt-5/build-sources.html.
-
After I installed gcc x86 32bit
yum install libgcc-4.8.5-11.el7.i686
yum install libstdc++-4.8.5-11.el7.i686
yum install glibc-devel.i686I execute configure command:
../qt-source/configure -prefix /opt/Qt5.6.1 -platform linux-g++-32
It works well.But when I executed gmake, the following error occurs:
/usr/include/openssl/opensslconf.h:13:30: fatal error: opensslconf-i386.h: No such file or directory
#include "opensslconf-i386.h"
^
compilation terminated.How can I get rid of it?
Thanks
-
Hi,
After I execute "yum install openssl-devel.i686",
/usr/include/openssl/opensslconf.h:13:30: fatal error: opensslconf-i386.h: No such file or directory
the above error message have been got rid of.
execute gmake command again, the following error occured:
cd textureandlight/ && ( test -e Makefile || /home/fighter/qt-build/qtbase/bin/qmake /home/fighter/qt-source/qtcanvas3d/examples/canvas3d/textureandlight/textureandlight.pro -o Makefile ) && gmake -f Makefile
Project ERROR: Unknown module(s) in QT: quick
gmake[3]: Entering directory/home/fighter/qt-build/qtcanvas3d/src/imports' gmake[3]: Nothing to be done for
first'.
gmake[3]: Leaving directory/home/fighter/qt-build/qtcanvas3d/src/imports' gmake[2]: Leaving directory
/home/fighter/qt-build/qtcanvas3d/src'
cd examples/ && ( test -e Makefile || /home/fighter/qt-build/qtbase/bin/qmake /home/fighter/qt-source/qtcanvas3d/examples/examples.pro -o Makefile ) && gmake -f Makefile
gmake[2]: Entering directory/home/fighter/qt-build/qtcanvas3d/examples' cd canvas3d/ && ( test -e Makefile || /home/fighter/qt-build/qtbase/bin/qmake /home/fighter/qt-source/qtcanvas3d/examples/canvas3d/canvas3d.pro -o Makefile ) && gmake -f Makefile gmake[3]: Entering directory
/home/fighter/qt-build/qtcanvas3d/examples/canvas3d'
cd textureandlight/ && ( test -e Makefile || /home/fighter/qt-build/qtbase/bin/qmake /home/fighter/qt-source/qtcanvas3d/examples/canvas3d/textureandlight/textureandlight.pro -o Makefile ) && gmake -f Makefile
Project ERROR: Unknown module(s) in QT: quick
gmake[3]: *** [sub-textureandlight-make_first] Error 3
gmake[3]: Leaving directory/home/fighter/qt-build/qtcanvas3d/examples/canvas3d' gmake[2]: *** [sub-canvas3d-make_first] Error 2 gmake[2]: Leaving directory
/home/fighter/qt-build/qtcanvas3d/examples'
gmake[1]: *** [sub-examples-make_first] Error 2
gmake[1]: Leaving directory `/home/fighter/qt-build/qtcanvas3d'
gmake: *** [module-qtcanvas3d-make_first] Error 2How should I do? Any help will be very appreciated.
Thanks
-
@fighter You can disable the build of all the examples (you can build them later if needed).
Add -no-compile-examples parameter to the configure call. -
Thank you for your help. Now I add -no-compile-examples parameter to the configure call, and run gmake command again. Command gmake is executing.
-
gmake executed normally. But qt 32bit header files cannot find in the disk, instead of 64bit header files have been found(for example, qconfig-32.h did not exist in the disk, instead qconfig-64.h was found in the disk. )I don't know the reason. Can anyone help me?
Thank you. The following is my installation steps:yum install libgcc-4.8.5-11.el7.i686 yum install libstdc++-4.8.5-11.el7.i686 yum install glibc-devel.i686 yum install openssl-devel.i686 ../qt-source/configure -prefix /opt/Qt5.6.1 -platform linux-g++-32 -no-compile-examples gmake gmake install
-
Hi and welcome to devnet,
@fighter said in Install qt 5.6.1 x86 in platform CentOS7.0 x64:
The reason of select 5.6.1 is my Windows project use 5.6.1 x86 32bit. Now I want to transplant Windows project to Linux project, so I select 5.6.1.
Out of curiosity, is it mandatory to build your application for 32bit on Linux ? The fact that you used a 32bit Qt on Windows doesn't make it mandatory to also build your application in 32bit on other platforms.
-
@SGaist Thank you for your reply.
In fact my application have 32bit and 64bit version in Windows. Windows QT version is
qt_5.6.1-1_x86, qt_5.6.2_x64.
So in Linux I also want 32bit and 64bit version. -
@fighter You can check whether built Qt libraries are 32bit or 64 bit like this (in a terminal):
$ file PATH_TO_QT/lib/libQt5Core.so
If libQt5Core.so is a symbolic link then just use the file it points to.
-
@jsulm Thank you for your reply.
[root@localhost ~]# find / -name "libQt5Core.so"
/home/fighter/qt-build/qtbase/lib/libQt5Core.so
/usr/lib64/libQt5Core.so
/opt/Qt5.6.1/lib/libQt5Core.so[root@localhost ~]# file /usr/lib64/libQt5Core.so.5.6.1
/usr/lib64/libQt5Core.so.5.6.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), BuildID[sha1]=b148d33ba6c8e59e0a1 61ff2a0c2af35ee42ad6c, stripped[root@localhost ~]# file /opt/Qt5.6.1/lib/libQt5Core.so.5.6.1
/opt/Qt5.6.1/lib/libQt5Core.so.5.6.1: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), BuildID[sha1]=2434bdcd 1cc892d42e5ff1ba772a48237a8a3e66, stripped -
@fighter said in Install qt 5.6.1 x86 in platform CentOS7.0 x64:
/opt/Qt5.6.1/lib/libQt5Core.so.5.6.1
is a 32bit binary
-
@jsulm Yes. /opt/Qt5.6.1/lib/libQt5Core.so.5.6.1 is 32bit. But it is strange that qconfig-32.h
did not exist in the disk, instead qconfig-64.h was found in the disk. -
@fighter said in Install qt 5.6.1 x86 in platform CentOS7.0 x64:
qconfig-32.h
The file is actually called qconfig.h
-
@jsulm said in Install qt 5.6.1 x86 in platform CentOS7.0 x64:
qconfig.h
The content of qconfig.h have qconfig-32.h and qconfig-64.h. Please look at the following:[root@localhost ~]# ls -l /usr/include/QtCore/qconfig.h lrwxrwxrwx. 1 root root 18 Jul 21 17:01 /usr/include/QtCore/qconfig.h -> qconfig-multilib.h [root@localhost ~]# cat /usr/include/QtCore/qconfig-multilib.h /* qconfig.h */ /* This file is here to prevent a file conflict on multiarch systems. A * conflict will occur because qconfig.h has arch-specific definitions. * * DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD. */ #ifndef QCONFIG_MULTILIB_H #define QCONFIG_MULTILIB_H #include <bits/wordsize.h> #if __WORDSIZE == 32 #include "QtCore/qconfig-32.h" #elif __WORDSIZE == 64 #include "QtCore/qconfig-64.h" #else #error "unexpected value for __WORDSIZE macro" #endif #endif
-
@fighter said in Install qt 5.6.1 x86 in platform CentOS7.0 x64:
/usr/include/QtCore/qconfig-multilib.h
This header file is not from your own build which is in /opt/Qt5.6.1
Same for /usr/include/QtCore/qconfig.h -
@jsulm
You mean I should use my own build header file in /opt/Qt5.6.1?The file /usr/include /QtCore/qconfig.h is a link to qconfig-multilib.h.
The size of /usr/include /QtCore/qconfig-multilib.h is not same with /opt/Qt5.6.1/include/QtCore/qconfig.h.
[root@localhost ~]# ls -l /opt/Qt5.6.1/include/QtCore/qconfig.h
-rw-r--r--. 1 root root 4339 Jul 25 16:41 /opt/Qt5.6.1/include/QtCore/qconfig.h
[root@localhost ~]# ls -l /usr/include/QtCore/qconfig-multilib.h
-rw-r--r--. 1 root root 501 Nov 5 2016 /usr/include/QtCore/qconfig-multilib.h