The problem is that on Linux the shiboken packages lack of the shiboken2 Python module. So, on these systems it's mandatory that we still link against the shared C++ libraries of shiboken2 and PySide2.During initialization the error "Cannot load shiboken module" occurred in /usr/local/Mod/Tux/InitGui.py
Code: Select all
ui = FreeCADGui.UiLoader() w = ui.createWidget("Gui::InputField") w.show() w.property("quantity") # when linking against the C++ libs this correctly returns the quantity, otherwise an error is raised
I'm not sure if this is a Linux-specific issue. Maybe a Debbian-specific issue?
I bet if I can find a way to link against these shared c++ libraries, I should hopefully be able to reproduce the error...Thanks for the hint.
This seems very reasonable. However, my first step will be to reproduce the error, after which I will spend some time exploring whether or not there are any alternative approaches, especially considering:
If the "python modules approach" (as you call it) breaks portions of the code base, then I will either need to abandon the PR altogether or fix the issues whenever I re-submit the PR.
It's not Linux-specific but distribution-specific -- it's a bug in the packaging script. I know Debian and all its derivatives are affected but I don't know about other distributions.I'm not sure if this is a Linux-specific issue. Maybe a Debbian-specific issue?
Personally I prefer the Python module approach as this is much more elegant (just look at the ugly check to find the correct cmake file when trying to link the shared libraries instead).If the "python modules approach" (as you call it) breaks portions of the code base, then I will either need to abandon the PR altogether or fix the issues whenever I re-submit the PR.
Well, you’re probably more familiar with the code base than me.
On my virtual Xubuntu 18.04 using PySide2 and Qt 5.9.5 works without problems. The corresponding shiboken2/PySide2 version is 5.11.2I think the issue may be related to the version of Qt that ships with (l)ubuntu 18.04 LTS. It is using Qt 5.9.5, but I believe pyside2 explicitly requires Qt >= 5.12
So shiboken2 is version 5.11.2, built against Qt 5.9.5? Hrm, for some reason I thought the version had to match (though I can't actually recall reading that anywhere...)