Building Libs for Windows Debug Version with VS2017/Qt5.12

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by wmayer »

apeltauer wrote: Tue Mar 26, 2019 1:19 pm Now every time i start the debug version i get the following, same as you already described...
Capture.PNG
For me it works if I add some workbenches to FreeCAD's black list. Start FreeCAD in the release mode and right-click on the main window. In the context-menu go to Customize and then open the tab Workbenches in the opening dialog. The deactivated workbenches are: <none>, Complete, Arch, Draft, Image, OpenSCAD, Plot, Robot, Ship and Web.

Close the release version. Now when starting the debug version it works without problems. Only when exiting it I get this error dialog.
Btw, I think there is a bug in Python 3.7 because for some older builds I can use Python 3.6 in release and debug version without these problems.
User avatar
apeltauer
Posts: 399
Joined: Fri Aug 11, 2017 2:19 pm

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by apeltauer »

wmayer wrote: Tue Mar 26, 2019 1:53 pm Another directory that should be copied from Qt is either the complete translation directory but at least qtwebengine_locales because otherwise a warning is raised that the web engine may not work correctly.
Added...
User avatar
apeltauer
Posts: 399
Joined: Fri Aug 11, 2017 2:19 pm

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by apeltauer »

wmayer wrote: Tue Mar 26, 2019 2:07 pm Btw, I think there is a bug in Python 3.7 because for some older builds I can use Python 3.6 in release and debug version without these problems.
Should we try to use python 3.6?? PySide2 should also work with Python3.6.
I try to setup a python 3.6 build...
Any version wishes? i would take 3.6.8 from the 23.12.2018...
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by wmayer »

apeltauer wrote: Tue Mar 26, 2019 2:25 pm
wmayer wrote: Tue Mar 26, 2019 2:07 pm Btw, I think there is a bug in Python 3.7 because for some older builds I can use Python 3.6 in release and debug version without these problems.
Should we try to use python 3.6?? PySide2 should also work with Python3.6.
I try to setup a python 3.6 build...
Any version wishes? i would take 3.6.8 from the 23.12.2018...
I wonder how big will be the effort to recreate all libs that are based on Python. It's shiboken2, PySide2, numpy, boost.python, ...

When using 3.6 then take the one with the highest micro number as this must be the most stable version. In case it's 3.6.8, then yes, use this.
User avatar
apeltauer
Posts: 399
Joined: Fri Aug 11, 2017 2:19 pm

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by apeltauer »

wmayer wrote: Tue Mar 26, 2019 2:56 pm I wonder how big will be the effort to recreate all libs that are based on Python. It's shiboken2, PySide2, numpy, boost.python, ...
Pyside2, shiboken2 takes long to compile, about 2 hours, but it is already building.
Boost.python --> just modify the config file.
First I try Pyside2, Shiboken2 and pivy. If it works in the debug version with no problems i build boost again...
Maybe vtk,pcl, netgen needs to be build again with the other python version....
User avatar
apeltauer
Posts: 399
Joined: Fri Aug 11, 2017 2:19 pm

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by apeltauer »

Building with Python 3.6.8 works better....

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.Unknown
Build type: Release
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Germany (en_DE)
Capture.PNG
Capture.PNG (10.55 KiB) Viewed 1088 times
I have create a new libpack version 12.1.2 see(https://github.com/apeltauer/FreeCAD/re ... bPack_12.1)
Werner can you test it to?
Next step:
--> i will merge the webenging adoption and check if it works
--> try to use fem
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by wmayer »

So, did the crash with the Python gc in debug version go away? And what is still causing a failure in the unit tests? Is it because of Fem?
User avatar
apeltauer
Posts: 399
Joined: Fri Aug 11, 2017 2:19 pm

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by apeltauer »

Release version just works fine now. I have merged the (https://github.com/FreeCAD/FreeCAD/pull/1937), now the Start page works again....
Capture.PNG
Capture.PNG (9.85 KiB) Viewed 1065 times
In the debug version as fare as i can see the python error is gone...

Next step try to build both version with pybind11. One adoption needs to be done in "\src\Mod\Path\libarea\CMakeLists.txt" we have to add the pybind11 include path, otherwise the pybind11 header files are not found

Code: Select all

....
else()
    include_directories(${pybind11_INCLUDE_DIR})
endif(NOT FREECAD_USE_PYBIND11)
User avatar
apeltauer
Posts: 399
Joined: Fri Aug 11, 2017 2:19 pm

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by apeltauer »

Using pybind11 also works in debug and release. I mean I can compile it and see the different linking. Without pybind11, area links against boost python...
In debug mode at the moment i cant get numpy to run with python_d...
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Building Libs for Windows Debug Version with VS2017/Qt5.12

Post by wmayer »

Cool!
Post Reply