Portál AbcLinuxu, 26. dubna 2024 15:42
libmpdemux/libmpdemux.a(tvi_v4l2.o)(.text+0xb76): In function `uninit': : undefined reference to `pthread_join' libmpdemux/libmpdemux.a(tvi_v4l2.o)(.text+0xdc8): In function `uninit': : undefined reference to `pthread_join' libmpdemux/libmpdemux.a(tvi_v4l2.o)(.text+0x2678): In function `grab_audio_frame': : undefined reference to `pthread_create' libmpdemux/libmpdemux.a(tvi_v4l2.o)(.text+0x2772): In function `grab_video_frame': : undefined reference to `pthread_create' libmpdemux/libmpdemux.a(tvi_v4l2.o)(.text+0x31f8): In function `video_grabber': : undefined reference to `pthread_create' collect2: ld returned 1 exit status make: *** [mencoder] Error 1neviete niekdo prosim co s tym???? rad by som sa s tym MPlayerom uz konecne zoznamil ked ho tak vsetci spominaju....a rpm balik MPlayeru som skusal ale tam mi chyba velmi vela balickov co vyzaduje aa... radsej by som vlastnu skompilovanu verziu....dix
yum install mplayer
, a žádný problém s ním nemám (akorát není tak děsně vytuněný).
Potřebuješ linkovat s knihovnou pthread, přidej do LDFLAGS -lpthread.
============ Checking for pthread ============ #include <pthread.h> void* func(void *arg) { return arg; } int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; } cc /tmp/mplayer-conf-20102-6139.c -o /tmp/mplayer-conf-5542-6139.o /tmp/ccIl7YVR.o(.text+0x26): In function `main': : undefined reference to `pthread_create' collect2: ld returned 1 exit status ldd /tmp/mplayer-conf-5542-6139.o ldd: /tmp/mplayer-conf-5542-6139.o: No such file or directory #include <pthread.h> void* func(void *arg) { return arg; } int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; } cc /tmp/mplayer-conf-20102-6139.c -o /tmp/mplayer-conf-5542-6139.o -lpthread ldd /tmp/mplayer-conf-5542-6139.o linux-gate.so.1 => (0x00611000) libpthread.so.0 => /lib/tls/libpthread.so.0 (0x006b6000) libc.so.6 => /lib/tls/libc.so.6 (0x00481000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00468000) #include <pthread.h> void* func(void *arg) { return arg; } int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; } cc /tmp/mplayer-conf-20102-6139.c -o /tmp/mplayer-conf-5542-6139.o -pthread ldd /tmp/mplayer-conf-5542-6139.o linux-gate.so.1 => (0x00804000) libpthread.so.0 => /lib/tls/libpthread.so.0 (0x006b6000) libc.so.6 => /lib/tls/libc.so.6 (0x00481000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00468000) Result is: no (v4l, vo_gl, ao_alsa, ao_nas, ao_macosx, win32 loader disabled)
#include <pthread.h> void* func(void *arg) { return arg; } int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; } /home/yeti/bin/gcc /home/yeti/tmp/mplayer-conf-30137-30409.c -o /home/yeti/tmp/mplayer-conf-12915-30409.o -lpthread ldd /home/yeti/tmp/mplayer-conf-12915-30409.o libpthread.so.0 => /lib/tls/libpthread.so.0 (0x008fe000) libc.so.6 => /lib/tls/libc.so.6 (0x006dc000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x001dc000) Result is: yes (using -lpthread)
Checking for pthread ... /tmp/mplayer-conf-28848-3177.o: relocation error: /tmp/mplayer-conf-28848-3177.o: symbol __pthread_initialize, version GLIBC_PRIVATE not defined in file libpthread.so.0 with link time reference /tmp/mplayer-conf-28848-3177.o: relocation error: /tmp/mplayer-conf-28848-3177.o: symbol __pthread_initialize, version GLIBC_PRIVATE not defined in file libpthread.so.0 with link time reference no (v4l, vo_gl, ao_alsa, ao_nas, ao_macosx, win32 loader disabled) no
#!/bin/bash export LANG=C export LC_ALL=C make clean ./configure --enable-gui make make install
Tiskni Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.