[Ffmpeg-devel] gcc: "sorry, unimplemented: inlining failed in call to 'lrintf'" revisited

Michael Shell list1
Wed Jun 15 20:32:23 CEST 2005


I ran into a problem compiling ffmpeg (20050612 snapshot) on my linux, gcc 3.4.2 system:

./configure --prefix=/usr/local --enable-mp3lame --enable-libogg  --enable-vorbis --enable-shared --enable-a52 --enable-pp --enable-shared-pp --enable-gpl

gcc -O3 -g -Wall -Wno-switch  -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE   -c -o mpegvideo.o mpegvideo.c 
In file included from mpegvideo.c:29:
dsputil.h:596: warning: static declaration of 'lrintf' follows non-static declaration
mpegvideo.c: In function `MPV_encode_init':
mpegvideo.c:890: warning: unused variable `dummy'
mpegvideo.c: In function `MPV_encode_picture':
dsputil.h:596: sorry, unimplemented: inlining failed in call to 'lrintf': redefined extern inline functions are not considered for inlining
mpegvideo.c:2404: sorry, unimplemented: called from here
make[1]: *** [mpegvideo.o] Error 1

This problem was first reported by Robert Lippmann (who was using a
recent FC3) on April 29, 2005 in the thread "ffmpeg compile fail w/gcc
3.4.3 due to lrintf definition":


to which Michael Niedermayer replied:


> i dont know what 'sorry, unimplemented' is supposed to mean,
> but a quick  google points to gcc as the source of this mess, 
> i suggest u try a different version (2.95 or 3.3 for example)

I beg to differ, as my admittedly incomplete understanding seems
to suggest otherwise:


The problem is caused by a change in the Linux kernel headers. (I am using 
the stock kernel headers - the same ones my system, including 
libc, gcc, etc. were built against.)

In my case, I changed the line (about line number 596):

static always_inline long int lrintf(float x)

in /libavcodec/dsputil.h to:

static __inline__ long int lrintf(float x)

which resulted in a good build although with several compilation warnings

dsputil.h:598: warning: static declaration of 'lrintf' follows non-static declaration

so, this may not be the optimal solution. However, I am pretty sure it
is not a gcc problem.

 Maybe this will help somebody out of a jam,

 Mike Shell


More information about the ffmpeg-devel mailing list