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

cross compiled qt for BBB



  • Hi,

    I downloaded the qt source code and cross compiled the qt for my beaglebone board with VNC viewer software.

    I want to connect touch screen to my beaglebone board,and want to see the applications output on touch screen display..

    but i got ,if i need to display the output on touch screen display then i need to cross compile qt with eglfs,really i need to configure with eglfs? or with this VNC viewer only i will get the output on touch screen display..

    if yes(cross compilation qt with eglfs),then please send me any link which cross compiled with eglfs for beaglebone board,because i tried many things but i am not got success with eglfs...

    Thankyou....



  • Hi,

    I connected my beagleboneboard to display,

    And trying to execute the qt application,when executed

    I am getting the erro like

    Qxcb connection:could not connect to the display
    aborted..

    how do i execute and display the output on my board display..

    what is the mistake, how to solve that error please guide me....


  • Lifetime Qt Champion

    @Asha said in cross compiled qt for BBB:

    Qxcb connection:could not connect to the display

    Do you have X11 running on your device?



  • @jsulm
    how do I check which one is running in my device?


  • Lifetime Qt Champion

    @Asha You should know what is running on your device. What os and window manager is running on it? Do you use X11, framebuffer or something else?



  • @jsulm

    while connecting the board to display,iam getting the

    Qxcb connection :could not connect to the display..

    what it means?


  • Lifetime Qt Champion

    @Asha said in cross compiled qt for BBB:

    what it means?

    That X11 server is not running on your device I guess.


  • Lifetime Qt Champion

    As we already told you several time: you don't have an X server running.

    Please answer @jsulm questions about what graphical stack you are running on your board.



  • @SGaist

    the running OS is debian.

    i cross compiled qt ,i am running the executable in my laptop through board,i installed vnc software in my laptop ,in this vnc server i am able to see the output..but while connecting the display i am getting that error..

    can i install vnc software in my beaglebone board,and after that executing that exe file ,can i get the output in display?



  • @jsulm how to run that or how to enable that server on my board?


  • Lifetime Qt Champion

    @Asha said in cross compiled qt for BBB:

    can i install vnc software in my beaglebone board

    There is no need to do this if you want your app running on directly connected display! VNC is for REMOTE access.

    "how to run that or how to enable that server on my board?" - simply install a desktop environment like XFCE/Gnome/... or at least a window manager, it will install X11 as well. But I'm wondering how you plan to use your device if you do not even know what is actually running there and what you actually want to use on the device?



  • @jsulm said in cross compiled qt for BBB:

    desktop environment like XFCE/Gnome/

    I have debian desktop on my display(beagleboneboard),

    when I boot the sdcard,i am able to see debian os on my display screen(even two to three folders also i am able to see)but while executing this qt exe file only i am getting that error..



  • @Asha said in cross compiled qt for BBB:

    i am able to see debian os on my display screen(even two to three folders also i am able to see)

    Please post an screenshot or picture of that display, and state if such display is attached to the board OR if the display of your laptop you connect to your device.


  • Lifetime Qt Champion

    @Asha said in cross compiled qt for BBB:

    debian desktop

    There is no such thing. Debian is a Linux distribution and can be used with many different desktops and window manager.
    What does

    ps -e | grep X 
    
    

    output?



  • @jsulm

    I need to run this on my host machine right...
    I am running this command in my beagle user..
    I got the output

    945 tty1 00:00:00 Xwayland
    1064 tty2 00:00:08 Xorg

    while running that command in beagleboneboard(via ssh) not getting anything..


  • Lifetime Qt Champion

    @Asha said in cross compiled qt for BBB:

    while running that command in beagleboneboard(via ssh) not getting anything..

    when there is no XServer running. Just to be sure: you're running this command when the graphical desktop is shown?
    You need to find out what is used on your device. Could be directfb for example.



  • @jsulm said in cross compiled qt for BBB:

    you're running this command when the graphical desktop is shown?

    no,
    I run that command without the connecting display..
    ps -e | grep X

    this command displays all process status which are running right..

    one more thing I want to clear,

    "I put sdcard in my board,and executing the qt application without connecting the display, then getting the same error Qxcb"

    but

    "without sdcard, I am executing the qt application ,then its asking

    Qvnc server created on port 5900"

    when I execute the VNC software in my host machine, I am able to see the output..


  • Lifetime Qt Champion

    @Asha said in cross compiled qt for BBB:

    no,

    Then make sure your display is connected and you can see graphical desktop and then run the command...



  • @jsulm

    I connected my board with display,

    And,I am able to see the graphical desktop on my display,

    while giving this command

    ps -e | grep X

    I got the result:

    1199 tty7 00:00:02 Xorg

    so what it means?


  • Lifetime Qt Champion

    @Asha said in cross compiled qt for BBB:

    so what it means?

    So, now X server is running. But your app doesn't start, right?
    You get "Qxcb connection:could not connect to the display"?
    Do you start your app as root or normal user?



  • @Asha in addition to @jsulm question,

    Do you start your app as root or normal user?

    How are you starting your application:
    Do you have a physical keyboard attached to the board?
    Or do you connect to the board from PC with a SSH session?



  • @jsulm said in cross compiled qt for BBB:

    You get "Qxcb connection:could not connect to the display"?

    yes

    Do you start your app as a root

    this means ,first i need to do

    ssh debian@192.168.7.2
    after this sudo su

    root@beaglebone:

    now I need to run the application right?

    but what about that normal user?
    I need to run it on my Desktop machine?
    without ssh?


  • Lifetime Qt Champion

    @Asha said in cross compiled qt for BBB:

    after this sudo su

    NO! You should not start it as root.

    Can you connect a keyboard to your device and start directly there without SSH.



  • @Asha said in cross compiled qt for BBB:

    ssh debian@192.168.7.2

    Ok, after millions of posts we finally reach the point where you stated how you're starting the application in the board...

    It looks like you're NOT forwarding the X display. Please try connecting to the board this way:

    ssh -X debian@192.168.7.2
    

    and then proceed as you've been doing to start the Qt app



  • @Pablo-J-Rogina

    while connecting as you said above ,

    getting the result

    s
    libEGL warning: DRI3: failed to query the version
    libEGL warning: DRI2: failed to authenticate
    ./animatedtiles: relocation error: ./animatedtiles: symbol _ZN18QRandomGenerator646globalEv, version Qt_5 not defined in file libQt5Core.so.5 with link time reference


  • Lifetime Qt Champion

    @Asha Deploy your app correctly (include your cross compiled Qt libraries). Looks like you have different Qt version on your device than the one you cross compiled.



  • @jsulm

    I have those libraries in usr lib directory

    root@beaglebone:find / -name libGLESv2* -type f
    /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0
    root@beaglebone: find / -name libEGL* -type f
    /usr/lib/arm-linux-gnueabihf/libEGL_mesa.so.0.0.0
    /usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0

    @jsulm said in cross compiled qt for BBB:

    Looks like you have different Qt version on your device than the one you cross compiled.

    how do I found,which version qt is running on my device?


  • Lifetime Qt Champion

    @Asha Do

    ldd YOUR_EXECUTABLE
    

    on your device and see which Qt libs linker finds.



  • @jsulm

    this is the result:

    debian@beaglebone:~/Qt5/examples/widgets/animation/animatedtiles$ ldd ./animatedtiles
    linux-vdso.so.1 (0xbeffe000)
    libQt5Widgets.so.5 => /usr/lib/arm-linux-gnueabihf/libQt5Widgets.so.5 (0xb6b07000)
    libQt5Gui.so.5 => /usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5 (0xb67dd000)
    libQt5Core.so.5 => /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5 (0xb6469000)
    libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6445000)
    librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb642f000)
    libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb641c000)
    libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb6310000)
    libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6298000)
    libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb626f000)
    libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6181000)
    libGLESv2.so.2 => /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 (0xb6163000)
    /lib/ld-linux-armhf.so.3 (0xb6f44000)
    libharfbuzz.so.0 => /usr/lib/arm-linux-gnueabihf/libharfbuzz.so.0 (0xb60e7000)
    libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0xb60c5000)
    libpng16.so.16 => /usr/lib/arm-linux-gnueabihf/libpng16.so.16 (0xb6095000)
    libicui18n.so.57 => /usr/lib/arm-linux-gnueabihf/libicui18n.so.57 (0xb5ee8000)
    libicuuc.so.57 => /usr/lib/arm-linux-gnueabihf/libicuuc.so.57 (0xb5dbf000)
    libpcre16.so.3 => /usr/lib/arm-linux-gnueabihf/libpcre16.so.3 (0xb5d67000)
    libdouble-conversion.so.1 => /usr/lib/arm-linux-gnueabihf/libdouble-conversion.so.1 (0xb5d49000)
    libglib-2.0.so.0 => /lib/arm-linux-gnueabihf/libglib-2.0.so.0 (0xb5c6e000)
    libGLdispatch.so.0 => /usr/lib/arm-linux-gnueabihf/libGLdispatch.so.0 (0xb5bf0000)
    libfreetype.so.6 => /usr/lib/arm-linux-gnueabihf/libfreetype.so.6 (0xb5b77000)
    libgraphite2.so.3 => /usr/lib/arm-linux-gnueabihf/libgraphite2.so.3 (0xb5b4c000)
    libicudata.so.57 => /usr/lib/arm-linux-gnueabihf/libicudata.so.57 (0xb42bf000)
    libpcre.so.3 => /lib/arm-linux-gnueabihf/libpcre.so.3 (0xb4260000)

    In this libEGL library missing ,how do I solve this ?


  • Lifetime Qt Champion

    @Asha Your current problem is not libEGL.
    The problem is here: ./animatedtiles: relocation error: ./animatedtiles: symbol _ZN18QRandomGenerator646globalEv, version Qt_5 not defined in file libQt5Core.so.5 with link time reference

    Are these Qt libs the libs you cross compiled and exact same version you're using on your host to cross compile your app?

    libQt5Widgets.so.5 => /usr/lib/arm-linux-gnueabihf/libQt5Widgets.so.5 (0xb6b07000)
    libQt5Gui.so.5 => /usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5 (0xb67dd000)
    libQt5Core.so.5 => /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5 (0xb6469000)
    


  • @jsulm

    my configure command is exactly as shown in below ,please go through this

    ./configure -platform linux-g++ release -device linux-beagleboard-g++ -sysroot /home/beagle/BBB/sysroot -prefix /home/debian/Qt5 -hostprefix ~/Qt5 -device option
    CROSS_COMPILE = /home/beagle/BBB/gcc-linaro......gnuabihf- -nomake tests -nomake examples -no-opengl -opensource -confirm-license -reduce-exports -make libs -no-egl -no-eglfs -qt-zlib -qt-libpng -no-use-gold-linker-linuxfb -qt-libjpeg -no-opengl -no-cups -no-glib -no-iconv -nomake examples -nomake tools -nomake tests -no-pkg-config -skip qtdeclarative -skip qtlocation -skip qtpurchasing -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwebglplugin -skip qtandroisextras -skip qtgamepad -skip qtmacextras -skip qtwinextras -skip qtsensors -skip qtconnectivity -recheck-all -v

    any mistakes in this configuration then please let me know..(if any mistakes then what configuration I need to give ,for my X server, beagleboneboard,just i want to run a simple qt application in my board and display the output in my display screen)...


  • Lifetime Qt Champion

    @Asha You did not answer my question.
    Where did you put your cross compiled Qt on the device?



  • @jsulm

    I copied my cross compiled qt in my board via

    scp Qt5 debian@192.168.7.2:Qt5

    means directly in my device only,not in any directory(where i need to copy that one)..


  • Lifetime Qt Champion

    So you did not copy the libraries at the exact same place on your device ?

    Your system installed Qt is picked before the one you copied.

    So one solution is to call: LD_LIBRARY_PATH=/path/to/your/cross-compiled_qt/lib ./YOUR_EXECUTABLE_NAME.


  • Lifetime Qt Champion

    @Asha said in cross compiled qt for BBB:

    means directly in my device only

    Your app definitely uses wrong Qt libs.
    You have to copy the Qt libs into same directory you specified in -prefix. In your case /home/debian/Qt5.
    If this is the case then try following to start your app on device:

    cd DIR_WHERE_YOUR_APP_IS
    export LD_LIBRARY_PATH=/home/debian/Qt5
    ./YOUR_APP
    


  • @jsulm

    now at present I don't have my display,

    but while giving this

    @jsulm said in cross compiled qt for BBB:

    cd DIR_WHERE_YOUR_APP_IS
    export LD_LIBRARY_PATH=/home/debian/Qt5
    ./YOUR_APP

    I am getting the output in my laptop,it just blinking for a second..

    If I connect my display, and then I execute as you told,then can I get the result in my display?


  • Lifetime Qt Champion

    @Asha said in cross compiled qt for BBB:

    If I connect my display, and then I execute as you told,then can I get the result in my display?

    If nothing else is wrong then yes



  • @jsulm

    Hi,

    now i connected my device to the display ,and i followed as you said..
    but i am not getting the output in display screen,getting output in my laptop...


  • Lifetime Qt Champion

    @Asha said in cross compiled qt for BBB:

    getting output in my laptop

    Did you redirect the output as @Pablo-J-Rogina suggested before?
    If so then do not redirect, just make sure you see graphical desktop on the display.



  • @jsulm said in cross compiled qt for BBB:

    Did you redirect the output as @Pablo-J-Rogina suggested before?

    i am not understand this one,what your trying to ask?

    i burned new image in my sdcard,and i put that sdcard into the BBB after that trying to execute this qt applications,

    while trying with

    ssh debian@192.168.7.2
    getting Qxcb error

    And trying with

    ssh -X debian@192.168.7.2

    getting this with displaying the output in laptop

    libEGL warning: DRI3: failed to query the version
    libEGL warning: DRI2: failed to authenticate
    QXcbConnection: XCB error: 1 (BadRequest), sequence: 405, resource id: 220, major code: 154 (Unknown), minor code: 1


Log in to reply