Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. [SOLVED]Raspberry: QT5 simple MainWindow example : Segmentation Fault.
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved QtonPi
2 Posts 1 Posters 4.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    plazma
    wrote on last edited by
    #1

    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/ld-linux-armhf.so.3
    (gdb) bt
    #0 0xb6fe2b50 in ?? () from /lib/ld-linux-armhf.so.3
    #1 0xb6fe31d8 in ?? () from /lib/ld-linux-armhf.so.3
    #2 0xb6fe34cc in ?? () from /lib/ld-linux-armhf.so.3
    #3 0xb6fe52a4 in ?? () from /lib/ld-linux-armhf.so.3
    #4 0x00000000 in ?? ()
    (gdb)@

    ldd looks ok
    @pi@raspberrypi ~/ $ ldd rpi-untitled
    /usr/lib/arm-linux-gnueabihf/libcofi_rpi.so (0xb6f62000)
    libQt5Widgets.so.5 => /usr/local/qt5pi/lib/libQt5Widgets.so.5 (0xb6ae6000)
    libQt5Gui.so.5 => /usr/local/qt5pi/lib/libQt5Gui.so.5 (0xb67cf000)
    libQt5Core.so.5 => /usr/local/qt5pi/lib/libQt5Core.so.5 (0xb63c8000)
    libGLESv2.so => /opt/vc/lib/libGLESv2.so (0xb63a0000)
    libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6381000)
    libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb62b4000)
    libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6243000)
    libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb621b000)
    libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb60ec000)
    libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0xb60cd000)
    libEGL.so => /opt/vc/lib/libEGL.so (0xb609b000)
    libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6090000)
    librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb6081000)
    /lib/ld-linux-armhf.so.3 (0xb6f6f000)
    libvcos.so => /opt/vc/lib/libvcos.so (0xb606f000)
    libbcm_host.so => /opt/vc/lib/libbcm_host.so (0xb6054000)
    libvchiq_arm.so => /opt/vc/lib/libvchiq_arm.so (0xb6046000)
    @

    Can anyone help?

    1 Reply Last reply
    0
    • P Offline
      P Offline
      plazma
      wrote on last edited by
      #2

      Originally I copied Qt library so-files to Raspberry Pi folder, added this folder into ld.so.conf.d 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.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved