Important: Please read the Qt Code of Conduct -

Assert errors when building Qt 4.8.6

  • When I try to build Qt 4.8.6 on my Ubuntu 14.04 LTS (64 bits), by typing "sudo make install" I get a lot of errors like the following:

    @../../JavaScriptCore/wtf/PassOwnPtr.h: In member function ‘bool WTF::PassOwnPtr<T>::operator!=(const WTF::OwnPtr<U>&)’:
    ../../JavaScriptCore/wtf/Assertions.h:326:47: warning: typedef ‘dummyOwnPtrs_should_never_be_equal’ locally defined but not used [-Wunused-local-typedefs]
    #define COMPILE_ASSERT(exp, name) typedef int dummy##name [(exp) ? 1 : -1]
    ../../JavaScriptCore/wtf/PassOwnPtr.h:98:66: note: in expansion of macro ‘COMPILE_ASSERT’
    template<typename U> bool operator!=(const OwnPtr<U>&) { COMPILE_ASSERT(!sizeof(U*), OwnPtrs_should_never_be_equal); return false; }

    To put everything into context, here's my sequence of problems:

    • I have a Qt project working fine in Qt Creator with Qt 5 and I wanted to make it backward-compatible for Qt 4, but I discovered my Qt 4.8.6 kit configuration said that the Qt version was invalid.
    • I clicked Manage to sort that out. There was written "qmake location: /usr/bin/qmake-qt4" and "Qt version is not properly installed, please run make install".
    • I found on the Internet that this error could mean some Qt variables are not properly configured, like QT_INSTALL_BINS or QT_INSTALL_HEADERS. Indeed, my QT_INSTALL_HEADERS was pointing to /usr/include/qt4 which doesn't exist.
    • I downloaded the Qt 4.8.6 source and ran the install sequence: configure, sudo make, sudo make install, then I got the error mentioned above.
    • I found a bug report with similar errors, saying that it worked with gcc-4.7 but not with gcc-4.8 anymore. So I installed gcc-4.7, and tried again, with no luck.

    How can I get a functioning Qt 4?

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    It seems that you didn't install the complete Qt dev set from your distribution. Check that, it will be the quickest way

  • Hi and thanks for your answer,

    I downloaded and tried to install Qt4 from this link:

    I don't know what else to install.

    I have a fully functional Qt Creator 3.1.0, on which I would like to set up a Qt 4 kit. Is this what you mean by complete dev set?

  • Lifetime Qt Champion

    No, I meant that your linux distribution provides also Qt 4 (which is probably installed). What you can do is install the dev packages for Qt 4 from your distribution package manager

  • I found a package named qt4-dev-tools which I installed.

    It installed all of these new packages:
    @libqt4-dev libqt4-dev-bin libqt4-opengl-dev libqt4-qt3support libqtwebkit-dev qt4-designer qt4-dev-tools qt4-doc qt4-linguist-tools
    but I'm not sure everything was needed.

    Anyway, now it allowed me to set up a Qt 4 kit without errors so thank you!

  • Lifetime Qt Champion

    You're welcome !

    Not all are but so you get a complete Qt 4 development setup :)

    Happy coding !

Log in to reply