Solved ROS Node using libraries from Qt4 and Qt5 only on my PC
-
@mrjj What do you mean by "external .so"? If any file were missing, wouldn't the compiler give me an error?
-
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 -
@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.
-
@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. -
@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. -
@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. -
@Redox15
ok so that solved it?