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

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




  Greetings,

I ran into a problem compiling ffmpeg (20050612 snapshot) on my
2.6.8.1 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

make
.
.
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":

http://mplayerhq.hu/pipermail/ffmpeg-devel/2005-April/000395.html

to which Michael Niedermayer replied:

http://mplayerhq.hu/pipermail/ffmpeg-devel/2005-April/000396.html

> 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:

https://bugzilla.redhat.com/beta/show_bug.cgi?id=147446
http://sourceforge.net/mailarchive/forum.php?thread_id=7211673&forum_id=7131


The problem is caused by a change in the Linux kernel headers. (I am using 
the stock 2.6.8.1 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
like:

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