[MPlayer-users] How to Compile mplayer for different Linux Distribution
Oleynik Phil
Oleynik.Phil at mail.ioffe.ru
Sat Jun 25 11:51:03 CEST 2005
ZHANG, W. wrote:
>Hi,
>
>I would like to install mplayer on a file server so that it can be shared by
>machines with same architecture (x86, x86_64) but different Linux distributions
>such as redhat, SuSE, Debian. For some purpose, I also need speciafied gcc
>version to compile mplayer source code.
>
>For this requirement, I think I would better to enable static library when
>compile. But I can't get X11 related video output enabled when I run configure
>script.
>
>I can make it work if I run default configure use dynamic . But I don't wish
>to see missing library when I run mplayer on other Linux distro such as SuSE.
>
>The options I used for configuration is:
>
>./configure --prefix=<DESTDIR>/MPlayer/x86 --cc=<DK>/gcc/3.3.3/bin/gcc
>--host-cc=<DK>/gcc/3.3.3/bin/gcc --enable-runtime-cpudetection
>--target=i386-linux --enable-static
>
>The errors cause X11 disabled such as:
>
>============ Checking for X11 ============
>
>#include <X11/Xlib.h>
>#include <X11/Xutil.h>
>int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
>
>/app/perforce/lnx-dk-cnlizhang/gcc/3.3.3/bin/gcc -static
>/tmp/mplayer-conf-18740-4865.c -o /tmp/mplayer-conf-9575-4865.o
>-I/usr/X11R6/include -L/usr/X11R6/lib -lXext -lX11 -lnsl
>/usr/X11R6/lib/libX11.a(x11trans.o)(.text+0x741): In function
>`_X11TransSocketINETConnect':
>: undefined reference to `__ctype_b_loc'
>/usr/X11R6/lib/libX11.a(x11trans.o)(.text+0x10ef): In function
>`_X11TransSelectTransport':
>: undefined reference to `__ctype_b_loc'
>/usr/X11R6/lib/libX11.a(x11trans.o)(.text+0x1102): In function
>`_X11TransSelectTransport':
>: undefined reference to `__ctype_tolower_loc'
>/usr/X11R6/lib/libX11.a(x11trans.o)(.text+0x1e0d): In function `is_numeric':
>: undefined reference to `__ctype_b_loc'
>/usr/X11R6/lib/libX11.a(omGeneric.o)(.text+0xa13): In function
>`get_rotate_fontname':
>: undefined reference to `__ctype_b_loc'
>/usr/X11R6/lib/libX11.a(omGeneric.o)(.text+0xbaa): In function
>`get_rotate_fontname':
>
>---------------
>
>: undefined reference to `__ctype_tolower_loc'
>/usr/X11R6/lib/libX11.a(x11trans.o)(.text+0x1f9d): In function `is_numeric':
>: undefined reference to `__ctype_b_loc'
>/usr/X11R6/lib/libX11.a(omGeneric.o)(.text+0xa59): In function
>`get_rotate_fontname':
>: undefined reference to `__ctype_b_loc'
>/usr/X11R6/lib/libX11.a(omGeneric.o)(.text+0xbec): In function
>`get_rotate_fontname':
>: undefined reference to `__ctype_b_loc'
>/usr/X11R6/lib/libX11.a(FSWrap.o)(.text+0x31): In function
>`_XParseBaseFontNameList':
>: undefined reference to `__ctype_b_loc'
>/usr/X11R6/lib/libX11.a(FSWrap.o)(.text+0xbf): In function
>`_XParseBaseFontNameList':
>: undefined reference to `__ctype_b_loc'
>/usr/X11R6/lib/libX11.a(FSWrap.o)(.text+0x11d): more undefined references to
>`__ctype_b_loc' follow
>/usr/X11R6/lib/libX11.a(ximtrans.o)(.text+0x11c4): In function
>`_XimXTransSelectTransport':
>: undefined reference to `__ctype_tolower_loc'
>/usr/X11R6/lib/libX11.a(ximtrans.o)(.text+0x1d8d): In function `is_numeric':
>: undefined reference to `__ctype_b_loc'
>/usr/X11R6/lib/libX11.a(XKBBind.o)(.text+0x1255): In function
>`XkbTranslateKeySym':
>: undefined reference to `__ctype_toupper_loc'
>/usr/X11R6/lib/libX11.a(ConnDis.o)(.text+0x1a2): In function
>`_X11TransConnectDisplay':
>: undefined reference to `__ctype_b_loc'
>/usr/X11R6/lib/libX11.a(ConnDis.o)(.text+0x2cc): In function
>`_X11TransConnectDisplay':
>: undefined reference to `__ctype_b_loc'
>collect2: ld returned 1 exit status
>
>
>ldd /tmp/mplayer-conf-18974-6088.o
>ldd: /tmp/mplayer-conf-18974-6088.o: No such file or directory
>
>
>Result is: no
>
>===============================
>I guess it may be due to miss path to required library. But I don't know what
>lib it looks for and how to specify the location of each of library.
>
>I am not a software programer. Could anyone give me some instructions on how
>to meet my installation requirement? Thank you!
>
>
>
>
>
There is possibility, that you have static X libs from another
distribution or version.
This string:
/usr/X11R6/lib/libX11.a(ConnDis.o)(.text+0x2cc): In function
says that libX11.a was found, however, no necessary symbols was foind
inside.
In any case, I would recommend gcc 3.4.3 or newer in 3.4 branch to build
static
applications. 3.3 have proved its unability to do it properly when X11
is needed.
This is my own expirience. May be it was just a DNA error, not gcc.
Philipp
More information about the MPlayer-users
mailing list