PySide2 dev build on Windows 10
-
Hi Qt-developers,
We have recently switched our applications from using PyQt5 to using PySide2. One of our applications was able to be switched very easily and no problems have been found. However, the other application compiles and runs successfully, but after a random amount of time (5 seconds to 10 minutes), the application randomly crashes silently and closes. This never happened with PyQt5 before and we suspect PySide2 to be the issue. The fact that it dies silently makes it difficult to debug. For this reason, we want to compile Qt and PySide2 in debug mode from source.
We managed to compile Qt in debug mode without errors. However, when trying to setup PySide2 with this version of Qt and a debug version of Python, we get an error that we cannot solve. The error is below.
Any idea what we are doing wrong?
Cheers,
Max[ 13%] Linking CXX shared module ..\QtCore_d.cp36-win_amd64.pyd
Creating library QtCore_d.cp36-win_amd64.lib and object QtCore_d.cp36-win_amd64.exp
[ 13%] Built target QtCore
Scanning dependencies of target QtCore_pyi
[ 13%] Built target QtCore_pyi
Scanning dependencies of target QtGui_generator
[ 13%] Running generator for QtGui...
(gui) clang_parseTranslationUnit2(0x0, cmd[7]=-fms-compatibility-version=19 -Wno-microsoft-enum-value -Wno-constant-logical-operand -std=c++14 -IC:/Users/max.hantke/pyside-setup/sources/pyside2/PySide2 -IC:/Qt/Qt-5.12.3/include C:/Users/max.hantke/AppData/Local/Temp/QtGui_global_oXEBNn.hpp)
C:/Qt/Qt-5.12.3/include\QtGui/qopengl.h:111:13: fatal error: 'GLES2/gl2.h' file not found
(gui) Errors in C:\Users\max.hantke\AppData\Local\Temp\QtGui_global_oXEBNn.hpp:
C:\Qt\Qt-5.12.3\include\QtGui\qopengl.h:111:13: fatal: 'GLES2/gl2.h' file not found
C:/Users/max.hantke/AppData/Local/Temp/QtGui_global_oXEBNn.hpp:1:10: note: in file included from C:/Users/max.hantke/AppData/Local/Temp/QtGui_global_oXEBNn.hpp:1:
C:/Users/max.hantke/pyside-setup/pyside3dp_build/py3.6-qt5.12.3-64bit-debug/pyside2/PySide2/QtGui_global.h:60:10: note: in file included from C:/Users/max.hantke/pyside-setup/pyside3dp_build/py3.6-qt5.12.3-64bit-debug/pyside2/PySide2/QtGui_global.h:60:
C:/Qt/Qt-5.12.3/include\QtGui/QtGui:45:10: note: in file included from C:/Qt/Qt-5.12.3/include\QtGui/QtGui:45::0: error: Unable to retrieve code snippet. [other]
:0: error: Unable to retrieve code snippet. [other]
:0: error: Unable to retrieve code snippet. [other]
:0: error: Unable to retrieve code snippet. [other]
:0: error: Unable to retrieve code snippet. [other]
:0: error: Unable to retrieve code snippet. [other](gui) Clang: 7 diagnostic messages:
C:\Qt\Qt-5.12.3\include\QtGui\qopengl.h:111:13: fatal: 'GLES2/gl2.h' file not found
C:/Users/max.hantke/AppData/Local/Temp/QtGui_global_oXEBNn.hpp:1:10: note: in file included from C:/Users/max.hantke/AppData/Local/Temp/QtGui_global_oXEBNn.hpp:1:
C:/Users/max.hantke/pyside-setup/pyside3dp_build/py3.6-qt5.12.3-64bit-debug/pyside2/PySide2/QtGui_global.h:60:10: note: in file included from C:/Users/max.hantke/pyside-setup/pyside3dp_build/py3.6-qt5.12.3-64bit-debug/pyside2/PySide2/QtGui_global.h:60:
C:/Qt/Qt-5.12.3/include\QtGui/QtGui:45:10: note: in file included from C:/Qt/Qt-5.12.3/include\QtGui/QtGui:45::0: error: Unable to retrieve code snippet. [other]
:0: error: Unable to retrieve code snippet. [other]
:0: error: Unable to retrieve code snippet. [other]
:0: error: Unable to retrieve code snippet. [other]
:0: error: Unable to retrieve code snippet. [other]
:0: error: Unable to retrieve code snippet. [other]Keeping temporary file: C:\Users\max.hantke\AppData\Local\Temp\QtGui_global_oXEBNn.hpp
shiboken: Error running ApiExtractor.
Command line: --generator-set=shiboken --enable-parent-ctor-heuristic --enable-pyside-extensions --enable-return-value-heuristic --use-isnull-as-nb_nonzero --avoid-protected-hack C:/Users/max.hantke/pyside-setup/pyside3dp_build/py3.6-qt5.12.3-64bit-debug/pyside2/PySide2/QtGui_global.h --include-paths=C:/Users/max.hantke/pyside-setup/sources/pyside2/PySide2;C:/Qt/Qt-5.12.3/include/ --typesystem-paths=C:/Users/max.hantke/pyside-setup/pyside3dp_build/py3.6-qt5.12.3-64bit-debug/pyside2/PySide2;C:/Users/max.hantke/pyside-setup/sources/pyside2/PySide2;C:/Users/max.hantke/pyside-setup/sources/pyside2/PySide2/QtGui --output-directory=C:/Users/max.hantke/pyside-setup/pyside3dp_build/py3.6-qt5.12.3-64bit-debug/pyside2/PySide2/QtGui --license-file=C:/Users/max.hantke/pyside-setup/sources/pyside2/PySide2/QtGui/../licensecomment.txt C:/Users/max.hantke/pyside-setup/pyside3dp_build/py3.6-qt5.12.3-64bit-debug/pyside2/PySide2/QtGui/typesystem_gui.xml --api-version=5.12 --drop-type-entries=QOpenGLTimeMonitor;QOpenGLTimerQuery
NMAKE : fatal error U1077: 'C:\Users\max.hantke\pyside-setup\pyside3dp_install\py3.6-qt5.12.3-64bit-debug\bin\shiboken2.exe' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.
error: Error compiling pyside2
Traceback (most recent call last):
File "setup.py", line 296, in <module>
setup_runner.run_setup()
File "C:\Users\max.hantke\pyside-setup\build_scripts\setup_runner.py", line 157, in run_setup
raise RuntimeError(msg)
RuntimeError:
setup.py invocation failed with exit code: 1.setup.py invocation was: C:\Users\max.hantke\AppData\Local\Programs\Python\Python36\python_d.exe setup.py build --qmake=C:\Qt\Qt-5.12.3\bin\qmake.exe --openssl=C:\OpenSSL-Win64\bin --build-tests --ignore-git --debug --internal-build-type=pyside2