Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US :: FAQ
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
FORUMS:listlist (w/ descriptions)archivetagssearchhall of famerecent posts

error: static declaration of 'lrint' follows non-static declaration

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook
Gerry Renoerror: static declaration of 'lrint' follows non-static declaration
by on Apr 28, 2012 at 6:39:28 pm

Under newer GCC > 4 you get these errors after configuring and compiling ffmpeg:
$ make
CC libavfilter/af_aconvert.o
In file included from ./libavutil/internal.h:182,
from ./libavutil/common.h:355,
from ./libavutil/avutil.h:327,
from ./libavutil/samplefmt.h:22,
from ./libswresample/swresample.h:30,
from libavfilter/af_aconvert.c:29:
./libavutil/libm.h:67: error: static declaration of 'lrint' follows non-static declaration
./libavutil/libm.h:74: error: static declaration of 'lrintf' follows non-static declaration
./libavutil/libm.h:81: error: static declaration of 'round' follows non-static declaration
./libavutil/libm.h:95: error: static declaration of 'trunc' follows non-static declaration
make: *** [libavfilter/af_aconvert.o] Error 1



So how do you build ffmpeg using newer GCC?


Return to posts index
Reply   Like  

Gerry RenoRe: error: static declaration of 'lrint' follows non-static declaration
by on Apr 28, 2012 at 7:17:55 pm

It looks like the problem might relate to math.h and tgmath.h.

On some platforms lrint and friends are defined in math.h and on others they are defined in tgmath.h.

So when ffmpeg includes a copy of math.h that contains lrint and friends then you get the redefinition error.

What can we do though to get ffmpeg to build?


Return to posts index
Reply   Like  

Gerry RenoRe: error: static declaration of 'lrint' follows non-static declaration
by on Apr 28, 2012 at 8:40:17 pm

Here's a workaround:

Edit config.h (yes, it's generated by configure) and set all lrint and friends to '1'.
eg: #define HAVE_LRINT 1

This will permit the build to continue.

If you rerun 'configure' then you will need to do edit config.h again.

What is happening is that when you have a host and target system that implement lrint and friends in different math headers that is when you run into the problem. The configure is not looking at the target system only the host system on cross-compiles. This is why macports android mipsel and others run into the problem.


.


Return to posts index
Reply   Like  
+1

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook


FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2014 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]