Subject: libdv fails to build (pthread problem)
To: None <tech-pkg@NetBSD.org>
From: Leonard Schmidt <lems@gmx.net>
List: tech-pkg
Date: 11/28/2004 12:51:56
--vkogqOf2sHV7VnPd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello,

I wanted to install MPlayer on a freshly installed NetBSD-2.0_RC5=20
system, but it fails when compiling libdv with the following
error:

[...]
/bin/sh ../libtool --silent --mode=3Dcompile gcc   -O2 -Os -pipe -march=3Da=
thlon-xp -I/usr/pkg/include -I/usr/include -c -o transpose_x86.lo transpose=
_x86.S
/bin/sh ../libtool --silent --mode=3Dlink gcc  -O2 -Os -pipe -march=3Dathlo=
n-xp -I/usr/pkg/include -I/usr/include -Wall -g -L/usr/pkg/lib -L/usr/lib -=
Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib -o l=
ibdv.la -rpath /usr/pkg/lib -version-info 4:1:0 dv.lodct.lo idct_248.lo wei=
ghting.lo quant.lo  vlc.lo place.lo parse.lo bitstream.lo YUY2.lo YV12.lo r=
gb.lo  audio.lo util.lo encode.lo headers.lo enc_input.lo  enc_audio_input.=
lo enc_output.lo vlc_x86.lo quant_x86.lo  idct_block_mmx.lo dct_block_mmx.l=
o rgbtoyuv.lo  encode_x86.lo transpose_x86.lo  -lm -lossaudio -lintl=20
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -I/usr/pkg/include -I/usr/include  -=
O2 -Os -pipe -march=3Dathlon-xp -I/usr/pkg/include -I/usr/include -Wall -g =
-MT dovlc.o -MD -MP -MF ".deps/dovlc.Tpo" -c -o dovlc.o dovlc.c;  then mv -=
f ".deps/dovlc.Tpo" ".deps/dovlc.Po"; else rm -f ".deps/dovlc.Tpo"; exit 1;=
 fi=20
/bin/sh ../libtool --silent --mode=3Dlink gcc  -O2 -Os -pipe -march=3Dathlo=
n-xp -I/usr/pkg/include -I/usr/include -Wall -g -L/usr/pkg/lib -L/usr/lib -=
Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib -o d=
ovlc  dovlc.o libdv.la -lm -lossaudio -lintl
=2E/.libs/libdv.so: undefined reference to `pthread_mutex_unlock'
=2E/.libs/libdv.so: undefined reference to `pthread_mutex_lock'
*** Error code 1

So I edited the Makefile, appended -lpthread to LIBS+=3D and it
now builds fine.

Well, it may not be a real fix, but perhaps somebody knows how=20
to cleanly fix this.

Regards
Leonard

--vkogqOf2sHV7VnPd
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iD8DBQFBqcnreffumNo0U88RAnI8AJ4zwOuGnugMEyw/5Yi+u0Fj2rIIsgCgoTN5
JfT7mu33Un8PLTqUpZZeu2A=
=sLqY
-----END PGP SIGNATURE-----

--vkogqOf2sHV7VnPd--