[solved] Can not build with Pyside 5.15

Having trouble installing or compiling FreeCAD? Get help here.
reox
Posts: 867
Joined: Sat Aug 13, 2016 10:06 am
Contact:

[solved] Can not build with Pyside 5.15

Postby reox » Mon Jun 29, 2020 7:04 pm

I saw thay pyside2 was pushed to 5.15 in debian sid.
However, since then I can not build because I get this message:

Code: Select all

00:17:43 O: ==============
00:17:43 O: Summary report
00:17:43 O: ==============
00:17:43 O: 
00:17:43 O: -- Build type:          RelWithDebInfo
00:17:43 O: -- Compiler:            /usr/lib/ccache/c++ (9.3.0)
00:17:43 O: -- Flags:               -Wall -Wextra -Wno-write-strings -Wall -DHAVE_SWIG=1 -fpermissive -g -O2 -fdebug-prefix-map=/build/freecad-daily-0.19+git202006290013~daily=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2
00:17:43 O: -- Standard:            Requires C++11
00:17:43 O: -- Python:              [/usr/bin/python3.8] [.cpython-38-x86_64-linux-gnu]
00:17:43 O: -- PCL:                 1.10.1
00:17:43 O: -- pybind11:            2.5.0
00:17:43 O: -- Boost:               107100
00:17:43 O: -- XercesC:             [/usr/lib/x86_64-linux-gnu/libxerces-c.so] [/usr/include]
00:17:43 O: -- ZLIB:                1.2.11
00:17:43 O: -- PyCXX:               [/build/freecad-daily-0.19+git202006290013~daily/src]
00:17:43 O: -- OCC:                 7.4.0 [TKFillet;TKMesh;TKernel;TKG2d;TKG3d;TKMath;TKIGES;TKSTL;TKShHealing;TKXSBase;TKBin;TKBool;TKBO;TKCDF;TKBRep;TKTopAlgo;TKGeomAlgo;TKGeomBase;TKOffset;TKPrim;TKSTEP;TKSTEPBase;TKSTEPAttr;TKHLR;TKFeat]
00:17:43 O: -- SMESH:               build internal
00:17:43 O: --  MEDFile:            [/usr/lib/x86_64-linux-gnu/libmedC.so] [/usr/include]
00:17:43 O: --  HDF5:               1.10.6
00:17:43 O: --  VTK:                7.1.1
00:17:43 O: -- NETGEN:              not enabled
00:17:43 O: -- SWIG:                4.0.1
00:17:43 O: -- Eigen3               3.3.7
00:17:43 O: -- Qt5Core:             5.14.2
00:17:43 O: -- Qt5Network:          5.14.2
00:17:43 O: -- Qt5Xml:              5.14.2
00:17:43 O: -- Qt5XmlPatterns:      5.14.2
00:17:43 O: -- Qt5Widgets:          5.14.2
00:17:43 O: -- Qt5PrintSupport:     5.14.2
00:17:43 O: -- Qt5OpenGL:           5.14.2
00:17:43 O: -- Qt5Svg:              5.14.2
00:17:43 O: -- Qt5UiTools:          5.14.2
00:17:43 O: -- Qt5Concurrent:       5.14.2
00:17:43 O: -- Qt5WebKitWidgets:    5.212.0
00:17:43 O: -- Shiboken2:           5.15.0 [/usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.0] [/usr/lib/include/shiboken2;/usr/include/python3.8]
00:17:43 O: -- PySide2:             5.15.0 [/usr/lib/../include/PySide2]
00:17:43 O: -- PySide2Tools:        [/usr/bin/uic] [/usr/bin/rcc]
00:17:43 O: -- Freetype:            2.10.1
00:17:43 O: -- OpenGLU:             /usr/lib/x86_64-linux-gnu/libGLU.so [/usr/lib/x86_64-linux-gnu/libGLU.so][/usr/include]
00:17:43 O: -- Coin3D:              [/usr/lib/x86_64-linux-gnu/libCoin.so] [/usr/include]
00:17:43 O: -- SPNAV:               [/usr/lib/libspnav.so] [/usr/include]
00:17:43 O: -- Matplotlib:          3.2.2
00:17:43 O: -- Rift:                not enabled (BUILD_VR)
00:17:43 O: -- Doxygen:             1.8.17
00:17:43 O: --  Language:           English
00:17:43 O: --  Coin3D_DOC:         not found
00:17:43 O: =================================================
00:17:43 O: Now run 'cmake --build /build/freecad-daily-0.19+git202006290013~daily/obj-x86_64-linux-gnu' to build FreeCAD
00:17:43 O: =================================================
00:17:43 O: 
00:17:43 O: -- Configuring done
00:17:45 O: CMake Error in src/Gui/CMakeLists.txt:
00:17:45 O:   Imported target "Shiboken2::libshiboken" includes non-existent path
00:17:45 O: 
00:17:45 O:     "/usr/lib/include/shiboken2"
00:17:45 O: 
00:17:45 O:   in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:
00:17:45 O: 
00:17:45 O:   * The path was deleted, renamed, or moved to another location.
00:17:45 O: 
00:17:45 O:   * An install or uninstall procedure did not complete successfully.
00:17:45 O: 
00:17:45 O:   * The installation package was faulty and references files it does not
00:17:45 O:   provide.
00:17:45 O: 
00:17:45 O: 
00:17:45 O: 
00:17:45 O: CMake Error in src/Gui/CMakeLists.txt:
00:17:45 O:   Imported target "Shiboken2::libshiboken" includes non-existent path
00:17:45 O: 
00:17:45 O:     "/usr/lib/include/shiboken2"
00:17:45 O: 
00:17:45 O:   in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:
00:17:45 O: 
00:17:45 O:   * The path was deleted, renamed, or moved to another location.
00:17:45 O: 
00:17:45 O:   * An install or uninstall procedure did not complete successfully.
00:17:45 O: 
00:17:45 O:   * The installation package was faulty and references files it does not
00:17:45 O:   provide.
00:17:45 O: 
00:17:45 O: 
00:17:45 O: 
00:17:45 O: -- Generating done
00:17:45 O: CMake Generate step failed.  Build files cannot be regenerated correctly.
kkremitzki wrote: ping
maybe you can help here?
Last edited by reox on Mon Jul 06, 2020 1:32 pm, edited 1 time in total.
User avatar
f3nix
Posts: 337
Joined: Sat May 30, 2015 11:58 am

