Skip site navigation (1)Skip section navigation (2)
Date:      10 Jul 2002 10:54:22 -0400
From:      Joe Marcus Clarke <marcus@marcuscom.com>
To:        Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.ORG>
Cc:        freebsd-ports@FreeBSD.ORG
Subject:   Re: Help porting gstreamer (http://gstreamer.sourceforge.net/)
Message-ID:  <1026312862.351.28.camel@gyros.marcuscom.com>
In-Reply-To: <20020710060602.90212.qmail@exxodus.fedaykin.here>
References:  <20020710060602.90212.qmail@exxodus.fedaykin.here>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-wKhvJ5NJebuW4n+din5X
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Wed, 2002-07-10 at 02:05, Mario Sergio Fujikawa Ferreira wrote: 
> Hi,
> 
> 	I've did some work to get gstreamer working under FreeBSD
> but I am hitting a pthread linking problem that is killing me.
> 	I am betting this is libtool related but I am no libtool
> expert. I tried fixing the Makefile but no vail.
> 
> 	Environment: FreeBSD exxodus.fedaykin.here 4.6-STABLE FreeBSD 4.6-STABLE #0: Mon Jun 24 13:46:43 BRT 2002     root@exxodus.fedaykin.here:/usr/obj/usr/src/sys/LIOUX  i386
> 
> 	1) Install updated popt, use patch available at
> 
> http://people.FreeBSD.org/~lioux/patch-popt
> 
> 	2) Then, try gstreamer port at
> 
> http://people.FreeBSD.org/~lioux/gstreamer.tgz
> 
> 	It breaks with
> 
> [snip]
> /bin/sh ../../libtool --mode=link cc  -O -pipe -pipe -fno-strength-reduce -march=pentiumpro   -L/usr/local/lib -o autoplugtest  autoplugtest-autoplugtest.o -L/usr/local/lib -lxml2 -lz -lm          -pthread     -Wl,--export-dynamic  -L/usr/local/lib -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv   -lpopt ../../gst/libgstreamer.la 
> cc -O -pipe -pipe -fno-strength-reduce -march=pentiumpro -o .libs/autoplugtest autoplugtest-autoplugtest.o -pthread -Wl,--export-dynamic  -L/usr/local/lib ../../gst/.libs/libgstreamer.so -lxml2 -lz -lm -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv /usr/local/lib/libpopt.so -Wl,--rpath -Wl,/usr/local/lib
> /usr/lib/libc.so.4: WARNING!  setkey(3) not present in the system!
> /usr/lib/libc.so.4: warning: this program uses gets(), which is unsafe.
> /usr/lib/libc.so.4: warning: mktemp() possibly used unsafely; consider using mkstemp()
> /usr/lib/libc.so.4: WARNING!  des_setkey(3) not present in the system!
> /usr/lib/libc.so.4: WARNING!  encrypt(3) not present in the system!
> /usr/lib/libc.so.4: warning: tmpnam() possibly used unsafely; consider using mkstemp()
> /usr/lib/libc.so.4: warning: this program uses f_prealloc(), which is not recommended.
> /usr/lib/libc.so.4: WARNING!  des_cipher(3) not present in the system!
> /usr/lib/libc.so.4: warning: tempnam() possibly used unsafely; consider using mkstemp()
> ../../gst/.libs/libgstreamer.so: undefined reference to `pthread_attr_setstack'
> *** Error code 1

This is fixed with my popt patches. 

> 
> 	I tracked it down to work/gstreamer-0.4.0/gst/autoplug
> directory. However, I cannot understand why it is complaining that
> it cannot find pthread_attr_setstack if cc is being invoked with
> '-pthread' (this is a -STABLE system).
> 	Someone mentioned that "it cannot link -lc and -lc_r at the
> same time" but I cannot imagine how that would be happening if
> '-pthread' is defined.
> 	Anyone? Ideas?

Yes, pthread_attr_setstack is not a valid symbol on FreeBSD.  You need
setstacksize.  The attached patch should work.

Joe

> 
> 	Regards,
> 
> -- 
> Mario S F Ferreira - DF - Brazil - "I guess this is a signature."
> Computer Science Undergraduate | FreeBSD Committer | CS Developer
> flames to beloved devnull@someotherworldbeloworabove.org
> feature, n: a documented bug | bug, n: an undocumented feature
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-ports" in the body of the message
> 
-- 
PGP Key : http://www.marcuscom.com/pgp.asc

--=-wKhvJ5NJebuW4n+din5X
Content-Disposition: attachment; filename=patch-gst_gstthread.c
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-c; name=patch-gst_gstthread.c; charset=ISO8859-1

--- gstthread.c.orig	Wed Jul 10 10:49:58 2002
+++ gstthread.c	Wed Jul 10 10:50:15 2002
@@ -276,7 +276,7 @@
       if (pthread_attr_init (&thread->attr) !=3D 0)
 	g_warning ("pthread_attr_init returned an error !");
       if (gst_scheduler_get_preferred_stack (GST_ELEMENT_SCHED (element), =
&thread->stack, &stacksize)) {
-        if (pthread_attr_setstack (&thread->attr, thread->stack, stacksize=
) !=3D 0) {
+        if (pthread_attr_setstacksize (&thread->attr, stacksize) !=3D 0) {
           g_warning ("pthread_attr_setstack failed");
           return GST_STATE_FAILURE;
         }

--=-wKhvJ5NJebuW4n+din5X--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1026312862.351.28.camel>