Opened 3 years ago

Last modified 3 years ago

#5279 new defect

ffmpeg cannot link with --enable-libmfx and --toolchain=msvc

Reported by: KevinA Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: qsv
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Trying to build ffmpeg on windows with --toolchain=msvc --enable-libmfx . And it cannot link.

I've tried on both HEAD and the tags/n2.8.6

Configure Command:

./configure --prefix=/c/RefDlls/DirectShowLibs/ffwhat --toolchain=msvc --enable-asm --enable-yasm --enable-shared --disable-network --disable-doc --disable-decoders --disable-programs --disable-avdevice --enable-libmfx

I'm building using MinGW-w64

I get the following link error

allcodecs.o : error LNK2001: unresolved external symbol _ff_h264_qsv_hwaccel
allcodecs.o : error LNK2001: unresolved external symbol _ff_hevc_qsv_hwaccel
allcodecs.o : error LNK2001: unresolved external symbol _ff_mpeg2_qsv_hwaccel
allcodecs.o : error LNK2001: unresolved external symbol _ff_vc1_qsv_hwaccel
libavcodec/avcodec-56.dll : fatal error LNK1120: 4 unresolved externals
library.mak:111: recipe for target 'libavcodec/avcodec-56.dll' failed

Attachments (2)

config.log (334.2 KB) - added by KevinA 3 years ago.
Config.log
make.log (171.7 KB) - added by KevinA 3 years ago.
output of make command

Download all attachments as: .zip

Change History (5)

Changed 3 years ago by KevinA

Config.log

Changed 3 years ago by KevinA

output of make command

comment:1 Changed 3 years ago by cehoyos

  • Keywords qsv added

Is the issue reproducible with ./configure --toolchain=msvc --enable-libmfx?
Please run make twice and provide the console output of a third run make V=1.

comment:2 Changed 3 years ago by heleppkes

This is caused by disabling the decoders. The dependency chain in configure seems messed up, the hwaccels select some component which doesn't even exist.

comment:3 Changed 3 years ago by KevinA

turning on decoders leads to another error
it's trying to build libopus

opusdec.o : error LNK2019: unresolved external symbol _swr_is_initialized referenced in function _opus_decode_frame
opusdec.o : error LNK2019: unresolved external symbol _swr_init referenced in function _opus_init_resample
opusdec.o : error LNK2019: unresolved external symbol _swr_free referenced in function _opus_decode_close
opusdec.o : error LNK2019: unresolved external symbol _swr_close referenced in function _opus_decode_flush
opusdec.o : error LNK2019: unresolved external symbol _swr_alloc referenced in function _opus_decode_init
libavcodec/avcodec-56.dll : fatal error LNK1120: 6 unresolved externals
library.mak:111: recipe for target 'libavcodec/avcodec-56.dll' failed
Note: See TracTickets for help on using tickets.