Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 33330 - mplayer-1.0_pre2 fails to configure
Summary: mplayer-1.0_pre2 fails to configure
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-12 13:44 UTC by Nick Fish
Modified: 2003-12-29 02:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Fish 2003-11-12 13:44:29 UTC
mplayer emerge fails at configure script:

<snip>
Checking for dynamic a/v plugins support ... no
Checking for pthread ... 
Error: Lib pthread not found (needed by Windows and networking stuff).

Check "configure.log" if you do not understand why it failed.

!!! ERROR: media-video/mplayer-1.0_pre2 failed.
!!! Function src_compile, Line 295, Exitcode 1
!!! (no error message)

------ configure.log --------
<snip>
============ 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; }

gcc -yet_exec     /var/tmp/portage/mplayer-1.0_pre2/temp/mplayer-conf-32138-13038.c -o /var/tmp/portage/mplayer-1.0_pre2/temp/mplayer-conf-20535-13038.o 
/var/tmp/portage/mplayer-1.0_pre2/temp/cccUTAvc.o(.text+0x3f): In function `main':
: undefined reference to `pthread_create'
collect2: ld returned 1 exit status

ldd /var/tmp/portage/mplayer-1.0_pre2/temp/mplayer-conf-20535-13038.o
ldd: /var/tmp/portage/mplayer-1.0_pre2/temp/mplayer-conf-20535-13038.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; }

gcc -yet_exec     /var/tmp/portage/mplayer-1.0_pre2/temp/mplayer-conf-32138-13038.c -o /var/tmp/portage/mplayer-1.0_pre2/temp/mplayer-conf-20535-13038.o -lpthread

ldd /var/tmp/portage/mplayer-1.0_pre2/temp/mplayer-conf-20535-13038.o
        /lib/libsandbox.so => /lib/libsandbox.so (0x2d3fd000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x2d414000)
        libc.so.6 => /lib/libc.so.6 (0x2d465000)
        libdl.so.2 => /lib/libdl.so.2 (0x2d596000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2d3e6000)


#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; }

gcc -yet_exec     /var/tmp/portage/mplayer-1.0_pre2/temp/mplayer-conf-32138-13038.c -o /var/tmp/portage/mplayer-1.0_pre2/temp/mplayer-conf-20535-13038.o -pthread

ldd /var/tmp/portage/mplayer-1.0_pre2/temp/mplayer-conf-20535-13038.o
        /lib/libsandbox.so => /lib/libsandbox.so (0x233f4000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x2340b000)
        libc.so.6 => /lib/libc.so.6 (0x2345c000)
        libdl.so.2 => /lib/libdl.so.2 (0x2358d000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x233dd000)
-----end configure.log------

Here's my emerge-info:

Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r8, 2.4.20-gentoo-r7)
=================================================================
System uname: 2.4.20-gentoo-r7 i686 Intel(R) Pentium(R) 4 CPU 3.06GHz
Gentoo Base System version 1.4.3.12
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -O3 -pipe -fforce-addr -foptimize-sibling-calls -fno-inline -finline-limit=1000"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/config /var/qmail/control /var/qmail/alias"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium4 -O3 -pipe -fforce-addr -foptimize-sibling-calls -fno-inline -finline-limit=1000 -fno-default-inline"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache autoaddcvs sandbox buildpkg fixpackages userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 apm avi crypt cups encode foomaticdb gif gpm jpeg gnome libg++ mad mikmod mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib directfb gtkhtml alsa gdbm slang readline arts tetex bonobo svga tcltk guile ruby mysql X sdl pam libwww ssl perl python esd imlib oggvorbis gtk qt motif opengl mozilla cdr 3dfx acl apache2 dga doc dvd ethereal fbcon flash gd gmttria gphoto2 gps gstreamer imap innodb jikes maildir matrox memlimit moznocompose moznoirc moznomail odbc offensive ofx samba skey sse tiff usb v4l videos wmf xchattext xinerama xml -oss -kde -berkdb -tcpd"

--end emerge info---

It's probably also worth mentioning that I use hardened-gcc-2.4.6 and PAX, though I don't think this is the cause of the problem.  Anyways, simply removing the attempted execution of the binary mplayer's configure script is using to test pthreads fixes the issue.  I found this solution from some FreeBSDer's post to the mplayer-dev list or something -- see inline patch.  The problem with my patch is that I'm not really sure whether the functions that deal with pthread may be broken, though the rest of mplayer is working correctly?  Here's the patch:

--- configure.old       2003-11-12 16:47:12.000000000 -0500
+++ configure   2003-11-12 16:47:33.000000000 -0500
@@ -2217,7 +2217,7 @@
   _ld_pthread=''
 elif ( cc_check && $TMPO ) ; then              # QNX
   _ld_pthread=''
-elif ( cc_check -lpthread && $TMPO ) ; then
+elif ( cc_check -lpthread ) ; then
   _ld_pthread='-lpthread'
 elif ( cc_check -pthread && $TMPO ) ; then
   _ld_pthread='-pthread'
Comment 1 Heinrich Wendel (RETIRED) gentoo-dev 2003-12-13 07:29:50 UTC
please try pre3
Comment 2 Martin Holzer (RETIRED) gentoo-dev 2003-12-29 02:48:05 UTC
seems to be fixed with pre3