[FFmpeg-trac] #9909(build system:new): MSVC build failure on Windows when using assembly optimizations
FFmpeg
trac at avcodec.org
Tue Sep 6 19:29:08 EEST 2022
#9909: MSVC build failure on Windows when using assembly optimizations
-------------------------------------+-------------------------------------
Reporter: chocky | Type: defect
Status: new | Priority: normal
Component: build | Version: git-
system | master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
I am unable to build recent versions of FFmpeg with MSVC on Windows using
the msys environment, when using assembly optimizations. Previously I was
able to compile FFmpeg when following the MSVC compilation guide.
I have gone back through previous code snapshots on the master branch, and
it seems to be the changes on 2022-06-22 which have introduced the issue.
Snapshots prior to this build OK with assembly optimisations using MSVC.
I am using Windows 10 Pro (19044.1889) and Microsoft Visual Studio 2022
(v17.3.3).
The steps that I used to reproduce the issue (following the MSVC
compilation guide):
Install msys environment.
Launch a Visual Studio Developer Command Prompt and run vcvarsall.bat
amd64.
From the developer command prompt, run msys2_shell.
From the msys terminal, install required packages (one time setup):
pacman -S make
pacman -S yasm
pacman -S diffutils
Set up the appropriate tools path in msys terminal (for a 64bit build):
export PATH="/c/Program Files/Microsoft Visual
Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/HostX64/x64":$PATH
When using the following configuration, make hangs:
./configure --target-os=win64 --arch=x86_64 --disable-programs --enable-
shared --disable-static --toolchain=msvc
By hang, I mean that compilation reaches this stage but does not progress:
LD libavcodec/avcodec-59.dll
Creating library libavcodec/avcodec.lib and object
libavcodec/avcodec.exp
At this point it seems as if link.exe has locked up, and pressing Ctrl+C
results in:
make: *** Deleting file 'libavcodec/avcodec-59.dll'
make: unlink: libavcodec/avcodec-59.dll: Device or resource busy
Note that if I use a configuration with the --disable-asm flag, make
succeeds:
./configure --target-os=win64 --arch=x86_64 --disable-programs --enable-
shared --disable-static --toolchain=msvc --disable-asm
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9909>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list