[MPlayer-users] compiling with locally installed library

Raimund Steger rs at mytum.de
Sat Mar 31 12:19:57 CEST 2012


Hi,

Robert Henney wrote:
> I have a very basic compiling question.  I have installed a local copy
> of the mpg123 library and I want to compile mplayer against that instead
> of the system one.  I tried the following before running ./configure
> but I'm guessing that method isn't supported as it appeared to be
> ignored.

./configure doesn't seem to use pkg-config for mpg123, so you could use 
--extra-cflags and --extra-ldflags, like:

./configure <your-other-args> \
   --extra-cflags="-I$HOME/local/include" \
   --extra-ldflags="-L$HOME/local/lib -Wl,-R$HOME/local/lib"

However: If that prefix ($HOME/local) contains other stuff in addition 
to mpg123, the mplayer build might start pulling in that other stuff as 
well in case it overshadows system-provided installations. In that case 
it might be wise to reserve a single prefix for mpg123.

After the build, you should check the output of 'ldd mplayer' in a clean 
environment, or 'elfdump -d mplayer'/'readelf -d mplayer' (depending on 
your system) to see if the runpath was compiled in correctly, i. e. that 
it references $HOME/lib before the locations of other mpg123 installations.

Raimund


More information about the MPlayer-users mailing list