From patchwork Tue Nov 14 13:50:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timo Rothenpieler X-Patchwork-Id: 6043 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.94 with SMTP id m30csp3349968jah; Tue, 14 Nov 2017 05:50:35 -0800 (PST) X-Google-Smtp-Source: AGs4zMYPijkjTH2em1wxTdDEi/xf46J7iZE4HU8ltAlvrIcv6WGn9VeQPxOgaIqMJ46jyR35rRfp X-Received: by 10.28.210.129 with SMTP id j123mr9493761wmg.52.1510667435181; Tue, 14 Nov 2017 05:50:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510667435; cv=none; d=google.com; s=arc-20160816; b=cXjMYBRYc8bV/Rd7gw15H/tSgbk5mAmw4KHj6wooP1UBXSPUnGcrAHuE5+0orKBGwo FgBcXbvh3ao4EU6fzni/amxMORj9YGH0NbiY79ZTb/COf7jELxj0zd3rgRRn8BLnWjPZ vCmz88ofxJ1F0v6tC2Qnmc/Z/EBUfI9pFLV6SkjzsB1uClDzY7PgIMemfNFfkCxm71fZ pykOTH7JH8F4Pq3OvjGdimLV1byvlWmGRyBIJGQDvs4QPIhQyZsbd/RzysTlTOaFakGB 2f/ZcBM6dGI4cXO3pn0LW2VlmNNSWu3vgiwxV5XxCMINTil0mPWpnbflzra5q2eqYIoK 5DoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=ETkCnUdOj9AmpOw7a/r2CTqm4dNoBgdm1w+huWgHY6o=; b=WG4Z3UyTiH2siWOXjg4bfVNLO8gHf2il7HwlXOnMorZXm3SKmz/CWsfuevEAI4uWOF n9nYK9eXmQOsaROmazA4sh3WMpQlExSre3/3o4aJ52uF2ku9rwNUrDRif9AxVqo06WqC twXrwCmrpzfh/TMm0dIWbOCy6Zyh+d46Scav3S12D6noLOd4ewddVBMS+Bu9kLAK64Gh 96zXWueWilB+YJ5OOaScUo+opcwvmZ3U043/bnHYrztWK314bUNz+NmPeaZtVZkOmv9D ejVTwh5qwmIgoePY65U4wM54nCHzQyrMlsHXm0xvh83d3Gxm3SWdXp+rSsTul2rRRyiE GOkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@rothenpieler.org header.s=mail header.b=AMaKAEFq; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id l62si7588453wmb.209.2017.11.14.05.50.29; Tue, 14 Nov 2017 05:50:35 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@rothenpieler.org header.s=mail header.b=AMaKAEFq; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9B13C680AD3; Tue, 14 Nov 2017 15:50:13 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from btbn.de (btbn.de [5.9.118.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 103626806B9 for ; Tue, 14 Nov 2017 15:50:07 +0200 (EET) Received: from localhost.localdomain (unknown [IPv6:2a02:8109:43f:959c:ba97:5aff:fe10:ec69]) by btbn.de (Postfix) with ESMTPSA id 90F4431925E; Tue, 14 Nov 2017 14:50:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rothenpieler.org; s=mail; t=1510667421; bh=0JVvaE2MGpsVmZRLIvMxCP5QFykRO6kWd81A19fA9Ms=; h=From:To:Cc:Subject:Date; b=AMaKAEFq9ZCMoRqe7woEB6Owf7QaDngwPVRylNmZ145M2oFvSwiTmhfjb40fpYDSo BB4JhAbw9W5Kh9CqA1t6Ft7oiIjCvhp1FlbQXJ/Y6CusJYfv7mEe1ftegMb/1P0P27 Yr13hh1cKqCAebA7WhPMwsnwSioKe89+7V6FiHaw= From: Timo Rothenpieler To: ffmpeg-devel@ffmpeg.org Date: Tue, 14 Nov 2017 14:50:12 +0100 Message-Id: <20171114135012.30562-1-timo@rothenpieler.org> X-Mailer: git-send-email 2.14.2 Subject: [FFmpeg-devel] [PATCH] configure: call flatten_extralibs in a subshell X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Timo Rothenpieler MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" By putting the call in a subshell, the problem of it spilling cleanup-decision from a previous library to other libraries is avoided. For example, it could have already cleaned up cuda_extralibs in a previous library that depended on cuda. Then when it gets to avutil, it will never pick up the dependency of avutil to cuda, which depends on libdl, which in turn results in a missing -ldl extralib, resulting in link failures in certain configurations. --- configure | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 3788f26956..1fc6821fe7 100755 --- a/configure +++ b/configure @@ -6501,6 +6501,16 @@ flatten_extralibs(){ fi } +flatten_extralibs_wrapper(){ + list_name=$1 + flatten_extralibs $list_name + unique $list_name + resolve $list_name + unique $list_name + eval $list_name=\$\(\$ldflags_filter \$$list_name\) + eval printf \''%s'\' \""\$$list_name"\" +} + for linkunit in $LIBRARY_LIST; do unset current_extralibs eval components=\$$(toupper ${linkunit})_COMPONENTS_LIST @@ -6513,10 +6523,7 @@ for linkunit in $LIBRARY_LIST; do done for linkunit in $LIBRARY_LIST $PROGRAM_LIST $EXTRALIBS_LIST; do - flatten_extralibs ${linkunit}_extralibs - unique ${linkunit}_extralibs - resolve ${linkunit}_extralibs - eval ${linkunit}_extralibs=\$\(\$ldflags_filter \$${linkunit}_extralibs\) + eval ${linkunit}_extralibs=\$\(flatten_extralibs_wrapper ${linkunit}_extralibs\) done map 'enabled $v && intrinsics=${v#intrinsics_}' $INTRINSICS_LIST