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

Qt 5.15.0 Cross Compile for Raspberry pi 4 make error



  • Hello Qt community,

    I am working to Qt 5.15.0 cross compile with Raspberry Pi 4. My PC is Ubuntu 20.04 and Raspberry pi system is Ubuntu 20.10. I loaded the libraries I want to use in the Qt application on Raspberry pi. After I follow of this(QtPi4) github repo step. I came to the build part without any problem. But when I enter "make" command I gave this error:

    make[4]: Entering directory '/home/faruk/rootfs/build/qtserialbus/src/tools/canbusutil'
    /usr/bin/aarch64-linux-gnu-g++ --sysroot=/home/faruk/rootfs -Wl,-O1 -Wl,--enable-new-dtags -Wl,-z,origin -Wl,-rpath,\$ORIGIN/../lib -Wl,-rpath-link,/home/faruk/rootfs/build/qtbase/lib -Wl,-rpath-link,/home/faruk/rootfs/build/qtserialport/lib -o ../../../bin/canbusutil .obj/main.o .obj/readtask.o .obj/canbusutil.o .obj/sigtermhandler.o .obj/moc_readtask.o .obj/moc_canbusutil.o .obj/moc_sigtermhandler.o   /home/faruk/rootfs/build/qtserialbus/lib/libQt5SerialBus.so /home/faruk/rootfs/build/qtbase/lib/libQt5Core.so -lpthread   
    /usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: /home/faruk/rootfs/lib/aarch64-linux-gnu/libglib-2.0.so.0: undefined reference to `pthread_sigmask@GLIBC_2.32'
    collect2: error: ld returned 1 exit status
    make[4]: *** [Makefile:85: ../../../bin/canbusutil] Error 1
    make[4]: Leaving directory '/home/faruk/rootfs/build/qtserialbus/src/tools/canbusutil'
    make[3]: *** [Makefile:47: sub-canbusutil-make_first] Error 2
    make[3]: Leaving directory '/home/faruk/rootfs/build/qtserialbus/src/tools'
    make[2]: *** [Makefile:100: sub-tools-make_first] Error 2
    make[2]: Leaving directory '/home/faruk/rootfs/build/qtserialbus/src'
    make[1]: *** [Makefile:49: sub-src-make_first] Error 2
    make[1]: Leaving directory '/home/faruk/rootfs/build/qtserialbus'
    make: *** [Makefile:237: module-qtserialbus-make_first] Error 2
    
    
    

    After some research, I found that I had to uninstall the libqt5 libraries (it was a post from 2017 on the Qt forum). I removed the libqt5 libraries and re-made, but the result did not change. How can I fix this problem?

    P.S.: The libraries I loaded on Raspberry pi before "rsync -avz .." commands are:

    sudo apt install qt5-default
    sudo apt install qml qml-module-qtquick2 qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qtquick-virtualkeyboard qtvirtualkeyboard-plugin libqt5serialport5-dev qtmultimedia5-dev libopencv-dev qml-module-qtcharts qml-module-qt-labs-folderlistmodel
    sudo apt install qtquickcontrols2-5-dev qtdeclarative5-dev qml-module-qtquick-window2 qml-module-qtmultimedia qml-module-qtgraphicaleffects
    sudo apt install libqt5multimedia5-plugins libqt5multimediaquick5 libqt5multimediawidgets5 
    sudo apt install libgstreamer-plugins-bad1.0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-base1.0-dev qtgstreamer-plugins-qt5 gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly
    

    Any suggestions would make me very happy.
    Thanks


  • Moderators

    @Faruk said in Qt 5.15.0 Cross Compile for Raspberry pi 4 make error:

    But when I enter "make" command I gave this error:

    Search above paste it here. What you pasted does not contain any error messages.



  • @sierdzio I edited my post. I added before the message I wrote earlier.


  • Moderators

    Looks like either pthreads library is missing, or compiled using mismatched GLIB.

    I'm not totally sure but it may mean your sysroot and toolchain are not compatible or misconfigured.



  • @sierdzio said in Qt 5.15.0 Cross Compile for Raspberry pi 4 make error:

    Looks like either pthreads library is missing, or compiled using mismatched GLIB.

    I'm not totally sure but it may mean your sysroot and toolchain are not compatible or misconfigured.

    Thank you for reply. How can I fixed this problem ?


  • Moderators

    I don't know, sorry.


Log in to reply