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

Steps for QT custom build version 5.13/14 with QWebEngine on linux system



  • To build QT with qt-xcb, I will need below packages installed on this.

    yum install libxcb libxcb-devel xcb-util xcb-util-devel mesa-libGL-devel libxkbcommon-devel

    Also as per documentation we have to check whether below packages are there already or not and install if required.

    1. Gperf
      pkg-config to detect most of its dependencies. The following pkg-config files are required:
      • dbus-1
      • fontconfig
      If Qt was configured for xcb, the following pkg-config files are also required:
      • libdrm
      • xcomposite
      • xcursor
      • xi
      • xrandr
      • xscrnsaver
      • xtst
      Further, development packages for khr and libcap need to be installed.

    qmake: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found error means gcc not set

    Install • xcomposite, xcursor, xi,xscrnsaver,xtst, khr separately not availabe in suscription manager(other are availabe in yum)
    Use different names with YUM like xtst->libXtst, xcomposite->libXcompoiste, xcursor->libXcursor, xi->libXi, xscrnsaver->libXScrnSaver, khr->mesa-khr-devel.x86_64 and there -devel packages too better searching exact name use : yum search <pkg_name_substring> and install all the relevent searched names packages

    yum install/update nss and u will get sm dependencies packages on nss installed.
    After that if required nss version is not present build it from below source.(Above step anyways needed for dependencies of nss cleared before source build)

    Build and install NSS and NSPR from http://www.linuxfromscratch.org/blfs/view/stable/x/qtwebengine.html Dependencies section and follow same procedure.

    For NSPR:
    sed -ri 's#^(RELEASE_BINS =).*#\1#' pr/src/misc/Makefile.in && sed -i 's#$(LIBRARY) ##' config/rules.mk && ./configure --prefix=/usr --with-mozilla --with-pthreads $([ $(uname -m) = x86_64 ] && echo --enable-64bit) && make

    For NSS:
    make -j1 BUILD_OPT=1 NSPR_INCLUDE_DIR=/usr/include/nspr USE_SYSTEM_ZLIB=1 ZLIB_LIBS=-lz NSS_ENABLE_WERROR=0 $([ $(uname -m) = x86_64 ] && echo USE_64=1) $([ -f /usr/include/sqlite3.h ] && echo NSS_USE_SYSTEM_SQLITE=1)

    sudo install -v -m755 ../dist/Linux3.10_x86_64_cc_glibc_PTH_64_OPT.OBJ/lib/.so /usr/lib && sudo install -v -m644 ../dist/Linux3.10_x86_64_cc_glibc_PTH_64_OPT.OBJ/lib/{.chk,libcrmf.a} /usr/lib && sudo install -v -m755 -d /usr/include/nss && sudo cp -v -RL {../dist/public,../dist/private}/nss/* /usr/include/nss && sudo chmod -v 644 /usr/include/nss/* && sudo install -v -m755 ../dist/Linux3.10_x86_64_cc_glibc_PTH_64_OPT.OBJ/bin/{certutil,nss-config,pk12util} /usr/bin && sudo install -v -m644 ../dist/Linux3.10_x86_64_cc_glibc_PTH_64_OPT.OBJ/lib/pkgconfig/nss.pc /usr/lib/pkgconfig
    or

    cd ../dist && install -v -m755 Linux*/lib/.so /scratch/nss_new/lib && install -v -m644 Linux/lib/{.chk,libcrmf.a} /scratch/nss_new/lib && install -v -m755 -d /scratch/nss_new/include/nss && cp -v -RL {public,private}/nss/ /scratch/nss_new/include/nss && chmod -v 644 /scratch/nss_new/include/nss/* && install -v -m755 Linux*/bin/{certutil,nss-config,pk12util} /scratch/nss_new/bin && install -v -m644 Linux*/lib/pkgconfig/nss.pc /scratch/nss_new/lib/pkgconfig

    Copy NSS headers in /usr/include as headers do not get installed properly in NSS build folder sometimes.
    sudo cp -r /scratch/nss_build/nss-3.49.2/nss/lib/util/* /usr/include/nss
    sudo cp -r /scratch/nss_build/nss-3.49.2/nss/lib/freebl/* /usr/include/nss
    sudo cp -r /scratch/nss_build/nss-3.49.2/nss/lib/certdb/* /usr/include/nss
    sudo cp -r /scratch/nss_build/nss-3.49.2/nss/lib/crmf/* /usr/include/nss
    sudo cp -r /scratch/nss_build/nss-3.49.2/nss/lib/smime/* /usr/include/nss
    sudo cp -r /scratch/nss_build/nss-3.49.2/nss/lib/cryptohi/* /usr/include/nss
    sudo cp -r /scratch/nss_build/nss-3.49.2/nss/lib/jar/* /usr/include/nss
    sudo cp -r /scratch/nss_build/nss-3.49.2/nss/lib/softoken/* /usr/include/nss
    sudo cp -r /scratch/nss_build/nss-3.49.2/nss/lib/ckfw/* /usr/include/nss
    sudo cp -r /scratch/nss_build/nss-3.49.2/nss/lib/base/* /usr/include/nss
    sudo cp -r /scratch/nss_build/nss-3.49.2/nss/lib/nss/* /usr/include/nss
    sudo cp -r /scratch/nss_build/nss-3.49.2/nss/lib/certhigh/* /usr/include/nss
    sudo cp -r /scratch/nss_build/nss-3.49.2/nss/lib/pkcs12/* /usr/include/nss
    sudo cp -r /scratch/nss_build/nss-3.49.2/nss/lib/pk11wrap/* /usr/include/nss
    sudo cp -r /scratch/nss_build/nss-3.49.2/nss/lib/pkcs7/* /usr/include/nss
    sudo cp -r /scratch/nss_build/nss-3.49.2/nss/lib/ssl/* /usr/include/nss
    sudo cp -r /scratch/nss_build/nss-3.49.2/nss/lib/freebl/ecl/* /usr/include/nss
    sudo cp -r /scratch/nss_build/nss-3.49.2/nss/lib/ckfw/builtins/* /usr/include/nss

    Then copy nspr headers in usr/include
    sudo cp -r /scratch/nspr/dist/include/nspr/ /usr/include/

    Check this once:

    pkg-config --modversion nss
    should be greater than 3.45
    and

    pkg-config --cflags nss
    should get headers path

    export PATH=/scratch/nss_build/nss-3.49.2/nss/lib/nss/Linux3.10_x86_64_cc_glibc_PTH_64_OPT.OBJ:/scratch/gcc-rel/bin:/scratch/gcc-rel/lib64/:/scratch/gcc-rel/lib:/scratch/openssl_installed/lib:/usr/bin:/usr/local/sbin:/usr/sbin

    export LD_LIBRARY_PATH=/scratch/nss_build/nss-3.49.2/nss/lib/nss/Linux3.10_x86_64_cc_glibc_PTH_64_OPT.OBJ:/scratch/gcc-rel/bin:/scratch/gcc-rel/lib64/:/scratch/gcc-rel/lib:/scratch/openssl_installed/lib:/usr/bin:/usr/local/sbin:/usr/sbin

    export OPENSSL_LIBS='-L/scratch/openssl_installed/lib -lssl -lcrypto'

    export PKG_CONFIG_PATH=/scratch/nspr_new/lib/pkgconfig:/scratch/nss_new/lib/pkgconfig/

    ./configure -prefix /scratch/build_qt -commercial -platform linux-g++-64 -nomake examples -nomake tests -no-angle -qt-zlib -qt-libpng -qt-libjpeg -qt-xcb -qt-freetype -qt-pcre -qt-harfbuzz -opengl desktop -skip doc -webengine-proprietary-codecs -openssl-linked -I /scratch/openssl_installed/include -L /scratch/openssl_installed/lib OPENSSL_LIBS="-llibssl -llibcrypto" -L /scratch/nss_new/lib -I /scratch/nss_new/include/nss -recheck-all

    ./configure -prefix /scratch/build_qt -commercial -platform linux-g++-64 -nomake examples -nomake tests -no-angle -qt-zlib -qt-libpng -qt-libjpeg -qt-xcb -qt-freetype -qt-pcre -qt-harfbuzz -opengl desktop -webengine-proprietary-codecs -openssl-linked -I /scratch/openssl_installed/include -L /scratch/openssl_installed/lib OPENSSL_LIBS="-llibssl -llibcrypto" -L /scratch/nss_new/lib -I /scratch/nss_new/include/nss -recheck-all

    If you get error:
    ERROR: Unknown command line option '-prefix'.
    Check if your source is missing hidden files/the tar itself is missing those.
    https://forum.qt.io/topic/77861/qt-5-8-0-install-on-jetson-tk1/7

    ./configure -prefix /scratch/5.14.2_build/ -commercial -platform linux-g++-64 -nomake examples -nomake tests -no-angle -qt-zlib -qt-libpng -qt-libjpeg -qt-xcb -qt-freetype -qt-pcre -qt-harfbuzz -opengl desktop -webengine-proprietary-codecs -openssl-linked -I /scratch/openssl_installed/include -L /scratch/openssl_installed/lib OPENSSL_LIBS="-llibssl -llibcrypto" -L /scratch/nss_new/lib -I /scratch/nss_new/include/nss -recheck-all

    export LD_LIBRARY_PATH=/scratch/nss_new:/scratch/gcc-rel/bin:/scratch/gcc-rel/lib64/:/scratch/gcc-rel/lib:/scratch/openssl_installed/lib:/usr/bin:/usr/local/sbin:/usr/sbin

    /scratch/nss_new/lib:/scratch/gcc-rel/lib64/:/scratch/gcc-rel/lib:/scratch/gcc-rel/bin:/scratch/openssl_installed/lib:/scratch/nspr_new/lib:/scratch/nss_new/lib/

    export PATH=/scratch/gcc-rel/lib64/:/scratch/gcc-rel/lib:/scratch/gcc-rel/bin:/scratch/openssl_installed/lib:/scratch/nss_new/lib:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin

    https://wiki.qt.io/Building_Qt_5_from_Git for audio dependencies


Log in to reply