MINGW-packages icon indicating copy to clipboard operation
MINGW-packages copied to clipboard

Build 32 bit ffmpeg cannot run on Win10

Open HuangDeFa opened this issue 1 year ago • 8 comments

Hello I used msys2 and mingw-w64-i686-toolchain to build 32 bit ffmpeg , but it only work in the mingw 32 environment , when run it on my pc (win 10 64bit) would throw en error msgbox with error code 0xc000007b

if anyone know this issue ? Or something I missed for the environment , I just follow the steps of https://www.msys2.org/

HuangDeFa avatar Jul 02 '22 14:07 HuangDeFa

What command did you run? Which environment did you run it? How did you compile ffmpeg? Does the issue happen in mingw32 environment only?

Biswa96 avatar Jul 02 '22 15:07 Biswa96

What command did you run? Which environment did you run it? How did you compile ffmpeg?

The environment just on my pc Windows 10 64bit

configure ffmpeg like that: ./configure --disable-doc --disable-ffprobe --disable-network --disable-x86asm make

after make success , then run ./ffmpeg.exe on wingw 32 shell environment would be fine but not on the powershell or cmd

HuangDeFa avatar Jul 02 '22 15:07 HuangDeFa

It is expected. The ffmpeg.exe will unable to find the dependent DLLs. It is possible to initialize the mingw32 environment in Powershell or CMD with this command C:\msys64\msys2_shell.cmd -defterm -no-start -mingw32. Or try to add C:\msys64\mingw32 in %PATH% variable.

Biswa96 avatar Jul 02 '22 15:07 Biswa96

It is expected. The ffmpeg.exe will unable to find the dependent DLLs. It is possible to initialize the mingw32 environment in Powershell or CMD with this command C:\msys64\msys2_shell.cmd -defterm -no-start -mingw32. Or try to add C:\msys64\mingw32 in %PATH% variable.

Thanks for reply ! I just build the same in mingw64 and it can run both mingw64 shell and Powershell or CMD directly without initialize the mingw64 environment . it is possible to build a static 32 bit ffmpeg that can work on windows 64 without initialize the mingw32 environment ?

HuangDeFa avatar Jul 02 '22 16:07 HuangDeFa

it is possible to build a static 32 bit ffmpeg that can work on windows 64 without initialize the mingw32 environment ?

It depends on the dependencies of ffmpeg. It is not possible to build 100% static ffmpeg binaries with all the dependencies in mingw-w64-ffmpeg package.

Though it will be interesting to find the anomaly in mingw32 binaries.

Biswa96 avatar Jul 02 '22 16:07 Biswa96

You might use depends.exe to find the missing depends and look to see if there are static versions of the DLLs.

stahta01 avatar Jul 03 '22 17:07 stahta01

copy the exe somewhere, and run this inside that folder

for i in $(seq 3); do for bin in $(ntldd -R *exe | grep -i mingw | cut -d">" -f2 | cut -d" " -f2); do cp -vu "$bin" . ; done; done

andres-asm avatar Jul 12 '22 04:07 andres-asm

It is expected. The ffmpeg.exe will unable to find the dependent DLLs. It is possible to initialize the mingw32 environment in Powershell or CMD with this command C:\msys64\msys2_shell.cmd -defterm -no-start -mingw32. Or try to add C:\msys64\mingw32 in %PATH% variable.

Thanks for reply ! I just build the same in mingw64 and it can run both mingw64 shell and Powershell or CMD directly without initialize the mingw64 environment . it is possible to build a static 32 bit ffmpeg that can work on windows 64 without initialize the mingw32 environment ?

you probably added something to your path

andres-asm avatar Jul 12 '22 04:07 andres-asm