[MPlayer-users] compilation error
Milton Huang
milton at emotrics.com
Mon Feb 11 08:29:02 CET 2002
As I was trying to install mplayer, I ran into the following minor
bug. In compiling on my Debian 2.2.18 system using gtk this error
occured:
gcc -O4 -march=i686 -mcpu=i686 -pipe -ffast-math -fomit-frame-pointer
-D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE64_SOURCE -Ilibmpdemux -Iloader -Ilibvo
-I/usr/lib/glib/include -I/usr/X11R6/include -o mencoder mencoder.o
adpcm.o xacodec.o cpudetect.o mp_msg.o ac3-iec958.o dec_audio.o
dec_video.o msvidc.o cinepak.o fli.o qtrle.o codec-cfg.o cfgparser.o
my_profile.o RTjpegN.o minilzo.o nuppelvideo.o libao2/afmt.o divx4_vbr.o
libvo/aclib.o libvo/img_format.o -Lg72x -lg72x -Lmp3lib -lMP3 -Lliba52
-la52 -Lxa -lxa -Llibmpeg2 -lmpeg2 -Llibavcodec -lavcodec -Llibmpdemux
-lmpdemux -LGui -lgui -Llinux -losdep -Lpostproc -lpostproc
-ldvdread -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule
-lglib -ldl -lXi -lXext -lX11 -lm -L/usr/lib -lglib -lpng -lz -lz
-lpthread -ldl -Lopendivx -ldecore -lnsl -lm
Gui/libgui.a(ws.o): In function `wsScreenSaverOn':
ws.o(.text+0x1a33): undefined reference to `DPMSQueryExtension'
ws.o(.text+0x1a43): undefined reference to `DPMSEnable'
ws.o(.text+0x1a6f): undefined reference to `DPMSInfo'
Gui/libgui.a(ws.o): In function `wsScreenSaverOff':
ws.o(.text+0x247b): undefined reference to `DPMSQueryExtension'
ws.o(.text+0x2495): undefined reference to `DPMSInfo'
ws.o(.text+0x24c5): undefined reference to `DPMSDisable'
collect2: ld returned 1 exit status
make: *** [mencoder] Error 1
----------------------------------------------------------
Looking at the configure.log file, I found:
============ Checking for DPMS ============
#include <X11/Xmd.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/extensions/dpms.h>
int main(void) {
(void) DPMSQueryExtension(0, 0, 0);
}
gcc /tmp/mplayer-conf-948140734-2694.c -o
/tmp/mplayer-conf-1337261554-2694.o
-L/usr/X11R6/lib -lX11 -lXext -lnsl -lXdpms
ldd /tmp/mplayer-conf-1337261554-2694.o
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40018000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x400ba000)
libnsl.so.1 => /lib/libnsl.so.1 (0x400c6000)
libc.so.6 => /lib/libc.so.6 (0x400dc000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
#include <X11/Xlib.h>
#include <X11/extensions/dpms.h>
int main(void) {
(void) DPMSQueryExtension(0, 0, 0);
}
gcc /tmp/mplayer-conf-948140734-2694.c -o
/tmp/mplayer-conf-1337261554-2694.o
-L/usr/X11R6/lib -lX11 -lXext -lnsl
/tmp/ccxC5gH1.o: In function `main':
/tmp/ccxC5gH1.o(.text+0x10): undefined reference to `DPMSQueryExtension'
collect2: ld returned 1 exit status
ldd /tmp/mplayer-conf-1337261554-2694.o
ldd: can't open /tmp/mplayer-conf-1337261554-2694.o (No such file or
directory)
Result is: yes (using Xdpms 3)
-----------------------
>From this, I gathered I should add the -lXdpms flag and it subsequently
compiled ok. Let me know if you need other info to address this. I
used the download tarball 0.60 because I haven't got CVS to work yet
(I'm a newbie), so it might be fixed already.
-mph
More information about the MPlayer-users
mailing list