[TEST-PATCH] multimedia/mplayer: quick hack to fix build with gcc342 on 5-current

Paul Seniura pdseniura at techie.com
Fri Aug 13 13:56:00 PDT 2004


I've hit another brick wall rebuilding everything with
gcc342 on -Current.

MPlayer was giving us goofy symbol lookup errors right
after building kernel+world the first time with the
system compiler updated to gcc342.  So it is
inevitable that MPlayer was going to need to be
recompiled.  (I'm suffering withdrawal pains now,
can't listen to Alex Jones or Jeff Rense or
Dave & Joyce Riley or Michael Corbin... :D )

MPlayer is needed for some of the KDE features.  And we
enable just about every knob there is, including
WITH_OPTIMIZED_CFLAGS to squeeze every ounce out of this
puny p2, so the package builds are kinda not so fun to
use.  :/

It's the old problem of lprint(f) not being available on our
platform.  Somehow the project's configure script is finding
lprint but there is no lprintf, and that is blowing up the
build at the final step where it links everything together:

gmake[1]: Leaving directory `/src/ports/multimedia/mplayer/work/MPlayer-1.0pre5/libmenu'
cc -I../libvo -I../../libvo -I/usr/X11R6/include [...a humongous link statement...]
libmpcodecs/libmpcodecs.a(vf_qp.o)(.text+0xc9): In function `config':
: undefined reference to `lrintf'
libaf/libaf.a(af_format.o)(.text+0x13f1): In function `play':
: undefined reference to `lrintf'
libaf/libaf.a(af_format.o)(.text+0x16cf): In function `play':
: undefined reference to `lrintf'
libaf/libaf.a(af_format.o)(.text+0x1a87): In function `play':
: undefined reference to `lrintf'
libaf/libaf.a(af_format.o)(.text+0x1ae3): In function `play':
: undefined reference to `lrintf'
libavcodec/libavcodec.a(mpegvideo.o)(.text+0xd621): more undefined references to `lrintf' follow
gmake: *** [mplayer] Error 1
*** Error code 2

Stop in /src/ports/multimedia/mplayer.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade53967.0 make
** Fix the problem and try again.
--->  Build of multimedia/mplayer ended at: Fri, 13 Aug 2004 13:41:42 -0500 (consumed 00:24:14)
--->  Reinstallation of multimedia/mplayer ended at: Fri, 13 Aug 2004 13:41:42 -0500 (consumed 00:24:14)
--->  Listing the results (+:done / -:ignored / *:skipped / !:failed)
        ! multimedia/mplayer (mplayer-gtk-esound-0.99.5)        (missing header)
--->  Packages processed: 0 done, 0 ignored, 0 skipped and 1 failed
--->  Session ended at: Fri, 13 Aug 2004 13:41:42 -0500 (consumed 00:24:21)

I haven't had time to build a kernel+world since this past
Wednesday 11 August in the morning, having to concentrate
on finishing these rebuilds with gcc342.  But the cvs-src@
log doesn't look like any commits were done to affect/help
this problem directly.

Studying earlier hits on this at the MPlayerHQ.hu forums, it
might be safe to simply edit the generated config.h file to
"#undef HAVE_LRINTF" and let everything compile as-is. 
There is no ./configure switch to do this particular thing.

So I whipped up this patch for the FreeBSD port skeleton's
Makefile (not the project's):

--- Makefile_orig	Fri Jul 23 16:57:45 2004
+++ Makefile	Fri Aug 13 14:43:40 2004
@@ -665,6 +665,8 @@
 	@${REINPLACE_CMD} -e 's#-pthread#${PTHREAD_LIBS}#g' \
+	${REINPLACE_CMD} -e 's/#define HAVE_LRINTF 1/#undef HAVE_LRINTF/g' \
+		${WRKSRC}/config.h

MPlayer compiles fine now. 
And no more symbol lookup errors. 
Have not tested much playing yet.

What do y'all think? 
Or have I completely missed something on
the maillists/commits?

  --  thx, Paul Seniura
           System Specialist
           State of Okla. D.O.T.

More information about the freebsd-ports mailing list