Important: Please read the Qt Code of Conduct -

Cannot install QT on CentOS

  • I am trying to install Qt5.2.1 on CentOS 6.4. I would like my Qt to have C++11 support. I followed instructions to install DevToolset, which installed gcc 4.8.1

    bq. [root@localhost Qt]# gcc --version
    gcc (GCC) 4.8.1 20130715 (Red Hat 4.8.1-4)

    I downloaded the Qt source and tried to run the configure command like so:

    bq. [root@localhost Qt]# ./configure -opensource -nomake examples -nomake tests -no-gtkstyle -confirm-license

    Which results in an error:

    bq. STL functionality check failed! Cannot build Qt with this STL library.@

    using verbose mode shows the following error:

    bq. {standard input}: Assembler messages:
    {standard input}:250: Error: expecting string instruction after rep' {standard input}:254: Error: expecting string instruction afterrep'
    {standard input}:276: Error: expecting string instruction after `rep'

    If anyone knows how to fix this, or how to install Qt with C++11 support on CentOS, any tips would be greatly appreciated.

    Thank you

  • Hi, don't really know about CentOS, but on Ubuntu or Debian it's not enough to install gcc 4.8.1, you also need to install g++ 4.8.1 to get C++11 support (e.g. sudo apt-get install g++).

    Also I think you need to add CONFIG + = c++11 in your project's .pro file (see my blog post

  • Sorry, I should also specify, devtools installs both gcc and g++ 4.8.1.

    Also the problem is that I cannot get a qt program to compile, I cannot compile the QT library at all, I get those errors from the QT 5.2.1 source compilation.

  • Hmm just guessing (sorry :-) but when googling that error message you got, it seems that upgrading your binutils will help (maybe upgrading to CentOS 6.5) or just upgrade the binutils package (like in this discussion, 2nd last post:

Log in to reply