Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7.0.1 fails to run on Win7 #136

Closed
therube opened this issue May 28, 2024 · 38 comments
Closed

7.0.1 fails to run on Win7 #136

therube opened this issue May 28, 2024 · 38 comments

Comments

@therube
Copy link

therube commented May 28, 2024

7.0.1 fails to run on Windows 7 (Win7) x64.

ffmpeg-7.0.1-full_build.7z
ffmpeg-7.0.1-full_build-shared.7z

The 7.0.0 builds were fine.

https://i.postimg.cc/nLC4CDm5/ffmpeg701-fails-to-run-on-Win7-ffmpeg700-was-fine.png

Perhaps:

Import Table:
api-ms-win-core-synch-l1-2-0.dll

@GyanD
Copy link
Owner

GyanD commented May 29, 2024

I no longer have a Win7 system to check with, however, on Win10, the functions in the missing DLL are supplied by kernalbase.dll.

The DLL isn't linked in the essentials build nor in the previous git full build. So some external dependency exclusive to the full build has started to call functions from the missing DLL. There are dozens of ext deps. so this could be hard to pinpoint.

Stick with 7.0.0 if you need a full build. Win7 was EOLed over a year ago. so it doesn't look worth it to identify the responsible dep.

@markfilipak-windows
Copy link

System Error

@pzhlkj6612
Copy link

Maybe installing MS updates will solve this issue on Windows 7? See Update for Universal C Runtime in Windows - Microsoft Support. I didn't try it, though.

@markfilipak-windows
Copy link

I found these. They're all different.
c:\CMD & tiny apps\MeGUI\tools\redist\2017_x86\api-ms-win-core-synch-l1-2-0.dll
c:\Program Files (x86)\Foxit Software\Foxit Reader\api-ms-win-core-synch-l1-2-0.dll
c:\Program Files\Java\jre1.8.0_162\bin\api-ms-win-core-synch-l1-2-0.dll
c:\Program Files\Pale Moon\api-ms-win-core-synch-l1-2-0.dll

@markfilipak-windows
Copy link

markfilipak-windows commented Jun 2, 2024

Directory of c:\CMD & tiny apps\MeGUI\tools\redist\2017_x86
17/12/19 04:35 PM 19,840 api-ms-win-core-synch-l1-2-0.dll

Directory of c:\Program Files (x86)\Foxit Software\Foxit Reader
20/07/10 01:11 AM 18,696 api-ms-win-core-synch-l1-2-0.dll

Directory of c:\Program Files\Java\jre1.8.0_162\bin
18/07/14 11:34 AM 19,264 api-ms-win-core-synch-l1-2-0.dll

Directory of c:\Program Files\Pale Moon
22/10/19 09:28 AM 21,968 api-ms-win-core-synch-l1-2-0.dll

Where is ffmpeg looking? I'll copy the latest one to that place.

@GyanD
Copy link
Owner

GyanD commented Jun 2, 2024

Try placing each of these DLLs one at a time in %WINDIR%\System32 and see if it works.

@markfilipak-windows
Copy link

Result from copying the latest one to System32 and running ffmpeg.
Application Error

@markfilipak-windows
Copy link

I got the same result from all 4 versions of api-ms-win-core-synch-l1-2-0.dll

@markfilipak-windows
Copy link

markfilipak-windows commented Jun 2, 2024

Here is version info:
c:\CMD & tiny apps\MeGUI\tools\redist\2017_x86\api-ms-win-core-synch-l1-2-0.dll
      10.0.10586.15 (th2_release.151119-1817)
c:\Program Files (x86)\Foxit Software\Foxit Reader\api-ms-win-core-synch-l1-2-0.dll
      10.0.17134.12 (WinBuild.160101.0800)
c:\Program Files\Java\jre1.8.0_162\bin\api-ms-win-core-synch-l1-2-0.dll
      10.0.15063.137 (WinBuild.160101.0800)
c:\Program Files\Pale Moon\api-ms-win-core-synch-l1-2-0.dll
      10.0.22621.755 (WinBuild.160101.0800)

@GyanD
Copy link
Owner

GyanD commented Jun 3, 2024

Ok, so the blame appears to fall on SDL. It is set to dynamically load this DLL to access two functions only available on Windows 8 or later. It is supposed to fall back on kernel objects if not found. Not sure what changed recently as the log doesn't show any recent changes. Likely something upstream.

@markfilipak-windows
Copy link

"SDL"? Software Developers' Library?

