problem building mplayer

RW list-freebsd-2004 at morbius.sent.com
Mon Mar 21 07:28:01 PST 2005


On Monday 21 March 2005 01:26, Michael C. Shultz wrote:
> On Sunday 20 March 2005 05:06 pm, RW wrote:
> > I'm trying upgrade mplayer (under 5.3-RELEASE-p5), and it's failing
> > to build.
..
> `output_to_PCM':
> > : undefined reference to `lrintf'
> >
> > libfaad2/libfaad2.a(output.o)(.text+0x99f): more undefined references
> > to `lrintf' follow
> > gmake: *** [mplayer] Error 1
> > *** Error code 2
> >
> > Stop in /data/ports/multimedia/mplayer.
> > ** Command failed [exit code 1]: /usr/bin/script -qa
> > /tmp/portupgrade86348.0 make WITHOUT_RUNTIME_CPUDETECTION=yes
> > WITH_ARTS=yes WITH_REALPLAYER=YES WITH_XMMS=YES
> > WITH_OPTIMIZED_CFLAGS=YES WITH_DVD_DEVICE=/dev/dvd
> > _______________________________________________
>
> running: find /usr/local/include/ | xargs grep lrintf
>
> returns:
>
> /usr/local/include/ffmpeg/dsputil.h:static inline long int lrintf(float
> x)
>
> Do you have this file?  /usr/local/include/ffmpeg/dsputil.h
>
> pkg_info -W /usr/local/include/ffmpeg/dsputil.h
>
> /usr/local/include/ffmpeg/dsputil.h was installed by package
> ffmpeg-0.4.9.p1_2
>
> do you have ffmpeg installed?

I do, but I dont think it's related to that. 

lrintf seems to be a standard C99 rounding function, which has to be defined 
when it is not in the standard libraries. 

It's seems the problem is related to mplayer/files/patch-libfaad2-common.h 
which changes:
---------------------------------------------------------------
#if defined(_WIN32) && !defined(__MINGW32__)
    #define HAS_LRINTF
    static INLINE int lrintf(float f)
    {
     ...
-------------------------------------------------------------
to
--------------------------------------------------------------------------------------
#if defined(HAVE_LRINTF)
    #define HAS_LRINTF
  #elif defined(_WIN32) && !defined(__MINGW32__)
    #define HAS_LRINTF
    static INLINE int lrintf(float f)
    {
     ...
----------------------------------------------------------------------------------------

For some reason HAVE_LRINTF is defined, without lrintf being in the standard 
library. If one undefs  HAVE_LRINTF the build completes. 


More information about the freebsd-ports mailing list