Details
-
Suggestion
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
Qt Creator 4.8.1
-
None
-
Linux Mint Cinnamon 19.1 x64 (This is fresh new installation with latest updates)
Qt Creator 4.8.1 (Qt 5.12.0) installed to /opt/Qt/
ROS Melodic installed to /opt/ros/melodic
Description
Please advice in future if I should reopen existing bug or I should create a new one since it is little different. The previous bug is QTCREATORBUG-21663
A couple of days ago I did set up my new workstation (Linux Mint Cinnamon 19.1). The previous workstation I used Ubuntu 18.04 when I reported 21663
After switching to Linux Mint Cinnamon 19 an installing Qt 5.12.0 like I always do, here is the new problem I see. Following previous bug suggestions I created ~/.profile and added a couple of lines:
source "$HOME/.bash_aliases" source "$HOME/.bash_robert"
Both of these lines are also in my ~/.bashrc. I restarted my system. Now I can build and run my project from terminal just fine. But when I try to run it from Qt Creator I get an error of missing shared library which belongs to ROS installation. Here is the line
..... error while loading shared libraries: libclass_loader.so: cannot open shared object file: No such file or directory
So next step I did ldd on my executable and sure enough such so file was found in
libclass_loader.so => /opt/ros/melodic/lib/libclass_loader.so (0x00007f4c5fe37000)
Next, I checked if LD_LIBRARY_PATH was set. It wass
$ env | grep LD_LIBRARY LD_LIBRARY_PATH=/opt/ros/melodic/lib
To make sure that ~/.profile is loaded I did ssh from another machine and also checked if LD_LIBRARY_PATH was exported and it was. Also I temporary exported another export ROBERT ="hello" variable in .profile. Again after I ssh from a remote machine I could see ROBERT set and ~/.bashrc was not sourced. So everything is ok so far.
So now based on suggestions in QTCREATORBUG-21663, starting Qt creator should use ~/.profile and then LD_LIBRARY_PATH should be visible. Please remember all above again is done after creating ~/.profile and rebooting.
Next thing, I started Qt Creator 4.8.1 from the pinned taskbar and loaded came cmake/c++/qt/ros project. I checked Project -> Build & Run -> Run -> Run Environment and I do not see LD_LIBRARY_PATH in there. Not sure if it should but I figured I should mention it here.
Next, I started same Qt creator from Terminal
$ /opt/Qt/Tools/QtCreator/bin/qtcreator
This time loading and starting my project was not a problem.
So the last final thing I did try was modifying this line in /usr/share/applications/DigiaQt-qtcreator-community.desktop
Exec=/opt/Qt/Tools/QtCreator/bin/qtcreator with Exec=/bin/bash -i -c /opt/Qt/Tools/QtCreator/bin/qtcreator
Now starting Qt Creator from the pinned taskbar, loading my project and starting my project was not a problem.
Also, QTCREATORBUG-21404 which was added to QTCREATORBUG-21663 by me suggest removing /bin/bash -i -c and it did help them. Not adding it works again.
Please advise if you think this might be Mint related issue. If so I will take it with Mint developers.