Solved Install qt 5.6.1 x86 in platform CentOS7.0 x64
-
@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 -
@fighter If you want to use your build then yes you need to use the header files from your build. How else should it work?
/opt/Qt5.6.1/include/QtCore/qconfig.h is not a link, so nothing is missing. -
@jsulm
Thank you for your patient reply. Thank you very much.