[FFmpeg-devel] [PATCH] configure: improve logic and checks for nvenc

James Almer jamrial at gmail.com
Wed Aug 31 17:04:47 EEST 2016

On 8/31/2016 5:26 AM, Timo Rothenpieler wrote:
>>> +        echo 'NV_ENCODE_API_FUNCTION_LIST flist;'
>>> +        echo 'void f(void) { struct { const GUID guid; } s[] = { { NV_ENC_PRESET_HQ_GUID } }; }'
>> This will most likely prevent nvenc from being enabled for msvc 2012, but not old
>> mingw32, which is failing with the error:
>> src/libavcodec/nvenc.c:115:52: error: 'ENOBUFS' undeclared here (not in a function)
>>      { NV_ENC_ERR_NOT_ENOUGH_BUFFER,        AVERROR(ENOBUFS), "not enough buffer"        },
>> I think the easiest solution would be using AVERROR_BUFFER_TOO_SMALL if ENOBUFS is
>> not defined.
> Yes, if that's all that's failing, I'll just do that.
>> That or just disable nvenc if using mingw32 toolchains by checking "enabled
>> libc_mingw32", since disabling for target-os == mingw32 would also affect mingw-w64.
>> gcc-asan fails with
>> /usr/bin/ld: libavcodec/libavcodec.a(nvenc.o): undefined reference to symbol 'dlsym@@GLIBC_2.2.5'
>> /usr/lib/../lib/libdl.so.2: error adding symbols: DSO missing from command line
>> collect2: error: ld returned 1 exit status
>> I have no idea how to deal with this.
> When and how are you seeing that error?
> That usually means a wrong order of libraries/object-files on linker
> command line.


Check the "Compile" logs for the failing runs.
A simple "configure --toolchain=gcc-asan" seems to be enough to get this error.

More information about the ffmpeg-devel mailing list