Include software rendering and HLSL compiler in the PyQt5 wheels for Windows

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Include software rendering and HLSL compiler in the PyQt5 wheels for Windows

Cody Scott-2
I'm running a simple PyQt5 QML application[0] on a test Windows 7 32-bit VM with only Python 3.6.5 and PyQt5==5.10.1 installed but I'm getting an error about missing DLLs.

The full output is attached but the main part is

QWindowsEGLStaticContext::create: Could not initialize EGL display: error 0x3001
QWindowsEGLStaticContext::create: When using ANGLE, check if d3dcompiler_4x.dll is available
Failed to load opengl32sw.dll (The specified module could not be found.)
Failed to load and resolve WGL/OpenGL functions


When I build PyQt5 from source and add the Qt bin directory to my PATH there are two additional files that are available.

d3dcompiler_47.dll and opengl32sw.dll

If they are not available the application fails with the same message I get when PyQt5 was installed from PyPI using the wheel.

Should these two files be included in the PyQt5 wheels for Windows?

In the Qt Windows deployment docs[1] these two files are included in the table of required files when using "dynamic OpenGL".

- d3dcompiler_XX.dll is the DirectX shader compiler[2], "where XX is the version number that ANGLE (libGLESv2) was linked against."
- opengl32sw.dll is for software rendering


_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

output.txt (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Include software rendering and HLSL compiler in the PyQt5 wheels for Windows

Cody Scott-2
Okay I have learned that dynamic OpenGL means that at runtime Qt will determine which OpenGL implementation to use.

If OpenGL >= 2.0 is not available it will try ANGLE and if ANGLE is not available it will use a software renderer[0].

These three files are required for ANGLE to work.

  • libEGL.dll
  • libGLESv2.dll
  • d3dcompiler_XX.dll

  • libEGL.dll and libGLESv2.dll are already being included in the wheels.

    Without allowing Qt to fallback to the software renderer (opengl32sw.dll) I tried adding the d3dcompiler_47.dll from my Qt 5.10.1 msvc2015 directory but the application would not work.

    Failed to load libEGL (The specified module could not be found.)
    QWindowsEGLStaticContext::create: Failed to load and resolve libEGL functions

    Hey Phil, which msvc directory do you copy the .dlls from when building the wheels?
    I think the error is because the computer I am testing doesn't have accelerated graphics capabilities which the article mentions will cause the software renderer to be used.



    On Tue, Jun 5, 2018 at 2:12 PM, Cody Scott <[hidden email]> wrote:
    I'm running a simple PyQt5 QML application[0] on a test Windows 7 32-bit VM with only Python 3.6.5 and PyQt5==5.10.1 installed but I'm getting an error about missing DLLs.

    The full output is attached but the main part is

    QWindowsEGLStaticContext::create: Could not initialize EGL display: error 0x3001
    QWindowsEGLStaticContext::create: When using ANGLE, check if d3dcompiler_4x.dll is available
    Failed to load opengl32sw.dll (The specified module could not be found.)
    Failed to load and resolve WGL/OpenGL functions


    When I build PyQt5 from source and add the Qt bin directory to my PATH there are two additional files that are available.

    d3dcompiler_47.dll and opengl32sw.dll

    If they are not available the application fails with the same message I get when PyQt5 was installed from PyPI using the wheel.

    Should these two files be included in the PyQt5 wheels for Windows?

    In the Qt Windows deployment docs[1] these two files are included in the table of required files when using "dynamic OpenGL".

    - d3dcompiler_XX.dll is the DirectX shader compiler[2], "where XX is the version number that ANGLE (libGLESv2) was linked against."
    - opengl32sw.dll is for software rendering



    _______________________________________________
    PyQt mailing list    [hidden email]
    https://www.riverbankcomputing.com/mailman/listinfo/pyqt
    Reply | Threaded
    Open this post in threaded view
    |

    Re: Include software rendering and HLSL compiler in the PyQt5 wheels for Windows

    Phil Thompson-5
    On 6 Jun 2018, at 11:21 pm, Cody Scott <[hidden email]> wrote:

    >
    > Okay I have learned that dynamic OpenGL means that at runtime Qt will determine which OpenGL implementation to use.
    >
    > If OpenGL >= 2.0 is not available it will try ANGLE and if ANGLE is not available it will use a software renderer[0].
    >
    > These three files are required for ANGLE to work.
    >
    > • libEGL.dll
    > • libGLESv2.dll
    > • d3dcompiler_XX.dll
    >
    > libEGL.dll and libGLESv2.dll are already being included in the wheels.
    >
    > Without allowing Qt to fallback to the software renderer (opengl32sw.dll) I tried adding the d3dcompiler_47.dll from my Qt 5.10.1 msvc2015 directory but the application would not work.
    >
    > Failed to load libEGL (The specified module could not be found.)
    > QWindowsEGLStaticContext::create: Failed to load and resolve libEGL functions
    >
    > Hey Phil, which msvc directory do you copy the .dlls from when building the wheels?

    The only msvc files copied are...

    msvcp140.dll
    concrt140.dll
    vcruntime140.dll

    Phil
    _______________________________________________
    PyQt mailing list    [hidden email]
    https://www.riverbankcomputing.com/mailman/listinfo/pyqt
    Reply | Threaded
    Open this post in threaded view
    |

    Re: Include software rendering and HLSL compiler in the PyQt5 wheels for Windows

    Cody Scott-2
    Sorry when I said msvc directory I meant the Qt bin directory, for example

    C:\Qt\5.10.1\msvc2015\bin

    I meant to ask if the libEGL.dll and libGLESv2.dll files come from the C:\Qt\5.10.1\msvc2015\bin directory or another one?


    On Thu, Jun 7, 2018 at 3:42 AM, Phil Thompson <[hidden email]> wrote:
    On 6 Jun 2018, at 11:21 pm, Cody Scott <[hidden email]> wrote:
    >
    > Okay I have learned that dynamic OpenGL means that at runtime Qt will determine which OpenGL implementation to use.
    >
    > If OpenGL >= 2.0 is not available it will try ANGLE and if ANGLE is not available it will use a software renderer[0].
    >
    > These three files are required for ANGLE to work.
    >
    > • libEGL.dll
    > • libGLESv2.dll
    > • d3dcompiler_XX.dll
    >
    > libEGL.dll and libGLESv2.dll are already being included in the wheels.
    >
    > Without allowing Qt to fallback to the software renderer (opengl32sw.dll) I tried adding the d3dcompiler_47.dll from my Qt 5.10.1 msvc2015 directory but the application would not work.
    >
    > Failed to load libEGL (The specified module could not be found.)
    > QWindowsEGLStaticContext::create: Failed to load and resolve libEGL functions
    >
    > Hey Phil, which msvc directory do you copy the .dlls from when building the wheels?

    The only msvc files copied are...

    msvcp140.dll
    concrt140.dll
    vcruntime140.dll

    Phil


    _______________________________________________
    PyQt mailing list    [hidden email]
    https://www.riverbankcomputing.com/mailman/listinfo/pyqt
    Reply | Threaded
    Open this post in threaded view
    |

    Re: Include software rendering and HLSL compiler in the PyQt5 wheels for Windows

    Phil Thompson-5
    On 7 Jun 2018, at 1:44 pm, Cody Scott <[hidden email]> wrote:
    >
    > Sorry when I said msvc directory I meant the Qt bin directory, for example
    >
    > C:\Qt\5.10.1\msvc2015\bin
    >
    > I meant to ask if the libEGL.dll and libGLESv2.dll files come from the C:\Qt\5.10.1\msvc2015\bin directory

    Yes.

    Phil
    _______________________________________________
    PyQt mailing list    [hidden email]
    https://www.riverbankcomputing.com/mailman/listinfo/pyqt
    Reply | Threaded
    Open this post in threaded view
    |

    Re: Include software rendering and HLSL compiler in the PyQt5 wheels for Windows

    Cody Scott-2
    Okay thanks. Just to clarify can you please include d3dcompiler_XX.dll  and opengl32sw.dll in the Windows wheels?

    d3dcompiler_XX.dll is required for ANGLE to work.

    libEGL.dll and libGLESv2.dll are already being included in the wheels but ANGLE won't work without d3dcompiler_XX.dll.

    opengl32sw.dll is required when ANGLE will not work to fallback to a software renderer.


    On Thu, Jun 7, 2018 at 9:27 AM, Phil Thompson <[hidden email]> wrote:
    On 7 Jun 2018, at 1:44 pm, Cody Scott <[hidden email]> wrote:
    >
    > Sorry when I said msvc directory I meant the Qt bin directory, for example
    >
    > C:\Qt\5.10.1\msvc2015\bin
    >
    > I meant to ask if the libEGL.dll and libGLESv2.dll files come from the C:\Qt\5.10.1\msvc2015\bin directory

    Yes.

    Phil


    _______________________________________________
    PyQt mailing list    [hidden email]
    https://www.riverbankcomputing.com/mailman/listinfo/pyqt
    Reply | Threaded
    Open this post in threaded view
    |

    Re: Include software rendering and HLSL compiler in the PyQt5 wheels for Windows

    Cody Scott-2
    Thank you Phil for including these files in the PyQt5==5.11.2 Windows wheels.

    On Thu, Jun 7, 2018 at 10:26 AM, Cody Scott <[hidden email]> wrote:
    Okay thanks. Just to clarify can you please include d3dcompiler_XX.dll  and opengl32sw.dll in the Windows wheels?

    d3dcompiler_XX.dll is required for ANGLE to work.

    libEGL.dll and libGLESv2.dll are already being included in the wheels but ANGLE won't work without d3dcompiler_XX.dll.

    opengl32sw.dll is required when ANGLE will not work to fallback to a software renderer.


    On Thu, Jun 7, 2018 at 9:27 AM, Phil Thompson <[hidden email]> wrote:
    On 7 Jun 2018, at 1:44 pm, Cody Scott <[hidden email]> wrote:
    >
    > Sorry when I said msvc directory I meant the Qt bin directory, for example
    >
    > C:\Qt\5.10.1\msvc2015\bin
    >
    > I meant to ask if the libEGL.dll and libGLESv2.dll files come from the C:\Qt\5.10.1\msvc2015\bin directory

    Yes.

    Phil



    _______________________________________________
    PyQt mailing list    [hidden email]
    https://www.riverbankcomputing.com/mailman/listinfo/pyqt