This is a disaster. I can't update FFmpeg. I've been working for 2 months to document fixes to concatenating segments in which open GOPs have become closed GOPs. The fixes involve either setting 'closed_gop' to '1' for the GOPs that go from open to closed, or, preferably, fixes to '-ss' and '-to'. As things stand, even if the fixes are implemented, I won't be able to use them because I can't update FFmpeg.

@markfilipak-windows
Copy link

Maybe installing MS updates will solve this issue on Windows 7? See Update for Universal C Runtime in Windows - Microsoft Support. I didn't try it, though.

Thanks. That's a good idea. That update has version
10.0.10240.16390 of api-ms-win-core-synch-l1-2-0.dll
c:\Windows\System already has version
10.0.22621.755.
But thanks for trying and for caring.

I tried to install it anyway and got an error. I'll do some rebooting and tinkering to see if the situation improves. I'll turn on Windows Services that are currently disabled one at time and test. Stay tuned...

@markfilipak-windows
Copy link

markfilipak-windows commented Jun 3, 2024

Bad news.

I installed Windows6.1-KB2999226-x64.msu. Then I updated FFmpeg to ffmpeg-2024-05-29-git-fa3b153cb1-full_build.7z. Then I rebooted.

When I launch FFmpeg, I get the same Application Error I showed here 6 postings ago.

PS: I had to temporarily turn on the pest: Windows Update service, in order to install Windows6.1-KB2999226-x64.msu.

@pzhlkj6612
Copy link

"SDL"? Software Developers' Library?

Simple DirectMedia Layer.

@GyanD
Copy link
Owner

GyanD commented Jun 4, 2024

Ok, the actual culprit is libjxl. They started using C++ standard lib for memory management recently. However, the .pc file wasn't changed to statically link the standard lib as noted here.

I've tested it here with that change and I no longer see api-ms-win-core-synch-l1-2-0.dll as a dep. I'll incorporate this in the build system on the weekend so check next Monday.

@markfilipak-windows
Copy link

You can do that, Gyan? Oh, you're a champ. I sure hope it works.

@ruboard
Copy link

ruboard commented Jun 9, 2024

yes, I confirm it does not start on win7x64
I haven’t seen any information about the system requirements changed in 7.0.1
I hope this is a resolvable misunderstanding. Without the above crutches.

@markfilipak-windows
Copy link

Hi, Gyan, I installed your new Windows build.
Application Error

@therube
Copy link
Author

therube commented Jun 10, 2024

@mark, the fix for Win7 is not up yet.
Not in builds, not in releases.

If you look at the most recent builds, https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-github,
it says, "Note: not compatible with Windows 7. Will be fixed in future.".

PS: I had to temporarily turn on the pest: Windows Update service, in order to install Windows6.1-KB2999226-x64.msu.

Not necessarily, so long as you know what it is you're looking for, so long as you pull down the correct version for your needs.
https://www.catalog.update.microsoft.com/home.aspx
And for "KB2999226", https://www.catalog.update.microsoft.com/Search.aspx?q=KB2999226.
From there you might have to read through the notes, which might take you elsewhere... but in the end...

@markfilipak-windows
Copy link

markfilipak-windows commented Jun 10, 2024

If you look at the most recent builds, https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-github, it says, "Note: not compatible with Windows 7. Will be fixed in future.".

Hmmm... So it does. However, I went here:
https://www.gyan.dev/ffmpeg/builds/
That's the link in FFmpeg docs.

@GyanD
Copy link
Owner

GyanD commented Jun 11, 2024

After I accounted for libjxl, turns out there's another lib rav1e that also started linking to host libs. I'll have to do a comprehensive linker trace to see what all is linking to shared objects.

@markfilipak-windows
Copy link

Thank you, Gyan. So, it's Microsoft that's causing the problems, right?

@therube
Copy link
Author

therube commented Jun 13, 2024

With only a quick look...

Looks to be working with, https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-github (ffmpeg git 2024-06-13 builds, at present).

(Quick*.
I've done nothing more, at this point in time, other then download "essentials", extract the .exe's from /bin/, & they run, successfully.)

Thank you :-).

@markfilipak-windows
Copy link

@therube, Thank you. I'm in the middle of a 55 hour transcode of a 5 hour video. I'll test 2024-06-13 sometime tomorrow.

@Mr-Jake
Copy link

Mr-Jake commented Jun 14, 2024

@therube Essentials always worked with Windows 7. It is full and full shared that fail.

@therube
Copy link
Author

therube commented Jun 14, 2024

@therube Essentials always worked with Windows 7. It is full and full shared that fail.

Heh, oops, you're right.
Sorry about the noise.

@GyanD
Copy link
Owner