Re: Can not build with Pyside 5.15

Postby f3nix » Wed Jul 01, 2020 12:38 am

reox wrote:
Mon Jun 29, 2020 7:04 pm
I saw thay pyside2 was pushed to 5.15 in debian sid.
However, since then I can not build because I get this message:
Hi.
Here is a workaround to make it work.

Edit /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.0/Shiboken2Targets.cmake

Change line 57 from

Code: Select all

 INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/shiboken2"
to

Code: Select all

INTERFACE_INCLUDE_DIRECTORIES "/usr/include/shiboken2"
HTH.

Cheers,
Mateusz
reox
Posts: 867
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: Can not build with Pyside 5.15

Postby reox » Wed Jul 01, 2020 8:34 am

wasn't that already fixed in debian? looks like a regression to me :/

edit: ah yes, it was me who opened that bug https://bugs.debian.org/cgi-bin/bugrepo ... bug=949846 and someone already wrote that it broke again.
wmayer
Site Admin
Posts: 15971
Joined: Thu Feb 19, 2009 10:32 am

Re: Can not build with Pyside 5.15

Postby wmayer » Wed Jul 01, 2020 9:54 am

Where is _IMPORT_PREFIX defined? Does it work to explicitly set _IMPORT_PREFIX in CMake and setting it to "/usr"?
reox
Posts: 867
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: Can not build with Pyside 5.15

Postby reox » Fri Jul 03, 2020 3:20 pm

Ah I see. The last bug regarded pyside2 cmake file, now it is shiboken2:

Code: Select all

