ROS Node using libraries from Qt4 and Qt5 only on my PC



  • After migrating an application, on Ubuntu 14.04, from Qt4 to Qt5, I couldn't run it anymore.
    Two of my colegues made some changes and now they can run the application without problems and I can't.
    We use a private git and I cloned to my PC, deleted build files, installed last Qt version and still can't use the application.

    After checking the libraries used by the ros node and comparing with my friends, I noticed that it's using only libQt5* on them and this on mine.

    ldd ~/catkin_ws/devel/lib/gui_byrdone/gui_byrdone | grep Qt
    libQt5Widgets.so.5 => /opt/Qt5.8.0/5.8/gcc_64/lib/libQt5Widgets.so.5 (0x00007f18e4db1000)
    libQt5Gui.so.5 => /opt/Qt5.8.0/5.8/gcc_64/lib/libQt5Gui.so.5 (0x00007f18e4616000)
    libQt5Core.so.5 => /opt/Qt5.8.0/5.8/gcc_64/lib/libQt5Core.so.5 (0x00007f18e3ef5000)
    libQtOpenGL.so.4 => /usr/lib/x86_64-linux-gnu/libQtOpenGL.so.4 (0x00007f18e00c5000)
    libQtGui.so.4 => /usr/lib/x86_64-linux-gnu/libQtGui.so.4 (0x00007f18df411000)
    libQtTest.so.4 => /usr/lib/x86_64-linux-gnu/libQtTest.so.4 (0x00007f18df1ec000)
    libQtCore.so.4 => /usr/lib/x86_64-linux-gnu/libQtCore.so.4 (0x00007f18ded07000)
    libicui18n.so.56 => /opt/Qt5.8.0/5.8/gcc_64/lib/libicui18n.so.56 (0x00007f18dbadc000)
    libicuuc.so.56 => /opt/Qt5.8.0/5.8/gcc_64/lib/libicuuc.so.56 (0x00007f18db724000)
    libicudata.so.56 => /opt/Qt5.8.0/5.8/gcc_64/lib/libicudata.so.56 (0x00007f18d9d40000)

    Can you tell me what to try next?

    Thank you.


  • Qt Champions 2016

    Hi
    "Two of my colegues made some changes and now they can run the application without problems and I can't."

    So what did they do ?



  • @mrjj I don't know what they did different. Maybe they installed Qt5 in a different way but they did long ago and they can't remember.


  • Qt Champions 2016

    @Redox15
    Did you check if any external so are missing?
    (with ldd)



  • @mrjj What do you mean by "external .so"? If any file were missing, wouldn't the compiler give me an error?


  • Qt Champions 2016

    @Redox15

    The Qt plugins also loads (on the fly) other so files.
    That is not related to the compiler. So if exe wont start, its missing something.

    You are not really clear about what is happening when you run it so it can be anything. :)
    (can it run in Creator ?)



  • @mrjj You missed the part that I'm working on Ubuntu and with ROS Nodes. So, no exe file.

    When I run it, it gives me Segmentation fault.

    With gdb:
    rosrun --prefix 'gdb -ex run --args' gui_byrdone gui_byrdone
    GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
    Copyright (C) 2014 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law. Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-linux-gnu".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    http://www.gnu.org/software/gdb/bugs/.
    Find the GDB manual and other documentation resources online at:
    http://www.gnu.org/software/gdb/documentation/.
    For help, type "help".
    Type "apropos word" to search for commands related to "word"...
    Reading symbols from /home/andre/catkin_ws/devel/lib/gui_byrdone/gui_byrdone...(no debugging symbols found)...done.
    Starting program: /home/andre/catkin_ws/devel/lib/gui_byrdone/gui_byrdone
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

    Program received signal SIGSEGV, Segmentation fault.
    0x00007fffef7e4dfc in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4


  • Qt Champions 2016

    @Redox15 said in ROS Node using libraries from Qt4 and Qt5 only on my PC:

    Sorry, yes, didnt see ROS Nodes. (no idea what that is)

    One thing i do wonder.

    In first post you have /opt/Qt5.8.0/5.8/
    Qt5.8 version but later it says

    /usr/lib/x86_64-linux-gnu/libQtGui.so.4

    so I do wonder if there is a version mismatch?



  • @mrjj As you can see in the main post, it uses libQt5Gui.so.5 and libQtGui.so.4, but I don't know why since I'm using the same CMakeList that my colleagues.


  • Qt Champions 2016

    @Redox15
    Well it seems to me it tries to load both Qt4 and Qt54 so files but if a ROS node is external and the others are using same nodes
    i dont know if that is ok or not. If its the same "machine" others are using then I guess that cant be at fault.
    So if it was a local runnning project I would ask you to check with Qt5-default (apt-get) and qtchooser what is considered the
    active Qt as often the distro supply one and if u install say 5.8 its lives in other paths and
    when u try to run say qmake, you get the wrong version.
    But Im afraid the ROS nodes are a bit out of my league ;)



  • @mrjj First of all thank you for trying.
    I did qtchooser -print-env and qtchooser -l and it give me the same output as my colleagues.


  • Qt Champions 2016

    @Redox15
    Ok, so it sounds that you are pretty sure you are using 5.8
    and so are they?

    Anyway, give it a day or two. Im pretty linux blond so I would wait for the hardcore
    to read it. Hopefully there is enough info to give suggestions. :)

    Have you considered just cloning a working linux?
    From your colleagues.



  • @mrjj After removing Qt4, it returns me this error when I try to compile.
    /usr/bin/ld: cannot find -lQtWebKit
    No solution found on google search.


  • Qt Champions 2016

    @Redox15
    Webkit is not part of Qt5.8 .
    See the forum section for more info.



  • On my CMakeLists.txt I had target_link_libraries(<project_name> QtWebKit ...)
    I changed to Qt5WebKit.


  • Qt Champions 2016

    @Redox15
    ok so that solved it?


Log in to reply
 

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