From owner-freebsd-ports@FreeBSD.ORG Wed Mar 5 08:43:27 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D44537B for ; Wed, 5 Mar 2014 08:43:27 +0000 (UTC) Received: from mail-pb0-x22f.google.com (mail-pb0-x22f.google.com [IPv6:2607:f8b0:400e:c01::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0F2E5B22 for ; Wed, 5 Mar 2014 08:43:27 +0000 (UTC) Received: by mail-pb0-f47.google.com with SMTP id up15so788794pbc.20 for ; Wed, 05 Mar 2014 00:43:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=eXnCLRT74Poni0K7fThgxk1GiH+o01GZKwj/4ugdpL8=; b=e9fPss4xGCSgMXqdecK1T31OKRvMqZ2sQw93xfhKy+03vxlZJmDuY6J3WOwNVtzjeH 5gTPlnTix4CPKJohK04xPX3Sf1Hjkrp3aKaPIjVOZTJdDwM8fXywMlOYvdAybc16YR8U GYKSg20ooBf6SlVZN1gVV+U9kIdGW9rifp1SJB6HsuIfhVY7R9Vt9D/MA4Hi3SZifbe7 KIqmnEsOu00YIAJEnbSxgFa6fYOjbXqbi82/c5rrBVQNzfEibKEj6jszFTwIPmj8pc7n 7YvtdAzCw0prDcvFL4lTTigZWGhIzGwIt7Yu9jhbo9ZXdFQCbGebd5VIO9l1UvKk/zAt POtg== X-Received: by 10.66.66.135 with SMTP id f7mr5508071pat.22.1394009006700; Wed, 05 Mar 2014 00:43:26 -0800 (PST) Received: from [192.168.1.7] (ppp59-167-128-11.static.internode.on.net. [59.167.128.11]) by mx.google.com with ESMTPSA id om6sm5499811pbc.43.2014.03.05.00.43.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Mar 2014 00:43:26 -0800 (PST) Message-ID: <5316E3A7.30406@FreeBSD.org> Date: Wed, 05 Mar 2014 19:43:19 +1100 From: Kubilay Kocak User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Thunderbird/27.0 MIME-Version: 1.0 To: Kevin Oberman , Jan Henrik Sylvester Subject: Re: Circular dependency, because x264 links ffmpeg References: <5316441D.8080607@janh.de> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: ports-list freebsd X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: koobs@FreeBSD.org List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2014 08:43:27 -0000 On 5/03/2014 2:02 PM, Kevin Oberman wrote: > On Tue, Mar 4, 2014 at 1:22 PM, Jan Henrik Sylvester wrote: > >> # pkg info -r ffmpeg >> ffmpeg-2.1.1_1,1: >> libxine-1.2.4_5 >> vlc-2.1.2_2,4 >> libstreamanalyzer-0.7.8_3 >> x264-0.136.2358_3 >> # pkg info -r x264 >> x264-0.136.2358_3: >> ffmpeg-2.1.1_1,1 >> ffmpeg0-0.7.16_1,1 >> opal-3.10.10_2 >> vlc-2.1.2_2,4 >> >> Not good. Since multimedia/ffmpeg depends on multimedia/x264 by default >> (the option X264 is enabled by default), my x264 installation must be >> broken. >> >> After forcibly deleting x264 and rebuilding the port, it still depends >> on ffmpeg: >> >> # pkg which /usr/local/bin/x264 >> /usr/local/bin/x264 was installed by package x264-0.136.2358_3 >> # readelf -d /usr/local/bin/x264 | grep libav >> 0x0000000000000001 (NEEDED) Shared library: [libavutil.so.52] >> # pkg which /usr/local/lib/libavutil.so.52 >> /usr/local/lib/libavutil.so.52 was installed by package ffmpeg-2.1.1_1,1 >> >> The x264 port is doing something wrong (in the presence of ffmpeg). >> >> This will probably only happening building ports in an unclean >> environment, but I would have expected pkg to detect this and warn while >> registering the pkg, while creating a package from it, or while this >> package is installed on another machine. I never saw a warning. >> > > I'm confused. When I look at the Makefile for x264, I can't see ny reason > that it would depend on ffmpeg. It has no direct dependency. As far as > indirect ones, I see libX11, gcc-4.6, gpac-libgpac-0.5.0,1. > > When configuring, I see: > ===> x264-0.136.2358_3 depends on package: yasm>=0.6.0 - found > ===> x264-0.136.2358_3 depends on file: /usr/local/bin/bash - found > ===> x264-0.136.2358_3 depends on executable: gmake - found > ===> x264-0.136.2358_3 depends on executable: gcc46 - found > ===> x264-0.136.2358_3 depends on file: /usr/local/bin/as - found > ===> x264-0.136.2358_3 depends on file: > /usr/local/libdata/pkgconfig/x11.pc - found > ===> x264-0.136.2358_3 depends on shared library: libgpac.so - found > > But I see that it links to libavformat, libavcodec, and libavutil, all part > of ffmpeg. > > Oddly, my 9.2 system has no dependency on ffmpeg: >> pkg_info -r x264-\* (y|n|e)?yes > Information for x264-0.136.2358_3: > > Depends on: > Dependency: openssl-1.0.1_9 > Dependency: png-1.5.18 > Dependency: jpeg-8_4 > Dependency: gpac-libgpac-0.5.0,1 > > Looking through the build log I can only see the final link of the x264 > does pull in all of those libs. Note that lib264 has no dependency on > ffmpeg. It is the x264 executable that uses it. > > I think the only fix would be to split the port into building the library > in one port (libx264) and the utility in another (x264). > Hi :) This is a known issue, please see the thread on freebsd-multimedia: http://lists.freebsd.org/pipermail/freebsd-multimedia/2014-March/014717.html Root cause is: a) automatic configure detection of libraries (which then links), AND b) pkg automatically detecting the linked libs and auto-adding pkg dependencies Will have something out shortly. Koobs