Subject: Re: pthreads instead of pthread
To: None <tech-pkg@netbsd.org>
From: Sverre Froyen <sverre@viewmark.com>
List: tech-pkg
Date: 03/31/2004 13:17:14
I am seeing a similar problem for audio/arts (NetBSD 2.0A (GENERIC.MP) 
i386 current as of yesterday):

Build exits with:

/bin/sh ../libtool --silent --mode=link --tag=CXX g++  
-Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith 
-Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -O2 -DGLX_GLXEXT_LEGACY 
-I/usr/pkg/include -I/usr/X11R6/include -fno-exceptions -fno-check-new 
-fno-common  -ftemplate-depth-99 -O0   -Wl,-E -Wl,-R/usr/lib 
-L/usr/pkg/qt3/lib -Wl,-R/usr/pkg/qt3/lib -L/usr/pkg/lib 
-Wl,-R/usr/pkg/lib -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib -o mcopidl 
-L/usr/X11R6/lib -L/usr/pkg/qt3/lib -L/usr/pkg/lib  -Wl,-E 
-Wl,-R/usr/lib  -L/usr/pkg/qt3/lib -Wl,-R/usr/pkg/qt3/lib 
-L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib 
mcopidl.o yacc.o scanner.o namespace.o ../mcop/libmcop.la -lintl
ld: cannot find -lpthreads
gmake[2]: *** [mcopidl] Error 1
gmake[2]: Leaving directory 
`/usr/pkgsrc/audio/arts/work.i386/arts-1.2.1/mcopidl'

lptreads is referenced in :

cd /usr/pkgsrc/audio/arts/work.i386/.buildlink
find . -type f -print | xargs grep pthreads

./lib/libgthread-2.0.la:dependency_libs='-L/usr/pkg/lib -lglib-2.0 -lm 
-lpthread -lpthreads -lintl'
./bin/.cache-add-trans:-lpthreads)
./bin/.cache-add-trans: cachearg="-lpthreads"
./bin/.cache-trans:-lpthreads)
./bin/.cache-trans:     cachearg="-lpthreads"

uname -a

Sverre

On Tuesday 30 March 2004 16:41, Jukka Salmi wrote:
> Jukka Salmi --> tech-pkg (2004-03-30 23:18:09 +0200):
> > using current pkgsrc on a i386 NetBSD 2.0A system, I can't build
> > x11/gtk2 at the moment (see pkg/24972). I'm getting errors like
> >
> > 	gcc: unrecognized option `-pthreads'
>
> I just noticed the same error message is output when building
> devel/glib2; however, building doesn't fail.
>
> If I comment out line 145 in pkgsrc/mk/pthread.buildlink3.mk
> (BUILDLINK_PACKAGES+= pthread) the problem is gone, i.e. gcc
> is never called with the -pthreads option. That line was added
> 12 days ago...
>
>
> Any hints?
>
> Jukka