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 => /opt/Qt5.8.0/5.8/gcc_64/lib/ (0x00007f18e4db1000) => /opt/Qt5.8.0/5.8/gcc_64/lib/ (0x00007f18e4616000) => /opt/Qt5.8.0/5.8/gcc_64/lib/ (0x00007f18e3ef5000) => /usr/lib/x86_64-linux-gnu/ (0x00007f18e00c5000) => /usr/lib/x86_64-linux-gnu/ (0x00007f18df411000) => /usr/lib/x86_64-linux-gnu/ (0x00007f18df1ec000) => /usr/lib/x86_64-linux-gnu/ (0x00007f18ded07000) => /opt/Qt5.8.0/5.8/gcc_64/lib/ (0x00007f18dbadc000) => /opt/Qt5.8.0/5.8/gcc_64/lib/ (0x00007f18db724000) => /opt/Qt5.8.0/5.8/gcc_64/lib/ (0x00007f18d9d40000)

    Can you tell me what to try next?

    Thank you.

  • Qt Champions 2017

    "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 2017

    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 2017


    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
    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:
    Find the GDB manual and other documentation resources online at:
    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/".

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

  • Qt Champions 2017

    @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


    so I do wonder if there is a version mismatch?

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

  • Qt Champions 2017

    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 2017

    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 2017

    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 2017

    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.