[MPlayer-dev-eng] [PATCH] library search order conflict

Steven M. Schultz sms at 2BSD.COM
Thu Aug 29 05:13:59 CEST 2002


Hi!

	I've been fighting this problem for a long time and hopefully
	have followed all the instructions for submitting an acceptable
	patch.

	The problem is that while MPlayer comes with various libraries
	included (libmpeg2, libvo, etc) the linker will, on some systems,
	search /usr/local first and find the wrong (older) version.

	Libraries local to MPlayer should, I think, be linked using 
	the form "liba52/liba52.a" instead of "-Lliba52 -la52".  The
	-Lliba52 has no effect because -L/usr/local/lib has been done
	first.  That will force the use of the local (static) version
	instead of the global (possibly shared) version.

	Cheers,
	Steven Schultz
	sms at 2bsd.com
-------------- next part --------------
--- Makefile.dist	Wed Aug 28 19:58:22 2002
+++ Makefile	Wed Aug 28 20:00:09 2002
@@ -38,14 +38,14 @@
 OBJS_MENCODER = $(SRCS_MENCODER:.c=.o)
 OBJS_MPLAYER = $(SRCS_MPLAYER:.c=.o)
 
-VO_LIBS = -Llibvo -lvo
+VO_LIBS = libvo/libvo.a
 VO_INC = -Ilibvo
 V_LIBS = $(X_LIB) $(MP1E_LIB) $(GGI_LIB) $(MLIB_LIB) $(SDL_LIB) $(SVGA_LIB) $(AA_LIB) $(DIRECTFB_LIB)
 
-AO_LIBS = -Llibao2 -lao2
+AO_LIBS = libao2/libao2.a
 A_LIBS = $(ALSA_LIB) $(ARTS_LIB) $(NAS_LIB) $(MAD_LIB) $(VORBIS_LIB) $(FAAD_LIB) $(SGIAUDIO_LIB)
 
-CODEC_LIBS = -Llibmpcodecs -lmpcodecs -Lmp3lib -lMP3 -Lliba52 -la52 -Llibmpeg2 -lmpeg2 $(AV_LIB) $(FAME_LIB) $(XVID_LIB)
+CODEC_LIBS = -Llibmpcodecs -lmpcodecs -Lmp3lib -lMP3 liba52/liba52.a libmpeg2/libmpeg2.a $(AV_LIB) $(FAME_LIB) $(XVID_LIB)
 COMMON_LIBS = $(CODEC_LIBS) -Llibmpdemux -lmpdemux  -Linput -linput $(LIB_LOADER) $(A_LIBS) $(CSS_LIB) $(ARCH_LIB) -Lpostproc -lpostproc $(DECORE_LIB) -Llinux -losdep $(TERMCAP_LIB)  $(STREAMING_LIB) $(Z_LIB) $(GTK_LIBS) $(PNG_LIB) $(JPEG_LIB) $(GIF_LIB) $(CDPARANOIA_LIB) $(FREETYPE_LIB) -lm
 ifeq ($(VIDIX),yes)
 MISC_LIBS += -Llibdha -ldha -Lvidix -lvidix


More information about the MPlayer-dev-eng mailing list