-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rqt fails with python error on macOS #58
Comments
Hi Alex, thanks for reporting this! That'll be a tricky one with all the sip and Qt stuff involved. Could you please check whether rviz and rqt_rviz work? Did you ever manage to successfully run rqt on OSX using e.g. a homebrew installation? |
If I start it as a plugin I get this:
Or like this:
|
I have never used |
Actually it doesn't seem to be a formula / tap anymore in |
I have the same problem, I have tried the following method:
|
The problem seems to come from It can be replicated very easily in python like this:
Should we raise an issue in the |
As this is a recurring theme - @traversaro (as a CMake expert) - is there a way to use catkin to remove |
@Tobias-Fischer is it not enough to add the undefined dynamic_lookup? Do we need to remove the Python libraries? I remember that I had to add the undefined dynamic_lookup to MoveIt as well... |
Oh I'm not sure. I thought the undefined lookup stuff is only needed because otherwise an error is thrown when removing the python libraries? Better be safe ;) |
If I remember correctly catkin redefines |
Actually I took at step back, and I tried to understand why removing the linking to However, if I am not wrong the original problem seems to be that the deprecated |
Another common strategy is to just set the |
@Tobias-Fischer is it |
Thanks for your suggestions, Silvio! I guess we want to avoid changing any code in random packages, as this would require us to know the python libraries are being linked to, which isn't obvious as in the case of rospack (I'm referring to adding a call to PythonInterp). We already set the PYTHON_EXECUTABLE as far as I remember. Howeve, I like your suggestion of adding PYTHON_LIBRARY and PYTHON_INCLUDE_DIR. Do you happen to know where they should point to? This is easy to change in the build template. |
Interesting, how wonder why it is not working then (or perhaps the issue is another).
Unfortunately I am afraid those are platform and python version dependent, for Python 3.9 with macOS I guess is:
|
The good news is that I haven't yet gone through all the plug-ins, but I'll do that in time. The bad news is that The easiest way to reproduce it is to invoke
if I enter manually the package and the launch file I get later the same error when the nodes are started:
the
Should I setup a different issue for this and keep this one closed (as rqt) starts? |
Oh, and I forgot to say that |
I've downgraded to the build 5 of
so the link to |
I am wondering if the fix with removing python linking was too much? maybe just allowing undefined lookup stuff does the job? |
I may be missing something, but I think that the undefined lookup stuff was only there to ensure that the macOS linking process was not complaining that the Python symbols were not present in the linked libraries, if you just add the undefined lookup stuff I do not think anything will change. |
It's actually even more strange:
While upgrading earlier to
I can also use the `joint_state_publisher' to control the joints: |
I pushed a new version of rospack that links against python, and it is working fine. I also pushed a new version of rqt, which seems to work fine. However, rviz still doesn't start. When was rviz last working for you, @sonelu? Could you try digging further whether it is actually related with the rqt stuff? |
@sonelu Could you please tell me how do you run the rqt? After upgrade rospack, the error of python has gone, I can even see the logo of ROS after I run rqt. But no window pop up and the programjust stuck there. Do you have encountered the same problem? Any information will be highly appreciated, Thanks! |
I don't see a ROS logo when I start Have you compared the packages above with the ones in your environment? Is any difference (make sure you check the build and the channel too)? |
And one more thing, I mentioned that somewhere above: when starting |
What I have different is the version of
Your version is the one that Tobias pushed earlier. I actually haven't tested that new one on my system. Try downgrading with: conda install ros-noetic-rospack=2.6.2=py38h22c0035_5 (maybe use Can you also send the packages for Qt that you have installed to compare with my stack? |
Also: which OS version you have? Catalina or Big Sur. And are you using an Intel or M1 Mac? |
@sonelu I use Big Sur 11.2.1, Intel MBP 2018.
|
It could be because of Big Sur. I've seen packages that have different build rules for OS version 11. We can compare the whole conda environment if you want, but that might not be the that conclusive. If you are up for it you could setup a separate volume where you install Catalina and check a fresh conda install there. I also do that: I have a volume with High Sierra because I'm using an external GPU (Thuderbolt 3) with an NVidia 1080 for DL work. And there are no drivers for NVidia after High Sierra... Let me know if you would be interested in this, I could send you the procedure. |
I've found this about Qt on Big Sur Do you have any application that uses Qt that runs (nut just from ROS stack)? |
Possibly related issue: conda-forge/qt-feedstock#186 . |
@sonelu Yes, I have just tried a small project I previously built on Qt and it works fine. I find that the Qt version I installed by Homebrew is 5.15.2, in which the Qt issue is resloved.(https://bugreports.qt.io/browse/QTBUG-87014) |
I see @Tobias-Fischer is on the list of maintainers for the feedstock for Qt. Maybe he can help here. |
There is this PR: conda-forge/qt-feedstock#189 If someone could try building QT on OSX that'd be great. I'm already building the aarch builds and I don't have time to maintain OSX as well .. |
Do you want it on Catalina or Big Sur? |
I think @hmaarrfk tried to build on Big Sur and it didn't work. So ideally building on Catalina and then test whether it works on Big Sur. |
If you'd be happy to help out with this that'd be great @sonelu . It seems indeed that @jc-bao's problem is because of Big Sur and could be fixed by conda-forge/qt-feedstock#189. If you'd be happy to try building the new version of QT on OSX, let's keep chatting in conda-forge/qt-feedstock#189 what the best way to do that would be. |
I have been checking rqt on OS X (Big Sur) and libqt_gui_cpp_sip crashes for me:
with Fatal Python error: _PyInterpreterState_Get(): no current thread state I am going to check if there is something we can do that doesn't require rebuilding Qt! |
ok that was a false alarm. I had build number 5 installed. Latest rqt doesn't have this issue, but I cannot see the window either. |
If I run rqt apps "standalone", they start to a blank screen. (e.g. |
I made a PR to qt for big sur issues. I think it might be related. |
I am trying to build Qt right now! Thanks @hmaarrfk |
So am I 😂 |
@sonelu sir can you pls tell how to run the the launch file through roslaunch ? |
@Ghanmohan Which package are you referring to? And what exactly are you trying to launch with |
@sonelu I am having a rviz launch file |
Assuming you have installed the full ROS stack (ex Can you run If you can run |
@sonelu when I am sourcing my file it is showing that the file or directory is not present. |
Hello, this issue persists on my side with qt version 5.12.9. how can I upgrade that package? |
Hi @binnurr, can you open a new issue including:
This would be helpful for people to help you, thanks! |
Context:
MacOS Catalina 10.15.7 (19H524)
Conda: 4.9.2
Python: 3.8.8
Installed ros-noetic-desktop-full in it's own environment.
Installation run without any error.
When starting
rqt
there is a python crash:There is a long dump that MacOS produces and the top is the following:
The issue seems to be in
libqt_gui_cpp_sip.so
that might somehow be linked to a differentlibpython
althoughotool
seems fine:Thanks,
Alex.
The text was updated successfully, but these errors were encountered: