Open rayzchen opened 2 years ago
Thanks for the report. More robust DLL loading is certainly needed, and I'm sure you're right that find_library
is the way to go. Looking in a package-local directory is fine for testing, but it will only work for release versions if the EGL library (probably Google's ANGLE) is bundled with a Windows package.
But maybe that's the best strategy? I'm not sure that Microsoft supplies libEGL.dll
with Windows. (At least, not as standard; maybe it comes with WSL or something?)
Could you check the file info on C:\WINDOWS\system32\libEGL.dll
(right click, Properties, Details)?
Not on my computer right now, but I dont have WSL installed anyways. How are you planning to bundle libEGL.dll in the wheels though?
I haven't tested out any particular approach, but there's lots of prior discussion, e.g.:
Seems that it doesn't appear to be on my old laptop, though my new one has it.
Looking in a package-local directory is fine for testing, but it will only work for release versions if the EGL library (probably Google's ANGLE) is bundled with a Windows package.
Where are you currently getting the library from? I've looked at google/angle but it seems to be source-only. Of course, many general purpose DLL files are out there, but I don't trust them enough.
Funny, seems that Python can access a C:\Windows\System32\libEGL.dll
but even using cmd
with dir
yields nothing.
EDIT: C:\Windows\SysWOW64\libEGL.dll
exists... The created date is around when I got the laptop.
Where are you currently getting the library from? I've looked at google/angle but it seems to be source-only. Of course, many general purpose DLL files are out there, but I don't trust them enough.
I grabbed it from a Google Chrome installation, but I’m not positive that’s the only place I’ve gotten the DLL; I recall looking up some other projects that bundle ANGLE.
C:\Windows\SysWOW64\libEGL.dll exists
... The created date is around when I got the laptop.
Hmm. Very peculiar that it doesn’t list a product name. That in itself suggests that it’s not an official Microsoft DLL, which answers my question… but I’m still curious, if you’re willing to do a bit more digging? Is there any vendor info under the Digital Signatures tab? What about if you load it in pegl, like so:
>>> import pegl
>>> dpy = pegl.Display()
>>> dpy.vendor
'Google Inc. (adapter LUID: 000000000000b56d)'
>>> dpy.version
(1, 5, '(ANGLE 2.1.0.ea8043b73f93)')
Running dpy = pegl.Display()
raises pegl.errors.NotInitializedError
Installed pegl from source. Seems that libEGL.dll is expected to be put under
pegl/egl/common/lib
. Windows 10 supplies libEGL.dll underC:\WINDOWS\system32\libEGL.dll
as declared byctypes.util.find_library("libEGL")
. Maybe first checkfind_library
first and then try thepegl/egl/common/lib
directory?