Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Build Qt 5.14.2 on Ubuntu 18.04



  • I try to build Qt 5.14.2 on Ubuntu 18.04

    The packages:

    sudo apt install gcc
    sudo apt install build-essential
    sudo apt install freeglut3-dev
    sudo apt install mesa-utils
    sudo apt install mesa-common-dev
    sudo apt libgl1-mesa-dev
    sudo apt libglu1-mesa-dev

    Already installed and upgraded.

    QT configured with:
    ./configure -prefix $PWD/qtbase -opensource -skip qtwebengine -skip qtquickcontrols -skip qtconnectivity -no-icu -skip qtwebglplugin -skip qtlocation -no-sql-odbc -no-sql-sqlite -nomake examples -nomake tests -opengl desktop -platform linux-g++-64

    Nonetheless:
    ERROR: Feature 'opengl-desktop' was enabled, but the pre-condition '(config.win32 && !config.winrt && !features.opengles2 && (config.msvc || libs.opengl))
    || (!config.watchos && !config.win32 && !config.wasm && libs.opengl)' failed.

    ERROR: The OpenGL functionality tests failed!
    You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
    QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.

    How to fix that?



  • Fixed it with:

    #QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib64
    QMAKE_LIBDIR_OPENGL = /usr/lib

    in

    /qtbase/mkspecs/linux-g++-64/qmake.conf

    then run

    ./configure -recheck-all



  • Fixed it with:

    #QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib64
    QMAKE_LIBDIR_OPENGL = /usr/lib

    in

    /qtbase/mkspecs/linux-g++-64/qmake.conf

    then run

    ./configure -recheck-all


Log in to reply