[MPlayer-users] mplayer build issues on Linux -- autodection not working correctly and workaround causes make to fail

David Wadler dwadler at gmail.com
Mon Jul 18 17:13:30 CEST 2011


I tried posting this on Friday, but it didn't seem to take. Anyway, I
recently built ffmpeg with no problem and decided to build mplayer/ mencoder
too. I haven't built mplayer/mencoder for some time, but the notes I had
kept for myself generally seemed to work. However, I ran into some issues
where autodetect wasn't picking up some libraries that I had built and
installed, notably: libtheora, libmpg123, and libvpx. Everything else was
detected correctly. If I did a configure and then a make, I got working
builds of mplayer and mencoder, but without the three libraries I just
mentioned.

After looking through configure and seeing where the tests for those
libraries failed, I was able to get them to be detected by telling the
linker in the configure script to include a few more libraries: -lm
-lpthread -ltheora. Once I added those libraries, configure generated some
new files and I ran make. What's weird is that the build is failing, but on
something completely unrelated.

ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_init':
libx264.c:(.text+0xaee): undefined reference to `x264_encoder_open_115'
/usr/local/lib/libx264.a(encoder.o): In function `x264_validate_parameters':
encoder.c:(.text+0x25b9): undefined reference to `log2f'

There are a bunch of other errors, but they all come back to an undefined
reference to log2f. log2f is part of the math library, and adding -lm should
be all you need to get rid of the linker error. And, as detailed above, I
explicitly added -lm to get configure to autodetect correctly. It's also
weird that libx264 worked in the earlier build.

I'm on a pretty stock CentOS build. Does anyone have any ideas about how I
can do an mplayer/mencoder build that uses all of the libraries I've built?
One way to address this is to figure out how to eliminate the linker error.
I suppose another way might be to figure out why the configure script isn't
working out of the box. I'm pretty stumped though.

Thanks,
David


More information about the MPlayer-users mailing list