Important: Please read the Qt Code of Conduct -

[SOLVED]Raspberry: QT5 simple MainWindow example : Segmentation Fault.

  • Hi,
    I have compiled qt5 for raspberry by using bakeqtpi.bash and add Raspberry Kit in QtCreator (cross compilation).
    Everything looks ok.
    "Hello world!" example compiled and works fine on Raspberry.
    Simple QT5 MainWindow project compiled fine, but running on the board causes immediate Segmentation Fault.

    gdb tells nothing
    @pi@raspberrypi ~/ $ gdb ./rpi-untitled
    (gdb) run
    Starting program: /home/pi/rpi-untitled

    Program received signal SIGSEGV, Segmentation fault.
    0xb6fe2b50 in ?? () from /lib/
    (gdb) bt
    #0 0xb6fe2b50 in ?? () from /lib/
    #1 0xb6fe31d8 in ?? () from /lib/
    #2 0xb6fe34cc in ?? () from /lib/
    #3 0xb6fe52a4 in ?? () from /lib/
    #4 0x00000000 in ?? ()

    ldd looks ok
    @pi@raspberrypi ~/ $ ldd rpi-untitled
    /usr/lib/arm-linux-gnueabihf/ (0xb6f62000) => /usr/local/qt5pi/lib/ (0xb6ae6000) => /usr/local/qt5pi/lib/ (0xb67cf000) => /usr/local/qt5pi/lib/ (0xb63c8000) => /opt/vc/lib/ (0xb63a0000) => /lib/arm-linux-gnueabihf/ (0xb6381000) => /usr/lib/arm-linux-gnueabihf/ (0xb62b4000) => /lib/arm-linux-gnueabihf/ (0xb6243000) => /lib/arm-linux-gnueabihf/ (0xb621b000) => /lib/arm-linux-gnueabihf/ (0xb60ec000) => /lib/arm-linux-gnueabihf/ (0xb60cd000) => /opt/vc/lib/ (0xb609b000) => /lib/arm-linux-gnueabihf/ (0xb6090000) => /lib/arm-linux-gnueabihf/ (0xb6081000)
    /lib/ (0xb6f6f000) => /opt/vc/lib/ (0xb606f000) => /opt/vc/lib/ (0xb6054000) => /opt/vc/lib/ (0xb6046000)

    Can anyone help?

  • Originally I copied Qt library so-files to Raspberry Pi folder, added this folder into and run ldconfig.
    Looks correct, but leads to Segmentation Fault.

    Then i tried "make install" in Host machine qt5 folder and rewrite rasp-pi-rootfs image. This way my application runs perfectly.

Log in to reply