Failed to build Qt 5.11.0 from source on CentOS 7 but no problem with Qt 5.10.1
-
Where did you get the sources from ?
-
As in the case of 5.10.1, I got the source for Linux here:
http://download.qt.io/archive/qt/5.11/5.11.0/single/
For Windows I used the zip file and for Linux I used the .tar.xz file.
-
What version of GCC are you using ?
-
Above I indicated that CentOS 7 comes with GCC 4.8.5. Here is a more detailed information:
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) -
UPDATE: Just tried the newly released Qt 5.11.1 and got exactly the same problem as above, unfortunately. Will stick with version 5.10.1 which had no problems building on Windows both x86 & x64, Linux x86 & x64 as well as on Mac x64.
@Foghorn On this page http://doc.qt.io/qt-5/supported-platforms.html is stated that on RHEL7 (CentOS7) you need GCC 5.3.1, even on RHEL6 you need GCC 4.9.1. So, looks like your configuration is not supported by latest Qt release.
-
So you are saying that it is NOT possible to build on the latest CentOS? That seems strange, doesn't it?
Why do you assume that CentOS 7 is the same as RED HAT Enterprise 7.2. The page you refer to was not changed since 5.10x and , as I state above, there is NO problem building 5.10.1. How do you explain that? Where is documentation that would tell you that 5.11x changed so drastically compared to 5.10x that it no longer can be built with GCC 4.8?
-
So you are saying that it is NOT possible to build on the latest CentOS? That seems strange, doesn't it?
Why do you assume that CentOS 7 is the same as RED HAT Enterprise 7.2. The page you refer to was not changed since 5.10x and , as I state above, there is NO problem building 5.10.1. How do you explain that? Where is documentation that would tell you that 5.11x changed so drastically compared to 5.10x that it no longer can be built with GCC 4.8?
@Foghorn I simply pointed you to the page which explains what are the requirements for building Qt on Linux. I did not said it is not possible to build Qt, but you should probably use a newer compiler.
According to this: https://lists.centos.org/pipermail/centos-announce/2017-September/022532.html, CentOS7 is based on RHEL7.4
You asked for an explanation: well, I don't develop Qt itself (you should ask this question on the Qt developers mailing list), but I assume that Qt 5.11 has other compiler requirements than Qt 5.10.
"Where is documentation that would tell you that 5.11x changed so drastically compared to 5.10x that it no longer can be built with GCC 4.8" - take a look at the link I posted. If information posted there is wrong you can ask for a correction.
And please calm down a bit, I spend my own time to answer questions here... -
UPDATE: For those who might be interested in how the 5.11.1 build runs on Centos 7 here is my experience so far. Yes, 'devtoolsedt-4' is needed to be installed and enabled. But unfortunately 'devtoolset-4 is a 64-bit toolset. As a result, I managed to build the 64-bit QT SDK 5.11.1 fine, but failed to build the 32-bit QT SDK due to missing libstdc++_nonshared.a. I spent a lot of time trying to find the i686 version of devtoolset-4 and libstdc++_nonshared.a on the internet. I found it here:
I installed the package devtoolset-4-libstdc++-devel-5.3.1-6.1.el6.i686.rpm and managed to build qmake and started the build but ended up in the middle of the 32-bit build with the following error:
/opt/rh/devtoolset-4/root/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/ld.gold: internal error in override_version, at resolve.cc:61
collect2: error: ld returned 1 exit status
make[3]: *** [../../lib/libQt5Qml.so.5.11.1] Error 1
make[3]: Leaving directory/w2/nick/qt/b32/qtdeclarative/src/qml' make[2]: *** [sub-qml-make_first-ordered] Error 2 make[2]: Leaving directory
/w2/nick/qt/b32/qtdeclarative/src'
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory `/w2/nick/qt/b32/qtdeclarative'
make: *** [module-qtdeclarative-make_first] Error 2
/w2/nick/qt/b32>At this point I am about to run out of options. Will be abandoning 5.11.1 and sticking with 5.10.1 which has no problem on Windows, Mac and CentOS 7 whatsoever and does NOT require GCC 5.3.1.
-
I've reported the same in https://bugreports.qt.io/browse/QTBUG-69512 and it contains a patch. It's a compiler bug fixed in GCC 5 apparently.