[MPlayer-dev-eng] Undefined symbol tgetent - fixed

Steven M. Schultz sms at 2BSD.COM
Sun Oct 28 19:32:00 CET 2001


Greetings -

	I have solved the problem of 'tgetent' coming up undefined by moving
	the termcap library to a position after '-losdep' (which is where
	the first reference is made).

Script started on Sun Oct 28 10:24:35 2001
gcc -rdynamic -O4 -march=i686 -mcpu=i686 -pipe -ffast-math -fomit-frame-pointer -D_THREAD_SAFE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -fomit-frame-pointer  -Ilibmpdemux -Iloader -Ilibvo -I/usr/include    -o mplayer mplayer.o -Llibmpdemux -lmpdemux ima4.o xacodec.o cpudetect.o mp_msg.o ac3-iec958.o find_sub.o dec_audio.o dec_video.o codec-cfg.o subreader.o lirc_mp.o cfgparser.o mixer.o spudec.o dll_init.o    -ltermcap -Lloader -lloader -Lloader/DirectShow -lDS_Filter -lstdc++  -Llibmpeg2 -lmpeg2 -Llibao2 -lao2 -Lmp3lib -lMP3 -Llibac3 -lac3     -Llibvo -lvo  -L/usr/X11R6/lib -L/usr/lib   -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -lm -L/usr/contrib/lib -lesd -laudiofile -lm -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lXxf86dga -lXv -ldl -lsem -lXxf86dga -lX11 -lXext -lXv -lXxf86vm  -lpng -lz    -lXinerama  -lz -ldvdread -Lencore -lencore  -rdynamic -pthread -ldvd -liconv -Llinux -losdep -Lpostproc -lpostproc -Lxa -lxa -Lopendivx -ldecore -lm
linux/libosdep.a(getch2.o): In function `load_termcap':
getch2.o(.text+0x28): undefined reference to `tgetent'
getch2.o(.text+0x69): undefined reference to `tgetnum'
getch2.o(.text+0x7b): undefined reference to `tgetnum'
getch2.o(.text+0xc3): undefined reference to `tgetstr'
getch2.o(.text+0x168): undefined reference to `tgetstr'
getch2.o(.text+0x20d): undefined reference to `tgetstr'
getch2.o(.text+0x2b2): undefined reference to `tgetstr'
getch2.o(.text+0x357): undefined reference to `tgetstr'
linux/libosdep.a(getch2.o)(.text+0x3fc): more undefined references to `tgetstr' follow
gmake: *** [mplayer] Error 1

Script done on Sun Oct 28 10:25:47 2001

Script started on Sun Oct 28 10:27:16 2001

sitka.1-> gmake
gcc -rdynamic -O4 -march=i686 -mcpu=i686 -pipe -ffast-math -fomit-frame-pointer -D_THREAD_SAFE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -fomit-frame-pointer  -Ilibmpdemux -Iloader -Ilibvo -I/usr/include    -o mplayer mplayer.o -Llibmpdemux -lmpdemux ima4.o xacodec.o cpudetect.o mp_msg.o ac3-iec958.o find_sub.o dec_audio.o dec_video.o codec-cfg.o subreader.o lirc_mp.o cfgparser.o mixer.o spudec.o dll_init.o   -Lloader -lloader -Lloader/DirectShow -lDS_Filter -lstdc++  -Llibmpeg2 -lmpeg2 -Llibao2 -lao2 -Lmp3lib -lMP3 -Llibac3 -lac3     -Llibvo -lvo  -L/usr/X11R6/lib -L/usr/lib   -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -lm -L/usr/contrib/lib -lesd -laudiofile -lm -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lXxf86dga -lXv -ldl -lsem -lXxf86dga -lX11 -lXext -lXv -lXxf86vm  -lpng -lz    -lXinerama  -lz -ldvdread -Lencore -lencore  -rdynamic -pthread -ldvd -liconv -Llinux -losdep -Lpostproc -lpostproc -Lxa -lxa -Lopendivx -ldecore -ltermcap -lm
sitka.2-> exit

Script done on Sun Oct 28 10:28:19 2001

	Simply moving "$(TERMCAP_LIB)" towards the end of the list is all
	it took to clear up the problem.

--- Makefile.dist	Fri Oct 26 17:34:39 2001
+++ Makefile	Sun Oct 28 10:27:12 2001
@@ -113,7 +113,7 @@
 	@for a in $(PARTS); do $(MAKE) -C $$a all ; done
 
 $(PRG):	$(MPLAYER_DEP)
-	$(CC) -rdynamic $(CFLAGS) -o $(PRG) mplayer.o -Llibmpdemux -lmpdemux $(OBJS) $(XMM_LIBS) $(LIRC_LIBS)  $(TERMCAP_LIB) $(LIB_LOADER) $(AV_LIB) -Llibmpeg2 -lmpeg2 -Llibao2 -lao2 $(A_LIBS) $(VO_LIBS) $(CSS_LIB) -Lencore -lencore $(GUI_LIBS) $(ARCH_LIBS) $(OSDEP_LIBS) $(PP_LIBS) $(XA_LIBS) $(DECORE_LIBS) -lm
+	$(CC) -rdynamic $(CFLAGS) -o $(PRG) mplayer.o -Llibmpdemux -lmpdemux $(OBJS) $(XMM_LIBS) $(LIRC_LIBS) $(LIB_LOADER) $(AV_LIB) -Llibmpeg2 -lmpeg2 -Llibao2 -lao2 $(A_LIBS) $(VO_LIBS) $(CSS_LIB) -Lencore -lencore $(GUI_LIBS) $(ARCH_LIBS) $(OSDEP_LIBS) $(PP_LIBS) $(XA_LIBS) $(DECORE_LIBS) $(TERMCAP_LIB) -lm
 
 $(PRG_FIBMAP): fibmap_mplayer.o
 	$(CC) -o $(PRG_FIBMAP) fibmap_mplayer.o



More information about the MPlayer-dev-eng mailing list