Problem using QT for Beaglebone Black

  • Hello!

    After using a lot Qt for desktop, I've started to make my way with Qt-Embedded.
    I have a Beaglebone Black with Angstrom running on it and I'm trying to use an Embedde Qt application on it.

    I've used this blog as reference for setting up my environment

    My idea is NOT to use Xserver, but execute my applications with -qws instead.

    I've configured Qt 4.8.5 with:
    ./configure -opensource -confirm-license -prefix /opt/qt-arm -no-qt3support -embedded arm -little-endian -xplatform qws/linux-arm-g++ -qtlibinfix -no-neon

    I have used the angstrom toolchain for x86.

    Despite some warnings, Qt is built correctly and I've been able to configure QtCreator to cross compile and generate applications for Beagleboard. So, I've created a very simple application, copied to the beaglebone through scp and tried to execute it this way:

    @ root@beaglebone:~#./test

    And I recieve this result:
    @QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
    @QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed
    @./test: symbol lookup error: ./untitled1: undefined symbol: _ZN7QWidget8qwsEventEP8QWSEvent

    Could anyone help me with this issue? I've searched through the internet with no success.
    Thanks in advance!

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Did you install your arm Qt on the Beaglebone ?

    If not you might be using a standard (x11) Qt for arm that does not contain the QWS code

    Hope it helps

  • Hey SGaist, thanks for your reply!

    On the Beaglebone, I've installed qt4-embedded by:

    @root@beaglebone:~# opkg install qt4-embedded --force-depends

    Apparently, qt4-embedded installs correctly since I don't see any error when doing this....

    Any other ideas?

  • Lifetime Qt Champion

    I don't think the symbols have changed in between, but what Qt version to you have installed on your device ?

    Also, the message concerning iconv are suspicious, is it installed correctly ?

  • The Qt version on BBB is Qt 4.8.1
    According to what I see, it seems to be properly install and updated...

    @root@beaglebone:~# opkg install qt4-embedded --force-depends
    @Package qt4-embedded (4.8.1-r50.1.2) installed in root is up to date.

    So everything seems to be fine as far as I understand...

    Could it be that I configured Qt for the Cross Compiler with the -no-neon option? It's the only different thing
    I've done in comparison with this blog...


  • Lifetime Qt Champion

    Might be...

    Could you try with your Qt built with neon ?

  • The missing symbol you are getting is the QWidget::qwsEvent(QWSEvent*) method. It is only present on Qt-Embedded (built with QWS). So you have compiled your project for Qt-Embedded, but it looks like it's trying to use the Qt-X11 libraries that don't have this symbol.

    On Beaglebone the Qt-Embedded binaries are suffixed with E (e.g. libQtGuiE) and if your cross-toolchain was not configured to use this mapping, you will end up targeting wrong libraries (i.e. it will import a method defined in libQtGuiE from libQtGui that does not have it). This can be fixed by adding the QT_LIBINFIX = E line in the mkspecs file on your build machine. Double-check it by ensuring that the makefile generated by qmake mentions -lQtGuiE and -lQtCoreE.

    You can follow "this tutorial": for a step-by-step guide on setting up Qt-Embedded cross-compilation for Beaglebone (it uses Windows, but it should be similar if you are using Linux). Note the QT_LIBINFIX patch and the OE_QMAKE_xxx variables.

  • Hi,

    I've got a similar problem when executing my test application on my Beaglebone Black with -qws option but it fails with the following error message:

    root@beaglebone:/opt/TestApp/bin# ./TestApp -qws
    QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
    Qml debugging is enabled. Only use this in a safe environment!
    QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed
    TestApp: cannot connect to X server
    '*** glibc detected *** ./TestApp: munmap_chunk(): invalid pointer: 0xb5f89d88 ***

    Error 1 are the missing symbols.
    But Error 2 is weird. I built my qt based on "this tutorial.":
    I give it the -qws option but anyway it tries to use X11 server. Do you have an idea why?
    I've got another application which I can start with -qws and it works well. But unfortunately I don't know exactly how it's built.

    Thanks in advance for your help!

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.