-- PySide2Config: Using default python: .cpython-38-x86_64-linux-gnu
PySide2::pyside2 AUTOGEN_ORIGIN_DEPENDS = ON
PySide2::pyside2 AUTOMOC_COMPILER_PREDEFINES = ON
PySide2::pyside2 AUTOMOC_MACRO_NAMES = Q_OBJECT;Q_GADGET;Q_NAMESPACE
PySide2::pyside2 AUTOMOC_PATH_PREFIX = ON
PySide2::pyside2 BINARY_DIR = /home/reox/tmp/dfsdf
PySide2::pyside2 BINARY_DIR = /home/reox/tmp/dfsdf
PySide2::pyside2 BUILD_WITH_INSTALL_RPATH = OFF
PySide2::pyside2 IMPORTED = TRUE
PySide2::pyside2 IMPORTED_CONFIGURATIONS = RELWITHDEBINFO
PySide2::pyside2 IMPORTED_GLOBAL = FALSE
PySide2::pyside2 INSTALL_RPATH =
PySide2::pyside2 INSTALL_RPATH_USE_LINK_PATH = OFF
PySide2::pyside2 INTERFACE_COMPILE_DEFINITIONS = PYSIDE_QML_SUPPORT=1
PySide2::pyside2 INTERFACE_INCLUDE_DIRECTORIES = /usr/lib/../include/PySide2
PySide2::pyside2 NAME = PySide2::pyside2
PySide2::pyside2 POSITION_INDEPENDENT_CODE = True
PySide2::pyside2 SKIP_BUILD_RPATH = OFF
PySide2::pyside2 SOURCE_DIR = /home/reox/tmp/dfsdf
PySide2::pyside2 SOURCE_DIR = /home/reox/tmp/dfsdf
PySide2::pyside2 TYPE = SHARED_LIBRARY
PySide2::pyside2 TYPE = SHARED_LIBRARY
PySide2::pyside2 UNITY_BUILD_BATCH_SIZE = 8
works
but:

Code: Select all

-- Shiboken2Config: Using default python: .cpython-38-x86_64-linux-gnu
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.3", minimum required is "3")
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found suitable version "3.8.3", minimum required is "3")
-- SHIBOKEN_PYTHON_INCLUDE_DIRS computed to value: '/usr/include/python3.8'
-- SHIBOKEN_PYTHON_LIBRARIES computed to value: ''
-- libshiboken built for RelWithDebInfo
CMake Error at CMakeLists.txt:6 (get_property):
  get_property could not find TARGET Shiboken2:libshiboken.  Perhaps it has
  not yet been created.


Shiboken2::libshiboken AUTOGEN_ORIGIN_DEPENDS = ON
Shiboken2::libshiboken AUTOMOC_COMPILER_PREDEFINES = ON
Shiboken2::libshiboken AUTOMOC_MACRO_NAMES = Q_OBJECT;Q_GADGET;Q_NAMESPACE
Shiboken2::libshiboken AUTOMOC_PATH_PREFIX = ON
Shiboken2::libshiboken BINARY_DIR = /home/reox/tmp/dfsdf
Shiboken2::libshiboken BINARY_DIR = /home/reox/tmp/dfsdf
Shiboken2::libshiboken BUILD_WITH_INSTALL_RPATH = OFF
Shiboken2::libshiboken IMPORTED = TRUE
Shiboken2::libshiboken IMPORTED_CONFIGURATIONS = RELWITHDEBINFO
Shiboken2::libshiboken IMPORTED_GLOBAL = FALSE
Shiboken2::libshiboken INSTALL_RPATH =
Shiboken2::libshiboken INSTALL_RPATH_USE_LINK_PATH = OFF
Shiboken2::libshiboken INTERFACE_INCLUDE_DIRECTORIES = /usr/lib/include/shiboken2;/usr/include/python3.8
Shiboken2::libshiboken NAME = Shiboken2::libshiboken
Shiboken2::libshiboken POSITION_INDEPENDENT_CODE = True
Shiboken2::libshiboken SKIP_BUILD_RPATH = OFF
Shiboken2::libshiboken SOURCE_DIR = /home/reox/tmp/dfsdf
Shiboken2::libshiboken SOURCE_DIR = /home/reox/tmp/dfsdf
Shiboken2::libshiboken TYPE = SHARED_LIBRARY
Shiboken2::libshiboken TYPE = SHARED_LIBRARY
Shiboken2::libshiboken UNITY_BUILD_BATCH_SIZE = 8
-- Configuring incomplete, errors occurred!

I submitted a bugreport.
reox
Posts: 867
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: Can not build with Pyside 5.15

Postby reox » Mon Jul 06, 2020 1:32 pm

works again with pyside2 5.15.0-3

@kkremitzki thanks for fixing!
User avatar
kkremitzki
Posts: 2032
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: [solved] Can not build with Pyside 5.15

Postby kkremitzki » Mon Jul 06, 2020 2:15 pm

Good to hear it's fixed!
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.