[FFmpeg-devel] fail to build ffmpeg with icc 14

James Almer jamrial at gmail.com
Fri Feb 2 17:10:48 EET 2018


On 2/2/2018 12:04 PM, wm4 wrote:
> On Fri, 2 Feb 2018 21:50:00 +0800 (CST)
> qw <applemax82 at 163.com> wrote:
> 
>> Hi,
>>
>>
>> I use the following command to build ffmpeg:
>>
>>
>> ./configure --cc=/opt/intel/bin/icc --enable-version3 --enable-asm --enable-avfilter --disable-static --enable-shared --enable-gpl --enable-nonfree --prefix=/usr/local/ --extra-cflags='-I/usr/local/include --extra-ldflags='-L/usr/local/lib --enable-stripping
>> make
>>
>>
>> But I fail to compile ffmpeg, and error message is shown as below:
>>
>>
>> icc: command line warning #10121: overriding '-std=gnu99' with '-std=c99'
>> libavutil/cpu.c(48): error: identifier "ATOMIC_VAR_INIT" is undefined
>>   static atomic_int cpu_flags = ATOMIC_VAR_INIT(-1);
>>                                 ^
> 
> Maybe we need to force c11? Could you try to add -std=c11 or -std=gnu11
> to CFLAGS?

That's already done in configure, and either a compat or a dummy
stdatomic header is added if the compiler doesn't fully support c11
atomics. There's no way for ATOMIC_VAR_INIT to be undefined.


More information about the ffmpeg-devel mailing list