From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4DiGGghA5GM7rwAAbAwnHQ (envelope-from ) for ; Thu, 09 Feb 2023 01:36:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id gBKPGghA5GNhDQEA9RJhRA (envelope-from ) for ; Thu, 09 Feb 2023 01:36:24 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 19785282D4 for ; Thu, 9 Feb 2023 01:36:23 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPuuy-000797-Vb; Wed, 08 Feb 2023 19:36:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPuux-00071X-1p for guix-patches@gnu.org; Wed, 08 Feb 2023 19:36:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pPuuw-0006Sw-P3 for guix-patches@gnu.org; Wed, 08 Feb 2023 19:36:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pPuuw-0001EL-3y for guix-patches@gnu.org; Wed, 08 Feb 2023 19:36:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60429] [PATCH v2 4/5] gnu: yosys: Propagate external dependencies. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 09 Feb 2023 00:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60429 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 60429@debbugs.gnu.org Received: via spool by 60429-submit@debbugs.gnu.org id=B60429.16759029444705 (code B ref 60429); Thu, 09 Feb 2023 00:36:02 +0000 Received: (at 60429) by debbugs.gnu.org; 9 Feb 2023 00:35:44 +0000 Received: from localhost ([127.0.0.1]:56942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPuue-0001Do-7Q for submit@debbugs.gnu.org; Wed, 08 Feb 2023 19:35:44 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:48648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPuuZ-0001DX-05 for 60429@debbugs.gnu.org; Wed, 08 Feb 2023 19:35:42 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 86BAFE878F; Thu, 9 Feb 2023 00:35:31 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo08-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo08-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8360Zc9BPyRQ; Thu, 9 Feb 2023 00:35:31 +0000 (UTC) Received: from earth (23-233-96-72.cpe.pppoe.ca [23.233.96.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 0A71AE8747; Thu, 9 Feb 2023 00:35:31 +0000 (UTC) From: Simon South References: <62b19db61f34b63e37ba204fd9691b97d5c245bb.1673202235.git.simon@simonsouth.net> <87357g6pfz.fsf@cbaines.net> Date: Wed, 08 Feb 2023 19:35:30 -0500 In-Reply-To: <87357g6pfz.fsf@cbaines.net> (Christopher Baines's message of "Wed, 08 Feb 2023 17:14:59 +0000") Message-ID: <87v8kb7k19.fsf@simonsouth.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1675902984; a=rsa-sha256; cv=none; b=OYs5nP6ZPWs7iyQ3HNwglH/NEqQrKqAZI9yH6x2S8l8ax1MthC5kdWdhbBHL5JDK2TAzkI 3raoTUn/I1LBMzeIIsVdaIzGolNXnhcHH+sLB89jJWafs1uftaiPwvrgOS9MAT5SsbNREM TzH2sXYiIuy5y7CPCN4670XgSyq5jz0FG6eSsk33VyAgjhfbL+X/EF2aYP1QwcUqrNOh2V ERWjex9NgWAnibxlSvsAwOAcQKhuAD8XIRcnEx/l8nx4MBLSogLVp8rKax+vQdyzJ7bFfL uMbEak5OCLDhMzuFWDK0f9j27aeyP8/AJkpI51JrwjICsMXO4BH/SMagmvHxqQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1675902984; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=U/Kr13YsmX05Ri2eeny2yV+Kd66yMfxbUzrKveGgpRM=; b=JxiYjoErJsMorbwQHULArcAVnUGManeHtuRDET9pCd3pjd7FCanQW2iDGLk9emLwGYT3N4 oncl6D+Ugj8aLsIBXcamK5d1IaMW5gIw155+Tzhx/Rz11y38bYd+h29g6LmxWvs5PENut1 hawMHROLbgC5rY5xMfaxJJZ7tkRi9Ij3ar0YW5NGDoBWzra6jpChWqxUrh+el7zVBUJsQ/ 03ucdrAu+GHcjdp5eE/R37eRS7ffA1nL5kdH2++wanWg5uhcp0Jgsm4hSiGYaOwHgpcrI9 2CECJckvr1E5wN4V5iXIl//xTyDcJqqLwn2zH4YeUEB9ziI/alye4e3dS6Qd1w== X-Migadu-Queue-Id: 19785282D4 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none X-Migadu-Spam-Score: -3.30 X-Spam-Score: -3.30 X-TUID: /t9Pu5JTrGb8 Christopher Baines writes: > Thanks Simon, I've pushed the first 3 patches from this series to the > master branch now. Nice, thank you. > I know you say this is related to yosys show in the commit message, > can you elaborate on why these packages are necessary to have in the > users environment? Yosys' "show" command produces its output by building and executing a shell command that invokes "dot" or "xdot" on the user's data. The implementation is in passes/cmds/show.cc[0]; the code for invoking dot for instance looks like #define DOT_CMD "dot -T%s '%s' > '%s.new' && mv '%s.new' '%s'" (...) std::string cmd = stringf(DOT_CMD, format.c_str(), dot_file.c_str(), out_file.c_str(), out_file.c_str(), out_file.c_str()); log("Exec: %s\n", cmd.c_str()); if (run_command(cmd) != 0) log_cmd_error("Shell command failed!\n"); Obviously this works only if "dot" is in the user's PATH (as Yosys blindly assumes), so the graphviz package must be installed as well or the "show" command will be broken. Similarly for the "fuser" and "xdot" executables, which by default are invoked to provide graphical output (though their use can be overridden by a setting at runtime). I find this business of generating shell commands a bit ugly but at least it creates only a loose coupling between the executables: The shell is free to select a suitable "dot" to run, so the user can substitute their own as easily as changing their PATH. In constrast, the existing 'fix-paths phase tightens this coupling considerably, as it embeds in the DOT_CMD string above the full path to a specific "dot" executable in the store. This ties the two executables together completely, making it very difficult to change which "dot" is used by Yosys without rebuilding the package. I see no advantage to coupling the executables together tightly this way, and in fact it seems counter to what is implied by the code above. (Note also the "ABCEXTERNAL" build variable adjusted in a previous patch is provided specifically to allow users to swap in their own version of abc, which a different Yosys command invokes.) I'd rather we propagate the packages needed to ensure Yosys works as expected out-of-the-box, then leave the user free to override its behaviour as they see fit. -- Simon South simon@simonsouth.net [0] https://github.com/YosysHQ/yosys/blob/1979e0b1f2482dbf0562f5116ab444280a377773/passes/cmds/show.cc