Build Qt 5.8 on RHEL 6.9



  • I am attempting to build Qt 5.8 on a RHEL 6.9 Workstation.

    Upgraded GCC to 4.9.4 (verified through gcc --version)
    Installed libcxx

    When trying to to run ./configure, an error comes up : .cc1plus: error: unrecognized command line option "-std=c++11"

    I am guess that is because while I have updated to GCC 4.9.4, cc1plus is still using 4.4.4 in libexec.

    Has anyone gotten 5.8 to work on RHEL 6.9 successfully and can provide some guidance?

    Thank you


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Might be a silly question but do you also have g++ installed ?



  • @DanF Sounds like it's still picking up your older g++. On some distributions you have to switch compilers using something like http://stackoverflow.com/questions/14677108/how-to-set-default-g.



  • g++ --version shows 4.9.4.

    If I dont have a symlink to the version of cc1plus in libexec, I get an execvp error. The only way to get by that is to symlink to the older cc1plus. Building GCC 4.9.4 doesnt look like it builds cc1plus in.

    So, I am guessing it has something to do with how I am building GCC (which I am only updating to get QT 5.8). I was hoping someone has gone through this already and gotten Qt 5.8 to work on RHEL 6.



  • @DanF Ah yea I haven't... I really don't use ancient linux versions at all. So I haven't touched redhat in a long time. I prefer cutting edge stuff like gentoo, arch, etc.

    As for your gcc update, yea it sounds like that wasn't a complete upgrade if it's not picking up your cc1plus.


Log in to reply