Subject: Re: pkg/28915: ffmpeg on Linux needs -ldl
To: None <reed@reedmedia.net>
From: Quentin Garnier <cube@cubidou.net>
List: pkgsrc-bugs
Date: 01/09/2005 06:51:18
--jcZk2Ix8j3PVOBnV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Jan 09, 2005 at 05:45:00AM +0000, reed@reedmedia.net wrote:
> >Number:         28915
> >Category:       pkg
> >Synopsis:       ffmpeg build fails because of missing -ldl
> >Confidential:   no
> >Severity:       serious
> >Priority:       medium
> >Responsible:    pkg-manager
> >State:          open
> >Class:          sw-bug
> >Submitter-Id:   net
> >Arrival-Date:   Sun Jan 09 05:45:00 +0000 2005
> >Originator:     reed@reedmedia.net
> >Release:        NetBSD 1.6.2_STABLE
> >Organization:
> http://bsd.reedmedia.net/
> >Environment:
> =09
> =09
> System: NetBSD rainier.reedmedia.net 1.6.2_STABLE NetBSD 1.6.2_STABLE (MY=
KERNEL) #1: Tue Jun 1 12:16:43 PDT 2004 reed@rainier.reedmedia.net:/usr/src=
/sys/arch/i386/compile/MYKERNEL i386
> Architecture: i386
> Machine: i386
> >Description:
> Under Linux, ffmpeg fails to build. I get errors like:
>=20
> gcc -Wl,--warn-common -rdynamic -Wl,-E -o .libs/ffserver ffserver.o  liba=
vformat/.libs/libavformat.so -L/scratch/pkgsrc/multimedia/ffmpeg/work.puget=
/.buildlink/lib libavcodec/.libs/libavcodec.so -lm /usr/lib/libz.so
> ffserver.o(.text+0x48c0): In function `load_module':
> /scratch/pkgsrc/multimedia/ffmpeg/work.puget/ffmpeg-0.4.8/ffserver.c:3820=
: undefined reference to `dlopen'
> ffserver.o(.text+0x48d7):/scratch/pkgsrc/multimedia/ffmpeg/work.puget/ffm=
peg-0.4.8/ffserver.c:3827: undefined reference to `dlsym'
> ffserver.o(.text+0x4904):/scratch/pkgsrc/multimedia/ffmpeg/work.puget/ffm=
peg-0.4.8/ffserver.c:3832: undefined reference to `dlclose'
> ffserver.o(.text+0x4911):/scratch/pkgsrc/multimedia/ffmpeg/work.puget/ffm=
peg-0.4.8/ffserver.c:3822: undefined reference to `dlerror'
>=20
> >How-To-Repeat:
> =09
> >Fix:
> Maybe utilize mk/dlopen.builtin.mk? (I am not sure yet how that is used.)
>=20
> Also, the configure script (not autoconf) for ffmpeg may need adjusting.
> Maybe FFSLDFLAGS=3D'-ldl -Wl,-E'.
> I defined LIBDL in my CONFIGURE_ENV and patched patch-aa to have that add=
ed to
> FFSLDFLAGS. (But this needs to be done correct for the operating system
> that really need this.)

Include mk/dlopen.buildlink3.mk and add the content of ${DL_LDFLAGS} to
FFSLDFLAGS.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"Commala-come-five! / Even when the shadows rise!
To see the world and walk the world / Makes ya glad to be alive."
Susannah's Song, The Dark Tower VI, Stephen King, 2004.

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

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

iQEVAwUBQeDGVtgoQloHrPnoAQKRTwf7BxRer+6XapGLM8jKskWl/AAzAYFA5h4b
2/vOmWm37iB0AYKE+4FN1vIUUVdGVlMPpblhVTVjae0i/4ZvAe+RRm/PR7rMrcqO
MnWuPOFWa9GJIpP82aydSwpsYi7zPNXrh8lBE7UC6sMeM/bE1eWwHAv/tT81eche
1pWHIXYheHKYwDHSpQtGYndsezRQvb8RtTdPzAAD/o0xWwjx+cyZw3bIrt6q1uPH
v/7uzOi4LuW5YaKnJZksXHywNnHVPzsr8anG7zeMVItT+954Q2qI+GV4L0VFdoLP
n+Ufkmx28SJduIno/tcZQDmeCCXy2B52+1XQuKXDxrf4viMFrK0z6A==
=5GHu
-----END PGP SIGNATURE-----

--jcZk2Ix8j3PVOBnV--