Native Compile of QT 5.12 on Raspberry Pi4



  • I successfully compiled QT5.10.1 on raspberry PI3 with debian stretch natively and getting my PI4 next week .
    What are the changes that i need to make in the qmake.conf and with my compile command to compile against the Cortex A72 instead of the A53 as well as OpenGL ES 3.0 instead of OpenGL ES 2.0 ?

    My PI3 qmake .conf:

    # qmake configuration for the Raspberry Pi 3 
    
     
    include(../common/linux_device_pre.conf) 
    
     
    QMAKE_RPATHLINKDIR_POST += $$[QT_SYSROOT]/opt/vc/lib 
    
     
    QMAKE_LIBDIR_OPENGL_ES2 = $$[QT_SYSROOT]/opt/vc/lib 
    QMAKE_LIBDIR_EGL        =              $$QMAKE_LIBDIR_OPENGL_ES2 
    QMAKE_LIBDIR_OPENVG     =       $$QMAKE_LIBDIR_OPENGL_ES2 
    
     
    QMAKE_INCDIR_EGL        =             $$[QT_SYSROOT]/opt/vc/include \ 
    						                 $$[QT_SYSROOT]/opt/vc/include/interface/vcos/pthreads \ 
    						                 $$[QT_SYSROOT]/opt/vc/include/interface/vmcs_host/linux 
    QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL} 
    QMAKE_INCDIR_OPENVG          = $${QMAKE_INCDIR_EGL} 
     
     
    QMAKE_LIBS_EGL 			        = -lbrcmEGL -lbrcmGLESv2 
    QMAKE_LIBS_OPENGL_ES2 	= -lbrcmEGL -lbrcmGLESv2 
    QMAKE_LIBS_OPENVG 		        = -lbrcmEGL -lbrcmOpenVG -lbrcmGLESv2 
     
     
    QMAKE_CFLAGS                = -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 
    QMAKE_CXXFLAGS          = $$QMAKE_CFLAGS 
    
     
    DISTRO_OPTS            += hard-float 
    DISTRO_OPTS            += deb-multi-arch 
    
     
    EGLFS_DEVICE_INTEGRATION= eglfs_brcm 
     
     
    include(../common/linux_arm_device_post.conf) 
     
     
    load(qt_config) 
    

    This is how i compile it

    PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig PKG_CONFIG_SYSROOT_DIR=/ \../qt-everywhere-src-   5.10.1/configure -v -opengl es2 -eglfs -no-pch -no-gtk -device linux-rasp-pi3-g++ \-device-option CROSS_COMPILE=/usr/bin/ 
    -opensource -confirm-license -reduce-exports \-force-pkg-config -nomake examples -no-compile-examples -skip qtwayland -  skip qtwebengine -release \-qt-pcre -ssl -evdev -system-freetype -fontconfig -glib -gstreamer -prefix /opt/QT5
    
    
    
    make -j4
    
    sudo make install

Log in to reply