m-ab-s / media-autobuild_suite

This Windows Batchscript helps setup a Mingw-w64 compiler environment for building ffmpeg and other media tools under Windows.
GNU General Public License v3.0
1.53k stars 264 forks source link

mpv built with m-ab-s now require libEGL/libGLESv2 outright, even if not using ANGLE? #2357

Open vt-idiot opened 1 year ago

vt-idiot commented 1 year ago

I am not sure if #2346 is related or not. I almost opened an issue directly at the mpv repo, then I thought to try shinchiro's nightly builds, as well as his mpv-2.dll. The issue doesn't exist there, unless I specify gpu-context=angle, which is how it should function, and how e.g. m-ab-s build.log warns you

image

But, even with mpv.conf set to:

gpu-api=d3d11
gpu-context=d3d11

image

That's with nothing else in there too. I also tried it with my "full" mpv.conf, with gpu-api=vulkan and no gpu-context, like I had it before. If I copy both GL DLLs over from Microsoft Edge, mpv launches fine. Checking its log with log-file=whatever.txt after moving the DLLs over confirms that it's never actually using the ANGLE gpu-context, and is in fact using vulkan or d3d11 as mpv.conf calls for, but it still refuses to launch without the DLLs right next to either mpv.exe or mpv-2.dll. Using a nightly or stable build from elsewhere doesn't exhibit the same issue like I mentioned earlier, nor did my previous, albeit ancient, m-ab-s built mpv.exe/mpv-2.dll from November.

vt-idiot commented 1 year ago

Am I the only one? I know I can technically "fix" it by commenting out --enable-egl-angle the same way I did for all the SDL2 components, or by just tossing the GL DLLs in the same folder as mpv.exe or mpv-2.dll.

But I am able to use other mpv builds with ANGLE included, whether it's my previous mpv built with m-ab-s, or a nightly build from elsewhere, without needing to do either. I haven't had much luck figuring out what exactly changed in m-ab-s to make mpv.exe show that error, and anything that I try to use said mpv-2.dll to completely freak out with missing handle/symbol errors (because it can't find the GL DLLs).

1480c1 commented 1 year ago

To start with, what I do know, that message shows up if egl-angle is enabled and mpv is enabled.

I'm going to assume there's something going on with https://github.com/mpv-player/mpv/blob/4bcefa5be3b776c68b689b8009759390c2eb62de/video/out/opengl/angle_dynamic.c#L8 which might be related to if it finds the library or not. Weirdly enough for me, in my config.h, I see #define HAVE_EGL_ANGLE_LIB 0, so mine seems to go the else route and loads LIBEGL.DLL at run time. I wonder if it's perhaps related to the fact that we provide the headers, but not the library?

That doesn't really resolve why shinchiro's work fine though, so no clue atm

vt-idiot commented 1 year ago

Does shinchiro build using m-ab-s as well?

I see #define HAVE_EGL_ANGLE_LIB 0, so mine seems to go the else route and loads LIBEGL.DLL at run time. I wonder if it's perhaps related to the fact that we provide the headers, but not the library?

Your guess is as good as far better than mine.

vt-idiot commented 1 year ago

This is still an issue...