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.49k stars 257 forks source link

mingw64 libplacebo fail #2614

Closed npxl32 closed 3 months ago

npxl32 commented 4 months ago

The build failed on libplacebo with a git error:

16:07:09   Running git update for libplacebo...
16:07:16 ┌ libplacebo git  .............................. [Updates found]
Likely error (tail of the failed operation logfile):
    glad/generator/c/__init__.py
    glad/generator/c/templates/base_template.c
    glad/generator/c/templates/base_template.h
    glad/generator/c/templates/egl.c
    glad/generator/c/templates/egl.h
    glad/generator/c/templates/gl.c
    glad/generator/c/templates/gl.h
Please move or remove them before you switch branches.
Aborting
fatal: Unable to checkout 'd08b1aa01f8fe57498f04d47b5fa8c48725be877' in submodule path '3rdparty/glad'
git.submodule failed. Check D:/mabs/build/libplacebo-git/ab-suite.git.submodule.log
This is required for other packages, so this script will exit.

logs.zip

L4cache commented 3 months ago

Somewaht irrelevant question here: is your libplacebo working properly in ffmpeg? I have nvidia card and ffmpeg (when libplacebo filter in use) just crashes every time (luckily didn't bring down the entire video card driver)

Andarwinux commented 3 months ago

NVIDIA R550 driver has broken Vulkan Video, which causes segmentation fault. also CUDA/Vulkan interoperability has been completely broken since FFmpeg 6.1. But in any case, it nothing to do with mabs.

L4cache commented 3 months ago

nothing to do with mabs

Yeah, that's what "somewhat irrelevant" was for.

But if by Vulkan Video you mean -hwaccel vulkan thing, I can still use it on driver 551

Andarwinux commented 3 months ago

I can still use it on driver 551

NVIDIA's internal version control seems gone haywire, with Windows 551.52 and earlier R550 series drivers actually being the old "Nightly" branch, while 551.61 merged the latest changes from Vulkan Beta, and the build type changed to"Official", Vulkan Video is broken since this release.

I'm guessing that what you're experiencing may be a different problem that the patchwork patch should fix.

L4cache commented 3 months ago

I use 551.76 now and 551.23 before so if the problem is limited to 551.61 only then I just never actually run into it.

The problem that patch solves, I'd describe it as "exits with error" but libplacebo is straight up crashing... but perhaps they are connected in deeper layer.

hydra3333 commented 3 months ago

Somewaht irrelevant question here: is your libplacebo working properly in ffmpeg? I have nvidia card and ffmpeg (when libplacebo filter in use) just crashes every time (luckily didn't bring down the entire video card driver)

If you post an ffmpeg commandline I may have a little test.

npxl32 commented 3 months ago

Somewaht irrelevant question here: is your libplacebo working properly in ffmpeg? I have nvidia card and ffmpeg (when libplacebo filter in use) just crashes every time (luckily didn't bring down the entire video card driver)

I've never had a build of libplacebo, this is my first time compiling it.

Also to my understanding this is a Git error, but I may be wrong.

hydra3333 commented 3 months ago

I've never had a build of libplacebo, this is my first time compiling it.

How strange. I built ffmpeg from scratch using MABS - with libplacebo - it just the day before yesterday.

A suggestion: Start a Windows Sandbox - this is guaranteed to be a clean system in a VM. In the Windows Sandbox download MABS in the usual way and start building in the usual way from scratch (i.e. no pre-created .ini file etc). See how you go. If it fails for you, let me know and I'll post my ffmpeg_options.txt and media-autobuild_suite.ini for you to pop into the build sub-folder and then try to re-run the MABS build.

I assume you're building in Windows since you do not mention otherwise and MABS requirements says "Windows 64-bits". Hopefully Windows 11.

npxl32 commented 3 months ago

A suggestion: Start a Windows Sandbox - this is guaranteed to be a clean system in a VM. In the Windows Sandbox download MABS in the usual way and start building in the usual way from scratch (i.e. no pre-created .ini file etc). See how you go. If it fails for you, let me know and I'll post my ffmpeg_options.txt and media-autobuild_suite.ini for you to pop into the build sub-folder and then try to re-run the MABS build.

I assume you're building in Windows since you do not mention otherwise and MABS requirements says "Windows 64-bits". Hopefully Windows 11.

Yes, I use Windows 11 64-bit. But, for whatever reason, Microsoft decided that my genuine Windows 11 Pro license should not give me Windows 11 Pro? Because of that, I'm on Windows 11 Home instead of Pro, which means no Windows Sandbox. However, I do have an untouched and fresh Windows 11 VM lying around that I can use to run mabs.

I also have an Arch GNU/Linux VM I could cross-compile ffmpeg on, but that defeats the purpose of opening a mabs issue.

L4cache commented 3 months ago

A suggestion: Start a Windows Sandbox - this is guaranteed to be a clean system in a VM. In the Windows Sandbox download MABS in the usual way and start building in the usual way from scratch (i.e. no pre-created .ini file etc). See how you go. If it fails for you, let me know and I'll post my ffmpeg_options.txt and media-autobuild_suite.ini for you to pop into the build sub-folder and then try to re-run the MABS build. I assume you're building in Windows since you do not mention otherwise and MABS requirements says "Windows 64-bits". Hopefully Windows 11.

Yes, I use Windows 11 64-bit. But, for whatever reason, Microsoft decided that my genuine Windows 11 Pro license should not give me Windows 11 Pro? Because of that, I'm on Windows 11 Home instead of Pro, which means no Windows Sandbox. However, I do have an untouched and fresh Windows 11 VM lying around that I can use to run mabs.

I also have an Arch Linux VM I could cross-compile ffmpeg on, but that defeats the purpose of opening a mabs issue.

Is this some kind of arch linux flex🤣 Back to topic, is the problem recurring? I suspect it is temporary.

Use a VM to run the suite is definitely a good choice though, Windows have very awful process creation overhead (accordingly), and the compile things are very heavy on that... a VM would only mean one process (or several) to the host, so it will not drag you whole computer down to a very slow state

npxl32 commented 3 months ago

Is this some kind of arch GNU/Linux flex🤣

Absolutely not 😅

L4cache commented 3 months ago

Is this some kind of arch GNU/Linux flex🤣

Absolutely not 😅

Just kidding🙊

npxl32 commented 3 months ago

Use a VM to run the suite is definitely a good choice though, Windows have very awful process creation overhead (accordingly), and the compile things are very heavy on that... a VM would only mean one process (or several) to the host, so it will not drag you whole computer down to a very slow state

Unfortunately Windows 11 VMs keep freezing on my computer (which is decent-ish enough to run a Windows 11 VM), so I might have to fall back to Windows 10 VM or even (uh oh) Windows 8.1 VM

hydra3333 commented 3 months ago

Unfortunately Windows 11 VMs keep freezing on my computer (which is decent-ish enough to run a Windows 11 VM)

Oh dear. On your PC (the host) have you tried the usual fix ? sfc /scannow And MS Safety Scanner ? https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/safety-scanner-download And a decent offline scan with Win Defender ?

npxl32 commented 3 months ago

Oh dear. On your PC (the host) have you tried the usual fix ? sfc /scannow And MS Safety Scanner ? https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/safety-scanner-download And a decent offline scan with Win Defender ?

Yeah, I've tried those, but now that I look back at it, my system is subpar for an entire Windows 11 VM. I guess I have to use Windows 10

L4cache commented 3 months ago

A full VM (unlike windows sandbox) should be more independent from host "system file integrity", so much less likely the system repairment things would make different. What VM software do you use and what resources you gave the Windows 11 VM? The actual "hardware" requirement of Winodws 11 is just the same as Windows 10, aside from the limitation they put in install media.

npxl32 commented 3 months ago

A full VM (unlike windows sandbox) should be more independent from host "system file integrity", so much less likely the system repairment things would make different. What VM software do you use and what resources you gave the Windows 11 VM? The actual "hardware" requirement of Winodws 11 is just the same as Windows 10, aside from the limitation they put in install media.

Well, technically Windows 11 refuses to run on anything less than 4GB RAM, while I believe Windows 10 allows you to run it on like 2GB RAM. I use VirtualBox, which I'm aware isn't very good and my host is actually pretty bad now that I look at it. It only has 8GB RAM, and 256MB video RAM from an integrated graphics solution. (But everything was overpriced and it ended up costing like $1000?!) The guest has 4GB RAM and no 3D acceleration. However, there is a trick to enable Hyper-V without Windows 11 Pro, which I used, and you can use some sort of hardware acceleration if you (A) Have Hyper-V enabled and (B) make a few changes in VirtualBox's interface.

L4cache commented 3 months ago

Technically it's just the unmodified official installer that refuses to install... the Windows 11 OS itself can run on 2GB RAM just that you can't do many things other than boot it up unless you "debloated" it and I believe same thing applies to Windows 10 too. Now that's way off topic...

npxl32 commented 3 months ago

Technically it's just the unmodified official installer that refuses to install... the Windows 11 OS itself can run on 2GB RAM just that you can't do many things other than boot it up unless you "debloated" it and I believe same thing applies to Windows 10 too. Now that's way off topic...

Oh, I thought that the OS itself would refuse to boot, not just the installer. I've heard you can bypass the RAM check (and in fact many things, including the TPM check) from the installer. I'll see if that works.

Also when I say freeze I mean they only freeze when I check on them after a few hours (like when I go to look at what the VM's screen shows)

...yeah this is getting super off topic

EDIT: I think I found the solution: the VBoxSVGA drivers are apparently bugged, so switching to the VBoxVGA drivers fixed my issue. I knew it was a graphics bug.

npxl32 commented 3 months ago

libplacebo succesfully compiled in the VM, but now I have a completely unrelated CC error: mpverror I'll close this issue for now and MAY open a separate proper issue for mpv.