GyanD commented Jun 16, 2024

Can someone test the ffmpeg-master-latest-win64-gpl build from BtbN on Win 7?

@Mr-Jake
Copy link

Mr-Jake commented Jun 16, 2024

@GyanD BtbN ffmpeg-master-latest-win64-gpl build fails with the same error message. "This application was unable to start correctly (0xc0000005)."

But if you compile the latest or 7.0.1 stable with rdp's helper script, it works with Windows 7. https://github.com/rdp/ffmpeg-windows-build-helpers

@GyanD
Copy link
Owner

GyanD commented Jun 16, 2024

@Mr-Jake rdp does not seem to include rav1e which is the culprit here.

It looks like the issue with rav1e arises due to changes in the rust toolchain.
rust-lang/rust#126195

I'll downgrade rust and check.

@GyanD
Copy link
Owner

GyanD commented Jun 16, 2024

So, rust, the compiler for rav1e, no longer supports Windows 7. Which means the full build can't work on Windows 7 (without dropping rav1e). I'm afraid that's the end of the road.

The essentials build will continue to work on Win 7 as long as viable.

Release 7.0 and git 2024-05-23-git-ece95dc3dc are the last full builds to support Windows 7.

@MasterInQuestion
Copy link

MasterInQuestion commented Aug 24, 2024

    I believe copying the relevant DLL from later Windows should workaround:
    https://github.com/EricBerendsen/dvbinspector/issues/71#issuecomment-2170443068
    .
    Probably not.
    See: https://github.com/GyanD/codexffmpeg/issues/136#issuecomment-2143895506

    I guess such maybe deliberately patched to reject old Windows.
    Try:
    https://github.com/nalexandru/api-ms-win-core-path-HACK
    https://github.com/cristianadam/api-ms-win-core-synch-Win7
    https://github.com/search?type=repositories&q=%22api-ms-win-core%22
    https://www.google.com/search?hl=en&gl=ca&num=10&q=site:github.com+%22api-ms-win-core%22
    https://www.google.com/search?hl=en&gl=ca&num=100&filter=0&q=site:github.com+intitle:%22api-ms-win-core%22+-inurl:discussions+-inurl:issues+-inurl:pulls+-inurl:blob+-inurl:commit+-inurl:commits+-inurl:release+-inurl:releases
    .
    Core idea: Recompile the needed ones from similar projects.
    E.g. https://en.wikipedia.org/wiki/Wine_(software)

    I guess patching rav1e to avoid the offended functions may be also possible:
    These typically don't serve much actual purpose: mostly replaceable.

    FFmpeg may also improve the routine, to make alike crashes only occur on invoking the offenders: rather than start-up crashing.

@GyanD
Copy link
Owner

GyanD commented Aug 25, 2024

I'm not going to be shipping Windows DLLs in my builds!

If you have successfully tested the operation of current full builds on Windows 7 after making available some DLLs, you can list them here along with legal download sources, and I can leave a note on the website.

@MasterInQuestion
Copy link

    I guess @markfilipak-windows would be interested to try out.
    I don't use Windows, but I target Windows.

@ivanshatsky
Copy link

ivanshatsky commented Aug 29, 2024

@markfilipak-windows
I can confirm that aforementioned VxKex makes ffmpeg 7.0.1/7.0.2 workable under Windows 7 SP1 x64.

image
image

Mirror:
https://github.com/i486/VxKex

See also:
https://news.ycombinator.com/item?id=41032479

@MasterInQuestion
Copy link

MasterInQuestion commented Aug 29, 2024

    Does applying:
    https://github.com/cristianadam/api-ms-win-core-synch-Win7
    ; alone work?

    Namely, just "api-ms-win-core-synch-l1-2-0.dll".

    I believe the VK thing should also have the various bundled.

@ivanshatsky
Copy link

@MasterInQuestion
Yes, placing this dll next to ffmpeg 7.0.2 executable also makes it workable. However VxKex seems to be more universal solution, solving other problems like the one described here.

@MasterInQuestion
Copy link

MasterInQuestion commented Aug 29, 2024

    Essentially the same.
    I believe VxKex may be additionally able to bypass certain installers that simply reject Windows 7.

    And for alike missing DLL, place directly into "C:\Windows\System32" (or anywhere on PATH) preferable.
    (so no need to spam-copy everywhere)

    ----

    @GyanD
    I have verified, that putting the single "api-ms-win-core-synch-l1-2-0.dll" along with "ffmpeg.exe" works around the issue.
    Placing into "System32" (even overwrite) should also work:
    Not working with the newer DLL would also imply not working with later Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants