cutter icon indicating copy to clipboard operation
cutter copied to clipboard

Error building Cutter with python support

Open s0i37 opened this issue 5 years ago • 5 comments

Environment information

  • Operating System: Linux kali 5.4.8-rt3 #1 SMP Tue Jan 21 03:44:43 +05 2020 x86_64 GNU/Linux
  • Cutter version: Cutter 1.12.0 (commit 3bda4c97776cc8206813e131bfd200ad2535f6ba)
  • Obtained from:
    • [x] Built from source
    • [ ] Downloaded release from Cutter website or GitHub
    • [ ] Distribution repository
  • File format:

Describe the bug

I try to build Cutter with python support with following command: cmake -B build -DCUTTER_USE_BUNDLED_RIZIN=ON -DCUTTER_ENABLE_PYTHON=ON -DCUTTER_ENABLE_PYTHON_BINDINGS=ON -DPYSIDE_LIBRARY=/usr/local/lib/python3.9/dist-packages/PySide2 -DPYSIDE_INCLUDE_DIR=/usr/local/lib/python3.9/dist-packages/PySide2/include -DPYSIDE_TYPESYSTEMS=/usr/local/lib/python3.9/dist-packages/PySide2/typesystems -DCUTTER_ENABLE_KSYNTAXHIGHLIGHTING=OFF cmake --build build

....
[ 15%] Generating Python bindings with shiboken2
qt.shiboken: (bindings) Duplicate type entry: 'QMessageLogContext'
qt.shiboken: (bindings) Warning: /usr/local/lib/python3.9/dist-packages/PySide2/typesystems/typesystem_gui_common.xml:1903:88: 1 attributes(s) unused on <modify-function>: overload-number="0"
qt.shiboken: (bindings) Warning: /usr/local/lib/python3.9/dist-packages/PySide2/typesystems/typesystem_gui_common.xml:1904:89: 1 attributes(s) unused on <modify-function>: overload-number="1"
qt.shiboken: (bindings) Error: /usr/local/lib/python3.9/dist-packages/PySide2/typesystems/typesystem_widgets_common.xml:1262:101: Unknown tag name: 'property'
qt.shiboken: (bindings) Error: /usr/local/lib/python3.9/dist-packages/PySide2/typesystems/typesystem_widgets.xml:45:74: Failed to parse: 'typesystem_widgets_common.xml'
...

To Reproduce

Expected behavior

Screenshots

Additional context

My shiboken packages:

ii  libshiboken2-dev:amd64                5.15.0-6                             amd64        CPython bindings generator for C++ libraries (development files)
ii  libshiboken2-py3-5.15                 5.15.0-6                             amd64        CPython bindings generator for C++ libraries (Python3 shared library)
ii  shiboken2                             5.15.0-6                             amd64        CPython bindings generator for C++ libraries

Python 3.9 PySide2 version: PySide2 5.15.2

s0i37 avatar Dec 26 '20 13:12 s0i37

I recommend you try starting with overriding the python paths similar to what is done in CI builds instead of overriding pyside paths. From the error message indicating that shiboken/pyside can't parse it's own xml files I would guess that you are mixing multiple versions of correpsonding libraries.

I hope you didn't try to mix shiboken or pyside installed using pip with system packages. Doing that will cause a huge mess.

karliss avatar Dec 26 '20 15:12 karliss

Hello, have you tried again with the suggestion above?

xarkes avatar Feb 13 '21 07:02 xarkes

I will try near future

s0i37 avatar Feb 13 '21 08:02 s0i37

@s0i37 Could you tell me, please, whether it is your custom build of PySide2/shiboken2 or from QT site (http://download.qt.io/official_releases/QtForPython)?

ikulagin avatar May 18 '21 14:05 ikulagin

It should have been fixed quite some time ago. Please retry again with the latest release or just dev

XVilka avatar Mar 12 '24 15:03 XVilka