From owner-freebsd-ports@FreeBSD.ORG Wed Mar 5 03:02:28 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D07BE155 for ; Wed, 5 Mar 2014 03:02:28 +0000 (UTC) Received: from mail-pb0-x22b.google.com (mail-pb0-x22b.google.com [IPv6:2607:f8b0:400e:c01::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A28BB28A for ; Wed, 5 Mar 2014 03:02:28 +0000 (UTC) Received: by mail-pb0-f43.google.com with SMTP id um1so441130pbc.16 for ; Tue, 04 Mar 2014 19:02:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=XDdLOZjwE+ucDVFGGoxCgqNH8vt8PbKMPU6+1iB+iRI=; b=CJO6k1+rCKVeWSA/1wPw2VBWmtv6YtDnTzw2unCemm/DUXjQzRhKIa1EXvWjt+bGEF VrGEgjYWkV5a17jDtn3nY1vZDsYvqVNlE4feT3WkEGMNDryLnn2ZLaJpQV0WJgAI8ILI XYSQ/3D90Z0tqFswjRkQZzQ8kZ34YQ2yoAptx+lCDcWit+HVoQw8pPcV8HiLe3pNGPSj ioFdQ3aUhdcqN5MZLuclNntHd5BWeXCpo7W2wtno7X99jT8j02lPLWXjjaistTFc+zCd B4saf9QXPK5O311EoFQcd1jdgpJIZrIjsY2j0xmks7Npkc5laskQIu6YkLsSCz1Q5oo1 zyNg== MIME-Version: 1.0 X-Received: by 10.68.233.200 with SMTP id ty8mr3662161pbc.1.1393988548199; Tue, 04 Mar 2014 19:02:28 -0800 (PST) Sender: kob6558@gmail.com Received: by 10.66.0.164 with HTTP; Tue, 4 Mar 2014 19:02:28 -0800 (PST) In-Reply-To: <5316441D.8080607@janh.de> References: <5316441D.8080607@janh.de> Date: Tue, 4 Mar 2014 19:02:28 -0800 X-Google-Sender-Auth: o9gGaoZXU1ZW_F7vhOveHu7Acwc Message-ID: Subject: Re: Circular dependency, because x264 links ffmpeg From: Kevin Oberman To: Jan Henrik Sylvester Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: ports-list freebsd X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2014 03:02:28 -0000 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). -- R. Kevin Oberman, Network Engineer, Retired E-mail: rkoberman@gmail.com