{Resolved} Shiboken problem

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
mconsidine
Posts: 125
Joined: Wed Jan 18, 2023 10:41 pm
Location: Randolph, VT USA

{Resolved} Shiboken problem

Post by mconsidine »

I'm getting a new error related to 'shiboken' after pulling the latest source from fit.

Firstly,

Code: Select all

OS: Linux Mint 21 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.21.0.31765 (Git)
Build type: Unknown
Branch: master
Hash: d33005d14e73fdfcc94cc5bd131c578339aa3b8a
Python 3.10.6, Qt 5.15.3, Coin 4.0.1, Vtk 9.1.0, OCC 7.5.1
Locale: English/United States (en_US)
Installed mods: 
  * toSketch 1.0.1
  * toSketch.backup1675442209.7464736 1.0.1 (Disabled)
The error in the Report view is:

Code: Select all

17:22:14  QFSFileEngine::open: No file name specified
17:24:37  Traceback (most recent call last):
  File "/home/matt/.local/share/FreeCAD/Macro/test2.FCMacro", line 7, in <module>
    import SplitFeatures
  File "/usr/lib/python3/dist-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
<class 'ModuleNotFoundError'>: No module named 'SplitFeatures'
Working backwards, there seems to be an issue in the cmake process as I see this (excerpted from the cmake-gui output):

Code: Select all

Shiboken2Config: Using default python: .cpython-310-x86_64-linux-gnu
Found PythonInterp: /usr/bin/python3.10 (found suitable version "3.10.6", minimum required is "3") 
CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindPythonInterp.cmake:171 (mark_as_advanced):
  Policy CMP0102 is not set: The variable named "PYTHON_EXECUTABLE" is not in
  the cache.  This results in an empty cache entry which is no longer created
  when policy CMP0102 is set to NEW.  Run "cmake --help-policy CMP0102" for
  policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.2/shiboken_helpers.cmake:318 (find_package)
  /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.2/Shiboken2Config.cpython-310-x86_64-linux-gnu.cmake:44 (shiboken_find_required_python)
  /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.2/Shiboken2Config.cmake:5 (include)
  cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake:22 (find_package)
  CMakeLists.txt:76 (SetupShibokenAndPyside)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindPythonLibs.cmake:277 (mark_as_advanced):
  Policy CMP0102 is not set: The variable named "PYTHON_DEBUG_LIBRARY" is not
  in the cache.  This results in an empty cache entry which is no longer
  created when policy CMP0102 is set to NEW.  Run "cmake --help-policy
  CMP0102" for policy details.  Use the cmake_policy command to set the
  policy and suppress this warning.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.2/shiboken_helpers.cmake:319 (find_package)
  /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.2/Shiboken2Config.cpython-310-x86_64-linux-gnu.cmake:44 (shiboken_find_required_python)
  /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.2/Shiboken2Config.cmake:5 (include)
  cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake:22 (find_package)
  CMakeLists.txt:76 (SetupShibokenAndPyside)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake-3.22/Modules/SelectLibraryConfigurations.cmake:47 (set):
  Policy CMP0126 is not set: set(CACHE) does not remove a normal variable of
  the same name.  Run "cmake --help-policy CMP0126" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, normal variable
  "PYTHON_LIBRARY_DEBUG" will be removed from the current scope.
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPythonLibs.cmake:295 (SELECT_LIBRARY_CONFIGURATIONS)
  /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.2/shiboken_helpers.cmake:319 (find_package)
  /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.2/Shiboken2Config.cpython-310-x86_64-linux-gnu.cmake:44 (shiboken_find_required_python)
  /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.2/Shiboken2Config.cmake:5 (include)
  cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake:22 (find_package)
  CMakeLists.txt:76 (SetupShibokenAndPyside)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake-3.22/Modules/SelectLibraryConfigurations.cmake:77 (mark_as_advanced):
  Policy CMP0102 is not set: The variable named "PYTHON_LIBRARY_RELEASE" is
  not in the cache.  This results in an empty cache entry which is no longer
  created when policy CMP0102 is set to NEW.  Run "cmake --help-policy
  CMP0102" for policy details.  Use the cmake_policy command to set the
  policy and suppress this warning.
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPythonLibs.cmake:295 (SELECT_LIBRARY_CONFIGURATIONS)
  /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.2/shiboken_helpers.cmake:319 (find_package)
  /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.2/Shiboken2Config.cpython-310-x86_64-linux-gnu.cmake:44 (shiboken_find_required_python)
  /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.2/Shiboken2Config.cmake:5 (include)
  cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake:22 (find_package)
  CMakeLists.txt:76 (SetupShibokenAndPyside)
This warning is for project developers.  Use -Wno-dev to suppress it.

Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.10.so (found suitable version "3.10.6", minimum required is "3") 
SHIBOKEN_PYTHON_INCLUDE_DIRS computed to value: '/usr/include/python3.10'
SHIBOKEN_PYTHON_LIBRARIES computed to value: ''
libshiboken built for RelWithDebInfo
PYTHON_CONFIG_SUFFIX: .cpython-310-x86_64-linux-gnu
libshiboken built for RelWithDebInfo
PySide 5.15.2 Python module found at /usr/lib/python3/dist-packages/PySide2.

But later, in the summary is

Code: Select all

  Shiboken:            not found
I looked through the forums and tried to explicitly set the path to the python executable but that didn't improve anything.

The process for the recompile was
- in folder freecad-source:
git pull
- in folder freecad-build:
cmake ../freecad-source

Any suggestions? It had been working until I did the git pull. I don't believe there were any installs/uninstalls on my system that would have affected this but if there's a way to check I'd be happy to do so.

TIA,
mconsidine
Last edited by mconsidine on Sat Feb 04, 2023 2:36 pm, edited 1 time in total.
User avatar
chennes
Veteran
Posts: 3878
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Shiboken problem

Post by chennes »

The problem is (probably) not really Shiboken -- basically any import error that happens during python interpretation is going to look like a Shiboken error at first. It looks rather like you have a macro called "test2.FCMacro" that is trying to import something called "SplitFeatures". that module import is failing because Python cannot find the file for it.

I'd guess that the "missing" Shiboken in the cMake report is actually a bug in recent changes to that report, rather than a real inability to find Shiboken.

ETA: Do you mean to be using "import BOPTools.SplitFeatures"?
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
mconsidine
Posts: 125
Joined: Wed Jan 18, 2023 10:41 pm
Location: Randolph, VT USA

Re: Shiboken problem

Post by mconsidine »

@chennes Thank you for the interpretation. The test macro was working fine earlier. As I recall it was only importing Draft, Part and FreeCAD if anything. So I need to track that down ...
Regards,
mconsidine
mconsidine
Posts: 125
Joined: Wed Jan 18, 2023 10:41 pm
Location: Randolph, VT USA

Re: {Resolved} Shiboken problem

Post by mconsidine »

I'm going to mark this "resolved" as the problem has gone away after making sure caches were cleared. Also, I found a backup version of the macro stored that got generated I'm-not-sure-how, but which had something called an ADDON_DISABLED 'stopfile' with it. Got rid of that.

The only thing being imported by the test macro was Draft WB. But there doesn't seem to be any issue with that, so I'm chalking this up to my having confused my system setup and am letting this one go.

Apologies for the distraction,
mconsidine
Post Reply