From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 30 10:58:42 2022 Received: (at submit) by debbugs.gnu.org; 30 Dec 2022 15:58:42 +0000 Received: from localhost ([127.0.0.1]:35955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHmM-0000Rq-89 for submit@debbugs.gnu.org; Fri, 30 Dec 2022 10:58:42 -0500 Received: from lists.gnu.org ([209.51.188.17]:44256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHmK-0000Rh-IX for submit@debbugs.gnu.org; Fri, 30 Dec 2022 10:58:41 -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 1pBHmK-00077K-Ci for guix-patches@gnu.org; Fri, 30 Dec 2022 10:58:40 -0500 Received: from mailout.easymail.ca ([64.68.200.34]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBHmI-00059i-A2 for guix-patches@gnu.org; Fri, 30 Dec 2022 10:58:39 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id B6CB9E7B5F for ; Fri, 30 Dec 2022 15:58:35 +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 z2tCoTCkyrC5 for ; Fri, 30 Dec 2022 15:58:35 +0000 (UTC) Received: from localhost.localdomain (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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id F068EE7B5D for ; Fri, 30 Dec 2022 15:58:34 +0000 (UTC) From: Simon South To: guix-patches@gnu.org Subject: [PATCH 0/5] gnu: yosys: Update to 0.24. Date: Fri, 30 Dec 2022 10:58:32 -0500 Message-Id: X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=64.68.200.34; envelope-from=simon@simonsouth.net; helo=mailout.easymail.ca X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Here's a patch series that aims to improve the package for Yosys, a tool for synthesizing Verilog RTL designs, by - Updating the source-repository and home-page URLs to their current location; - Updating the package definition to the modern style, using gexps and search-input-file; - Having Yosys use the "abc" executable from Guix's package rather than creating and installing a duplicate copy; - Explicitly propagating packages with executables Yosys invokes at runtime rather than embedding store references in Yosys' code; and - Updating Yosys to version 0.24. I've tested building the package and its dependencies on x86-64 and AArch64 and everything seems okay[0]. Again, arachne-pnr fails to build in any case and will need separate attention. [0] Yosys' README.md file includes sample sessions useful for testing, particularly whether external tools can be invoked via the "show" and "abc" commands: https://github.com/YosysHQ/yosys/blob/3ebc50d/README.md#getting-started The files "fiedler-cooley.v" and "mycells.lib" are present in the source tree. -- Simon South simon@simonsouth.net Simon South (5): gnu: yosys: Update source and home-page URLs. gnu: yosys: Use new package style. gnu: yosys: Use external abc. gnu: yosys: Propagate external dependencies. gnu: yosys: Update to 0.24. gnu/packages/fpga.scm | 120 ++++++++++++++++-------------------------- 1 file changed, 45 insertions(+), 75 deletions(-) base-commit: 01762b7171f9afaf7ffa364f7926461bdebc903f -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 30 11:00:59 2022 Received: (at 60429) by debbugs.gnu.org; 30 Dec 2022 16:00:59 +0000 Received: from localhost ([127.0.0.1]:35964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHoY-0000XP-Qi for submit@debbugs.gnu.org; Fri, 30 Dec 2022 11:00:59 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:41934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHoX-0000Ww-HY for 60429@debbugs.gnu.org; Fri, 30 Dec 2022 11:00:57 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 5C86CE7B74 for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +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 AFKuQOenWjh9 for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) Received: from localhost.localdomain (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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 0AE08E7B5D for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) From: Simon South To: 60429@debbugs.gnu.org Subject: [PATCH 1/5] gnu: yosys: Update source and home-page URLs. Date: Fri, 30 Dec 2022 11:00:45 -0500 Message-Id: <42363f6bff2eea2b49eb7058cf03eda11fd79131.1672412713.git.simon@simonsouth.net> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60429 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/fpga.scm (yosys)[source]: Update source-repository URL. [home-page]: Update URL. --- gnu/packages/fpga.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index acce5f8f82..45aadf8ea4 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -141,7 +141,7 @@ (define-public yosys (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/cliffordwolf/yosys") + (url "https://github.com/YosysHQ/yosys") (commit (string-append "yosys-" version)) (recursive? #t))) ; for the ‘iverilog’ submodule (sha256 @@ -223,7 +223,7 @@ (define-public yosys abc)) (propagated-inputs (list z3)) ; should be in path for yosys-smtbmc - (home-page "http://www.clifford.at/yosys/") + (home-page "https://yosyshq.net/yosys/") (synopsis "FPGA Verilog RTL synthesizer") (description "Yosys synthesizes Verilog-2005.") (license license:isc))) -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 30 11:01:04 2022 Received: (at 60429) by debbugs.gnu.org; 30 Dec 2022 16:01:04 +0000 Received: from localhost ([127.0.0.1]:35967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHod-0000YI-LJ for submit@debbugs.gnu.org; Fri, 30 Dec 2022 11:01:04 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:41954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHoX-0000Wy-Po for 60429@debbugs.gnu.org; Fri, 30 Dec 2022 11:00:58 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id A4957E7B5F for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +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 EuhBgnV8zwEl for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) Received: from localhost.localdomain (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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 3E160E7B69 for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) From: Simon South To: 60429@debbugs.gnu.org Subject: [PATCH 3/5] gnu: yosys: Use external abc. Date: Fri, 30 Dec 2022 11:00:47 -0500 Message-Id: <3860fcf9632f6c9bbc7c3eb4359a28277f8d0683.1672412713.git.simon@simonsouth.net> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60429 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/fpga.scm (yosys)[source]: Remove snippet and associated "modules" field. [arguments]: Replace "prepare-abc" phase with "use-external-abc", which configures the package's build system to use the system's "abc" executable instead of creating a duplicate; add "add-symbolic-link" phase to preserve availability of "yosys-abc" command. [inputs]: Move abc from here... [propagated-inputs]: ...to here, to ensure its availability at runtime. --- gnu/packages/fpga.scm | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 479ca3b061..8effebd921 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -147,12 +147,7 @@ (define-public yosys (sha256 (base32 "0lb9r055h8y1vj2z8gm4ip0v06j5mk7f9zx9gi67kkqb7g4rhjli")) - (file-name (git-file-name name version)) - (modules '((guix build utils))) - (snippet - #~(begin - (substitute* "Makefile" - (("ABCREV = .*") "ABCREV = default\n")))))) + (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments (list @@ -175,14 +170,10 @@ (define-public yosys (replace 'configure (lambda* (#:key make-flags #:allow-other-keys) (apply invoke "make" "config-gcc" make-flags))) - (add-after 'configure 'prepare-abc - (lambda* (#:key inputs #:allow-other-keys) - (mkdir-p "abc") - (call-with-output-file "abc/Makefile" - (lambda (port) - (format port ".PHONY: all\nall:\n\tcp -f abc abc-default\n"))) - (copy-file (search-input-file inputs "/bin/abc") "abc/abc") - (invoke "chmod" "+w" "abc/abc"))) + (add-after 'configure 'use-external-abc + (lambda _ + (substitute* '("./Makefile") + (("ABCEXTERNAL \\?=") "ABCEXTERNAL = abc")))) (add-before 'check 'fix-iverilog-references (lambda* (#:key inputs native-inputs #:allow-other-keys) (let ((iverilog (search-input-file (or native-inputs inputs) @@ -202,7 +193,15 @@ (define-public yosys (("if ! which iverilog") "if ! true") (("iverilog ") (string-append iverilog " ")) (("iverilog_bin=\".*\"") (string-append "iverilog_bin=\"" - iverilog "\""))))))))) + iverilog "\"")))))) + (add-after 'install 'add-symbolic-link + (lambda* (#:key inputs #:allow-other-keys) + ;; Previously this package provided a copy of the "abc" + ;; executable in its output, named "yosys-abc". Create a + ;; symbolic link so any external uses of that name continue to + ;; work. + (symlink (search-input-file inputs "/bin/abc") + (string-append #$output "/bin/yosys-abc"))))))) (native-inputs (list bison flex @@ -212,15 +211,15 @@ (define-public yosys python tcl)) ; tclsh for the tests (inputs - (list abc - graphviz + (list graphviz libffi psmisc readline tcl xdot)) (propagated-inputs - (list z3)) ; should be in path for yosys-smtbmc + (list abc + z3)) ; should be in path for yosys-smtbmc (home-page "https://yosyshq.net/yosys/") (synopsis "FPGA Verilog RTL synthesizer") (description "Yosys synthesizes Verilog-2005.") -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 30 11:01:05 2022 Received: (at 60429) by debbugs.gnu.org; 30 Dec 2022 16:01:05 +0000 Received: from localhost ([127.0.0.1]:35969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHoe-0000YK-7N for submit@debbugs.gnu.org; Fri, 30 Dec 2022 11:01:05 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:41946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHoX-0000Wx-P3 for 60429@debbugs.gnu.org; Fri, 30 Dec 2022 11:00:58 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 9A379E7B7C for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +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 jV-f7ilx57RT for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) Received: from localhost.localdomain (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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 24C32E7B5F for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) From: Simon South To: 60429@debbugs.gnu.org Subject: [PATCH 2/5] gnu: yosys: Use new package style. Date: Fri, 30 Dec 2022 11:00:46 -0500 Message-Id: X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60429 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/fpga.scm (yosys)[source]: Use gexp in snippet and don't explicitly return #t. [arguments]: Use gexps; use search-input-file to locate executables; simplify parameters to "configure" phase; don't explicitly return #t from phases. [native-inputs]: Sort alphabetically. [inputs]: Sort alphabetically. --- gnu/packages/fpga.scm | 122 +++++++++++++++++++++--------------------- 1 file changed, 60 insertions(+), 62 deletions(-) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 45aadf8ea4..479ca3b061 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -150,77 +150,75 @@ (define-public yosys (file-name (git-file-name name version)) (modules '((guix build utils))) (snippet - '(begin - (substitute* "Makefile" - (("ABCREV = .*") "ABCREV = default\n")) - #t)))) + #~(begin + (substitute* "Makefile" + (("ABCREV = .*") "ABCREV = default\n")))))) (build-system gnu-build-system) (arguments - `(#:test-target "test" - #:make-flags (list "CC=gcc" - "CXX=g++" - (string-append "PREFIX=" %output)) - #:phases - (modify-phases %standard-phases - (add-before 'configure 'fix-paths - (lambda _ - (substitute* "./passes/cmds/show.cc" - (("exec xdot") (string-append "exec " (which "xdot"))) - (("dot -") (string-append (which "dot") " -")) - (("fuser") (which "fuser"))) - #t)) - (replace 'configure - (lambda* (#:key inputs (make-flags '()) #:allow-other-keys) - (apply invoke "make" "config-gcc" make-flags))) - (add-after 'configure 'prepare-abc - (lambda* (#:key inputs #:allow-other-keys) - (let* ((sourceabc (assoc-ref inputs "abc")) - (sourcebin (string-append sourceabc "/bin")) - (source (string-append sourcebin "/abc"))) - (mkdir-p "abc") - (call-with-output-file "abc/Makefile" - (lambda (port) - (format port ".PHONY: all\nall:\n\tcp -f abc abc-default\n"))) - (copy-file source "abc/abc") - (invoke "chmod" "+w" "abc/abc")))) + (list + #:test-target "test" + #:make-flags #~(list "CC=gcc" + "CXX=g++" + (string-append "PREFIX=" #$output)) + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'fix-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "./passes/cmds/show.cc" + (("exec xdot") + (string-append "exec " (search-input-file inputs + "/bin/xdot"))) + (("dot -") + (string-append (search-input-file inputs "/bin/dot") " -")) + (("fuser") + (search-input-file inputs "/bin/fuser"))))) + (replace 'configure + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke "make" "config-gcc" make-flags))) + (add-after 'configure 'prepare-abc + (lambda* (#:key inputs #:allow-other-keys) + (mkdir-p "abc") + (call-with-output-file "abc/Makefile" + (lambda (port) + (format port ".PHONY: all\nall:\n\tcp -f abc abc-default\n"))) + (copy-file (search-input-file inputs "/bin/abc") "abc/abc") + (invoke "chmod" "+w" "abc/abc"))) (add-before 'check 'fix-iverilog-references - (lambda* (#:key inputs native-inputs #:allow-other-keys) - (let* ((xinputs (or native-inputs inputs)) - (xdirname (assoc-ref xinputs "iverilog")) - (iverilog (string-append xdirname "/bin/iverilog"))) - (substitute* '("./manual/CHAPTER_StateOfTheArt/synth.sh" - "./manual/CHAPTER_StateOfTheArt/validate_tb.sh" - "./techlibs/ice40/tests/test_bram.sh" - "./techlibs/ice40/tests/test_ffs.sh" - "./techlibs/xilinx/tests/bram1.sh" - "./techlibs/xilinx/tests/bram2.sh" - "./tests/bram/run-single.sh" - "./tests/realmath/run-test.sh" - "./tests/simple/run-test.sh" - "./tests/techmap/mem_simple_4x1_runtest.sh" - "./tests/tools/autotest.sh" - "./tests/vloghtb/common.sh") - (("if ! which iverilog") "if ! true") - (("iverilog ") (string-append iverilog " ")) - (("iverilog_bin=\".*\"") (string-append "iverilog_bin=\"" - iverilog "\""))) - #t)))))) + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((iverilog (search-input-file (or native-inputs inputs) + "/bin/iverilog"))) + (substitute* '("./manual/CHAPTER_StateOfTheArt/synth.sh" + "./manual/CHAPTER_StateOfTheArt/validate_tb.sh" + "./techlibs/ice40/tests/test_bram.sh" + "./techlibs/ice40/tests/test_ffs.sh" + "./techlibs/xilinx/tests/bram1.sh" + "./techlibs/xilinx/tests/bram2.sh" + "./tests/bram/run-single.sh" + "./tests/realmath/run-test.sh" + "./tests/simple/run-test.sh" + "./tests/techmap/mem_simple_4x1_runtest.sh" + "./tests/tools/autotest.sh" + "./tests/vloghtb/common.sh") + (("if ! which iverilog") "if ! true") + (("iverilog ") (string-append iverilog " ")) + (("iverilog_bin=\".*\"") (string-append "iverilog_bin=\"" + iverilog "\""))))))))) (native-inputs - (list pkg-config - python - bison + (list bison flex gawk ; for the tests and "make" progress pretty-printing - tcl ; tclsh for the tests - iverilog)) ; for the tests + iverilog ; for the tests + pkg-config + python + tcl)) ; tclsh for the tests (inputs - (list tcl - readline - libffi + (list abc graphviz + libffi psmisc - xdot - abc)) + readline + tcl + xdot)) (propagated-inputs (list z3)) ; should be in path for yosys-smtbmc (home-page "https://yosyshq.net/yosys/") -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 30 11:01:05 2022 Received: (at 60429) by debbugs.gnu.org; 30 Dec 2022 16:01:06 +0000 Received: from localhost ([127.0.0.1]:35971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHof-0000YS-9R for submit@debbugs.gnu.org; Fri, 30 Dec 2022 11:01:05 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:41962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHoY-0000Wz-07 for 60429@debbugs.gnu.org; Fri, 30 Dec 2022 11:00:58 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id D79CBE7B69 for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +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 TRmRkEHKDQBN for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) Received: from localhost.localdomain (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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 574B4E7B75 for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) From: Simon South To: 60429@debbugs.gnu.org Subject: [PATCH 4/5] gnu: yosys: Propagate external dependencies. Date: Fri, 30 Dec 2022 11:00:48 -0500 Message-Id: <477fccd0f411dc2e6cccd91106116e6d71fc58f9.1672412713.git.simon@simonsouth.net> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60429 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/fpga.scm (yosys)[inputs]: Move graphviz, psmisc, xdot from here... [propagated-inputs]: ...to here, to ensure the availability at runtime of executables invoked by yosys' "show" command. [arguments]: Remove now-obsolete "fix-paths" phase. --- gnu/packages/fpga.scm | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 8effebd921..785d385621 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -157,16 +157,6 @@ (define-public yosys (string-append "PREFIX=" #$output)) #:phases #~(modify-phases %standard-phases - (add-before 'configure 'fix-paths - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "./passes/cmds/show.cc" - (("exec xdot") - (string-append "exec " (search-input-file inputs - "/bin/xdot"))) - (("dot -") - (string-append (search-input-file inputs "/bin/dot") " -")) - (("fuser") - (search-input-file inputs "/bin/fuser"))))) (replace 'configure (lambda* (#:key make-flags #:allow-other-keys) (apply invoke "make" "config-gcc" make-flags))) @@ -211,14 +201,14 @@ (define-public yosys python tcl)) ; tclsh for the tests (inputs - (list graphviz - libffi - psmisc + (list libffi readline - tcl - xdot)) + tcl)) (propagated-inputs (list abc + graphviz ; for dot + psmisc ; for fuser + xdot z3)) ; should be in path for yosys-smtbmc (home-page "https://yosyshq.net/yosys/") (synopsis "FPGA Verilog RTL synthesizer") -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 30 11:01:06 2022 Received: (at 60429) by debbugs.gnu.org; 30 Dec 2022 16:01:06 +0000 Received: from localhost ([127.0.0.1]:35973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHof-0000Ya-So for submit@debbugs.gnu.org; Fri, 30 Dec 2022 11:01:06 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:41976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHoY-0000X1-Gw for 60429@debbugs.gnu.org; Fri, 30 Dec 2022 11:00:59 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 58970E7B75 for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:53 +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 hbfOilSpDZ_l for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) Received: from localhost.localdomain (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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 73BA0E7B5D for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) From: Simon South To: 60429@debbugs.gnu.org Subject: [PATCH 5/5] gnu: yosys: Update to 0.24. Date: Fri, 30 Dec 2022 11:00:49 -0500 Message-Id: <67ee629dc59d691f639ad436935091d26bbf4aec.1672412713.git.simon@simonsouth.net> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60429 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/fpga.scm (yosys): Update to 0.24. [arguments]: Remove obsolete "fix-iverilog-references" phase. [inputs]: Add zlib. [propagated-inputs]: Add gtkwave, python, python-click. --- gnu/packages/fpga.scm | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 785d385621..d3532069e8 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -137,16 +137,15 @@ (define-public iverilog (define-public yosys (package (name "yosys") - (version "0.9") + (version "0.24") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/YosysHQ/yosys") - (commit (string-append "yosys-" version)) - (recursive? #t))) ; for the ‘iverilog’ submodule + (commit (string-append "yosys-" version)))) (sha256 - (base32 - "0lb9r055h8y1vj2z8gm4ip0v06j5mk7f9zx9gi67kkqb7g4rhjli")) + (base32 + "1hrlqq9850j0160z9ibcia8fp0xxn0iakh0yb69kjzb6ffgjjn3d")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments @@ -164,26 +163,6 @@ (define-public yosys (lambda _ (substitute* '("./Makefile") (("ABCEXTERNAL \\?=") "ABCEXTERNAL = abc")))) - (add-before 'check 'fix-iverilog-references - (lambda* (#:key inputs native-inputs #:allow-other-keys) - (let ((iverilog (search-input-file (or native-inputs inputs) - "/bin/iverilog"))) - (substitute* '("./manual/CHAPTER_StateOfTheArt/synth.sh" - "./manual/CHAPTER_StateOfTheArt/validate_tb.sh" - "./techlibs/ice40/tests/test_bram.sh" - "./techlibs/ice40/tests/test_ffs.sh" - "./techlibs/xilinx/tests/bram1.sh" - "./techlibs/xilinx/tests/bram2.sh" - "./tests/bram/run-single.sh" - "./tests/realmath/run-test.sh" - "./tests/simple/run-test.sh" - "./tests/techmap/mem_simple_4x1_runtest.sh" - "./tests/tools/autotest.sh" - "./tests/vloghtb/common.sh") - (("if ! which iverilog") "if ! true") - (("iverilog ") (string-append iverilog " ")) - (("iverilog_bin=\".*\"") (string-append "iverilog_bin=\"" - iverilog "\"")))))) (add-after 'install 'add-symbolic-link (lambda* (#:key inputs #:allow-other-keys) ;; Previously this package provided a copy of the "abc" @@ -203,11 +182,15 @@ (define-public yosys (inputs (list libffi readline - tcl)) + tcl + zlib)) (propagated-inputs (list abc graphviz ; for dot + gtkwave ; for vcd2fst psmisc ; for fuser + python + python-click xdot z3)) ; should be in path for yosys-smtbmc (home-page "https://yosyshq.net/yosys/") -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 08 13:31:45 2023 Received: (at 60429) by debbugs.gnu.org; 8 Jan 2023 18:31:45 +0000 Received: from localhost ([127.0.0.1]:34654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEaSO-0002K0-Ks for submit@debbugs.gnu.org; Sun, 08 Jan 2023 13:31:45 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:46882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEaSN-0002Jc-CM for 60429@debbugs.gnu.org; Sun, 08 Jan 2023 13:31:44 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id E560C678E8 for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo09-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo09-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5z6i-bIGFC2L for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:37 +0000 (UTC) Received: from localhost.localdomain (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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 4D47467723 for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:37 +0000 (UTC) From: Simon South To: 60429@debbugs.gnu.org Subject: [PATCH v2 0/5] gnu: yosys: Update to 0.24. Date: Sun, 8 Jan 2023 13:31:26 -0500 Message-Id: X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60429 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Here's a revised patchset with a modified final patch that updates yosys to version 0.25, released in the past week, instead of 0.24. Everything else remains unchanged. I've re-tested this on x86-64 and AArch64 and everything appears fine. Here's the original cover letter: Here's a patch series that aims to improve the package for Yosys, a tool for synthesizing Verilog RTL designs, by - Updating the source-repository and home-page URLs to their current location; - Updating the package definition to the modern style, using gexps and search-input-file; - Having Yosys use the "abc" executable from Guix's package rather than creating and installing a duplicate copy; - Explicitly propagating packages with executables Yosys invokes at runtime rather than embedding store references in Yosys' code; and - Updating Yosys to version 0.24. I've tested building the package and its dependencies on x86-64 and AArch64 and everything seems okay[0]. Again, arachne-pnr fails to build in any case and will need separate attention. [0] Yosys' README.md file includes sample sessions useful for testing, particularly whether external tools can be invoked via the "show" and "abc" commands: https://github.com/YosysHQ/yosys/blob/3ebc50d/README.md#getting-started The files "fiedler-cooley.v" and "mycells.lib" are present in the source tree. -- Simon South simon@simonsouth.net Simon South (5): gnu: yosys: Update source and home-page URLs. gnu: yosys: Use new package style. gnu: yosys: Use external abc. gnu: yosys: Propagate external dependencies. gnu: yosys: Update to 0.25. gnu/packages/fpga.scm | 120 ++++++++++++++++-------------------------- 1 file changed, 45 insertions(+), 75 deletions(-) base-commit: f5ea392b9cd3851ed7517876a8cd4beb13893c9c -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 08 13:31:48 2023 Received: (at 60429) by debbugs.gnu.org; 8 Jan 2023 18:31:48 +0000 Received: from localhost ([127.0.0.1]:34656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEaSR-0002KP-KN for submit@debbugs.gnu.org; Sun, 08 Jan 2023 13:31:48 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:46902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEaSN-0002Jf-CN for 60429@debbugs.gnu.org; Sun, 08 Jan 2023 13:31:44 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 31C3B6774E for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo09-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo09-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w7oOhJGmuiUe for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:37 +0000 (UTC) Received: from localhost.localdomain (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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id A12AD67790 for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:37 +0000 (UTC) From: Simon South To: 60429@debbugs.gnu.org Subject: [PATCH v2 3/5] gnu: yosys: Use external abc. Date: Sun, 8 Jan 2023 13:31:29 -0500 Message-Id: <5ab17e11b0670fff010bc169218f60f89e37df0c.1673202235.git.simon@simonsouth.net> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60429 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/fpga.scm (yosys)[source]: Remove snippet and associated "modules" field. [arguments]: Replace "prepare-abc" phase with "use-external-abc", which configures the package's build system to use the system's "abc" executable instead of creating a duplicate; add "add-symbolic-link" phase to preserve availability of "yosys-abc" command. [inputs]: Move abc from here... [propagated-inputs]: ...to here, to ensure its availability at runtime. --- gnu/packages/fpga.scm | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 479ca3b061..8effebd921 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -147,12 +147,7 @@ (define-public yosys (sha256 (base32 "0lb9r055h8y1vj2z8gm4ip0v06j5mk7f9zx9gi67kkqb7g4rhjli")) - (file-name (git-file-name name version)) - (modules '((guix build utils))) - (snippet - #~(begin - (substitute* "Makefile" - (("ABCREV = .*") "ABCREV = default\n")))))) + (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments (list @@ -175,14 +170,10 @@ (define-public yosys (replace 'configure (lambda* (#:key make-flags #:allow-other-keys) (apply invoke "make" "config-gcc" make-flags))) - (add-after 'configure 'prepare-abc - (lambda* (#:key inputs #:allow-other-keys) - (mkdir-p "abc") - (call-with-output-file "abc/Makefile" - (lambda (port) - (format port ".PHONY: all\nall:\n\tcp -f abc abc-default\n"))) - (copy-file (search-input-file inputs "/bin/abc") "abc/abc") - (invoke "chmod" "+w" "abc/abc"))) + (add-after 'configure 'use-external-abc + (lambda _ + (substitute* '("./Makefile") + (("ABCEXTERNAL \\?=") "ABCEXTERNAL = abc")))) (add-before 'check 'fix-iverilog-references (lambda* (#:key inputs native-inputs #:allow-other-keys) (let ((iverilog (search-input-file (or native-inputs inputs) @@ -202,7 +193,15 @@ (define-public yosys (("if ! which iverilog") "if ! true") (("iverilog ") (string-append iverilog " ")) (("iverilog_bin=\".*\"") (string-append "iverilog_bin=\"" - iverilog "\""))))))))) + iverilog "\"")))))) + (add-after 'install 'add-symbolic-link + (lambda* (#:key inputs #:allow-other-keys) + ;; Previously this package provided a copy of the "abc" + ;; executable in its output, named "yosys-abc". Create a + ;; symbolic link so any external uses of that name continue to + ;; work. + (symlink (search-input-file inputs "/bin/abc") + (string-append #$output "/bin/yosys-abc"))))))) (native-inputs (list bison flex @@ -212,15 +211,15 @@ (define-public yosys python tcl)) ; tclsh for the tests (inputs - (list abc - graphviz + (list graphviz libffi psmisc readline tcl xdot)) (propagated-inputs - (list z3)) ; should be in path for yosys-smtbmc + (list abc + z3)) ; should be in path for yosys-smtbmc (home-page "https://yosyshq.net/yosys/") (synopsis "FPGA Verilog RTL synthesizer") (description "Yosys synthesizes Verilog-2005.") -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 08 13:31:48 2023 Received: (at 60429) by debbugs.gnu.org; 8 Jan 2023 18:31:48 +0000 Received: from localhost ([127.0.0.1]:34658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEaSS-0002KS-4b for submit@debbugs.gnu.org; Sun, 08 Jan 2023 13:31:48 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:46870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEaSN-0002Ja-Ch for 60429@debbugs.gnu.org; Sun, 08 Jan 2023 13:31:44 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id ADE4F678BF for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo09-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo09-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XstJljmL3d1o for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:37 +0000 (UTC) Received: from localhost.localdomain (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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 683CE6774B for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:37 +0000 (UTC) From: Simon South To: 60429@debbugs.gnu.org Subject: [PATCH v2 1/5] gnu: yosys: Update source and home-page URLs. Date: Sun, 8 Jan 2023 13:31:27 -0500 Message-Id: X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60429 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/fpga.scm (yosys)[source]: Update source-repository URL. [home-page]: Update URL. --- gnu/packages/fpga.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index acce5f8f82..45aadf8ea4 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -141,7 +141,7 @@ (define-public yosys (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/cliffordwolf/yosys") + (url "https://github.com/YosysHQ/yosys") (commit (string-append "yosys-" version)) (recursive? #t))) ; for the ‘iverilog’ submodule (sha256 @@ -223,7 +223,7 @@ (define-public yosys abc)) (propagated-inputs (list z3)) ; should be in path for yosys-smtbmc - (home-page "http://www.clifford.at/yosys/") + (home-page "https://yosyshq.net/yosys/") (synopsis "FPGA Verilog RTL synthesizer") (description "Yosys synthesizes Verilog-2005.") (license license:isc))) -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 08 13:31:48 2023 Received: (at 60429) by debbugs.gnu.org; 8 Jan 2023 18:31:49 +0000 Received: from localhost ([127.0.0.1]:34660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEaSS-0002KZ-Ep for submit@debbugs.gnu.org; Sun, 08 Jan 2023 13:31:48 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:46904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEaSN-0002Jg-Dd for 60429@debbugs.gnu.org; Sun, 08 Jan 2023 13:31:45 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 488CD67790 for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo09-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo09-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RqvQ4EbwgO0a for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:38 +0000 (UTC) Received: from localhost.localdomain (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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id B83C36774B for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:37 +0000 (UTC) From: Simon South To: 60429@debbugs.gnu.org Subject: [PATCH v2 4/5] gnu: yosys: Propagate external dependencies. Date: Sun, 8 Jan 2023 13:31:30 -0500 Message-Id: <62b19db61f34b63e37ba204fd9691b97d5c245bb.1673202235.git.simon@simonsouth.net> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60429 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/fpga.scm (yosys)[inputs]: Move graphviz, psmisc, xdot from here... [propagated-inputs]: ...to here, to ensure the availability at runtime of executables invoked by yosys' "show" command. [arguments]: Remove now-obsolete "fix-paths" phase. --- gnu/packages/fpga.scm | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 8effebd921..785d385621 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -157,16 +157,6 @@ (define-public yosys (string-append "PREFIX=" #$output)) #:phases #~(modify-phases %standard-phases - (add-before 'configure 'fix-paths - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "./passes/cmds/show.cc" - (("exec xdot") - (string-append "exec " (search-input-file inputs - "/bin/xdot"))) - (("dot -") - (string-append (search-input-file inputs "/bin/dot") " -")) - (("fuser") - (search-input-file inputs "/bin/fuser"))))) (replace 'configure (lambda* (#:key make-flags #:allow-other-keys) (apply invoke "make" "config-gcc" make-flags))) @@ -211,14 +201,14 @@ (define-public yosys python tcl)) ; tclsh for the tests (inputs - (list graphviz - libffi - psmisc + (list libffi readline - tcl - xdot)) + tcl)) (propagated-inputs (list abc + graphviz ; for dot + psmisc ; for fuser + xdot z3)) ; should be in path for yosys-smtbmc (home-page "https://yosyshq.net/yosys/") (synopsis "FPGA Verilog RTL synthesizer") -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 08 13:31:49 2023 Received: (at 60429) by debbugs.gnu.org; 8 Jan 2023 18:31:49 +0000 Received: from localhost ([127.0.0.1]:34662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEaSS-0002Kg-RE for submit@debbugs.gnu.org; Sun, 08 Jan 2023 13:31:49 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:46890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEaSN-0002Je-Dy for 60429@debbugs.gnu.org; Sun, 08 Jan 2023 13:31:45 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 16BC967723 for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo09-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo09-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rJUstA6cLxng for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:37 +0000 (UTC) Received: from localhost.localdomain (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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 886136774E for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:37 +0000 (UTC) From: Simon South To: 60429@debbugs.gnu.org Subject: [PATCH v2 2/5] gnu: yosys: Use new package style. Date: Sun, 8 Jan 2023 13:31:28 -0500 Message-Id: X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60429 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/fpga.scm (yosys)[source]: Use gexp in snippet and don't explicitly return #t. [arguments]: Use gexps; use search-input-file to locate executables; simplify parameters to "configure" phase; don't explicitly return #t from phases. [native-inputs]: Sort alphabetically. [inputs]: Sort alphabetically. --- gnu/packages/fpga.scm | 122 +++++++++++++++++++++--------------------- 1 file changed, 60 insertions(+), 62 deletions(-) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 45aadf8ea4..479ca3b061 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -150,77 +150,75 @@ (define-public yosys (file-name (git-file-name name version)) (modules '((guix build utils))) (snippet - '(begin - (substitute* "Makefile" - (("ABCREV = .*") "ABCREV = default\n")) - #t)))) + #~(begin + (substitute* "Makefile" + (("ABCREV = .*") "ABCREV = default\n")))))) (build-system gnu-build-system) (arguments - `(#:test-target "test" - #:make-flags (list "CC=gcc" - "CXX=g++" - (string-append "PREFIX=" %output)) - #:phases - (modify-phases %standard-phases - (add-before 'configure 'fix-paths - (lambda _ - (substitute* "./passes/cmds/show.cc" - (("exec xdot") (string-append "exec " (which "xdot"))) - (("dot -") (string-append (which "dot") " -")) - (("fuser") (which "fuser"))) - #t)) - (replace 'configure - (lambda* (#:key inputs (make-flags '()) #:allow-other-keys) - (apply invoke "make" "config-gcc" make-flags))) - (add-after 'configure 'prepare-abc - (lambda* (#:key inputs #:allow-other-keys) - (let* ((sourceabc (assoc-ref inputs "abc")) - (sourcebin (string-append sourceabc "/bin")) - (source (string-append sourcebin "/abc"))) - (mkdir-p "abc") - (call-with-output-file "abc/Makefile" - (lambda (port) - (format port ".PHONY: all\nall:\n\tcp -f abc abc-default\n"))) - (copy-file source "abc/abc") - (invoke "chmod" "+w" "abc/abc")))) + (list + #:test-target "test" + #:make-flags #~(list "CC=gcc" + "CXX=g++" + (string-append "PREFIX=" #$output)) + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'fix-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "./passes/cmds/show.cc" + (("exec xdot") + (string-append "exec " (search-input-file inputs + "/bin/xdot"))) + (("dot -") + (string-append (search-input-file inputs "/bin/dot") " -")) + (("fuser") + (search-input-file inputs "/bin/fuser"))))) + (replace 'configure + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke "make" "config-gcc" make-flags))) + (add-after 'configure 'prepare-abc + (lambda* (#:key inputs #:allow-other-keys) + (mkdir-p "abc") + (call-with-output-file "abc/Makefile" + (lambda (port) + (format port ".PHONY: all\nall:\n\tcp -f abc abc-default\n"))) + (copy-file (search-input-file inputs "/bin/abc") "abc/abc") + (invoke "chmod" "+w" "abc/abc"))) (add-before 'check 'fix-iverilog-references - (lambda* (#:key inputs native-inputs #:allow-other-keys) - (let* ((xinputs (or native-inputs inputs)) - (xdirname (assoc-ref xinputs "iverilog")) - (iverilog (string-append xdirname "/bin/iverilog"))) - (substitute* '("./manual/CHAPTER_StateOfTheArt/synth.sh" - "./manual/CHAPTER_StateOfTheArt/validate_tb.sh" - "./techlibs/ice40/tests/test_bram.sh" - "./techlibs/ice40/tests/test_ffs.sh" - "./techlibs/xilinx/tests/bram1.sh" - "./techlibs/xilinx/tests/bram2.sh" - "./tests/bram/run-single.sh" - "./tests/realmath/run-test.sh" - "./tests/simple/run-test.sh" - "./tests/techmap/mem_simple_4x1_runtest.sh" - "./tests/tools/autotest.sh" - "./tests/vloghtb/common.sh") - (("if ! which iverilog") "if ! true") - (("iverilog ") (string-append iverilog " ")) - (("iverilog_bin=\".*\"") (string-append "iverilog_bin=\"" - iverilog "\""))) - #t)))))) + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((iverilog (search-input-file (or native-inputs inputs) + "/bin/iverilog"))) + (substitute* '("./manual/CHAPTER_StateOfTheArt/synth.sh" + "./manual/CHAPTER_StateOfTheArt/validate_tb.sh" + "./techlibs/ice40/tests/test_bram.sh" + "./techlibs/ice40/tests/test_ffs.sh" + "./techlibs/xilinx/tests/bram1.sh" + "./techlibs/xilinx/tests/bram2.sh" + "./tests/bram/run-single.sh" + "./tests/realmath/run-test.sh" + "./tests/simple/run-test.sh" + "./tests/techmap/mem_simple_4x1_runtest.sh" + "./tests/tools/autotest.sh" + "./tests/vloghtb/common.sh") + (("if ! which iverilog") "if ! true") + (("iverilog ") (string-append iverilog " ")) + (("iverilog_bin=\".*\"") (string-append "iverilog_bin=\"" + iverilog "\""))))))))) (native-inputs - (list pkg-config - python - bison + (list bison flex gawk ; for the tests and "make" progress pretty-printing - tcl ; tclsh for the tests - iverilog)) ; for the tests + iverilog ; for the tests + pkg-config + python + tcl)) ; tclsh for the tests (inputs - (list tcl - readline - libffi + (list abc graphviz + libffi psmisc - xdot - abc)) + readline + tcl + xdot)) (propagated-inputs (list z3)) ; should be in path for yosys-smtbmc (home-page "https://yosyshq.net/yosys/") -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 08 13:31:53 2023 Received: (at 60429) by debbugs.gnu.org; 8 Jan 2023 18:31:53 +0000 Received: from localhost ([127.0.0.1]:34665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEaSW-0002L2-Hg for submit@debbugs.gnu.org; Sun, 08 Jan 2023 13:31:53 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:47014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEaST-0002Jr-9b for 60429@debbugs.gnu.org; Sun, 08 Jan 2023 13:31:49 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 971E66774B for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo09-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo09-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mvnN7mi0xUBv for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:40 +0000 (UTC) Received: from localhost.localdomain (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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id D6B54678C5 for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:37 +0000 (UTC) From: Simon South To: 60429@debbugs.gnu.org Subject: [PATCH v2 5/5] gnu: yosys: Update to 0.25. Date: Sun, 8 Jan 2023 13:31:31 -0500 Message-Id: <69832a7e061412efc3ef6b0148815534a513b28d.1673202235.git.simon@simonsouth.net> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60429 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/fpga.scm (yosys): Update to 0.25. [arguments]: Remove obsolete "fix-iverilog-references" phase. [inputs]: Add zlib. [propagated-inputs]: Add gtkwave, python, python-click. --- gnu/packages/fpga.scm | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 785d385621..45cf0e74cf 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -137,16 +137,15 @@ (define-public iverilog (define-public yosys (package (name "yosys") - (version "0.9") + (version "0.25") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/YosysHQ/yosys") - (commit (string-append "yosys-" version)) - (recursive? #t))) ; for the ‘iverilog’ submodule + (commit (string-append "yosys-" version)))) (sha256 - (base32 - "0lb9r055h8y1vj2z8gm4ip0v06j5mk7f9zx9gi67kkqb7g4rhjli")) + (base32 + "1j5slm7m02q6n0yv6f3ihv2rgrc4krzcdz6g8v6jmj0gwgh9xi5h")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments @@ -164,26 +163,6 @@ (define-public yosys (lambda _ (substitute* '("./Makefile") (("ABCEXTERNAL \\?=") "ABCEXTERNAL = abc")))) - (add-before 'check 'fix-iverilog-references - (lambda* (#:key inputs native-inputs #:allow-other-keys) - (let ((iverilog (search-input-file (or native-inputs inputs) - "/bin/iverilog"))) - (substitute* '("./manual/CHAPTER_StateOfTheArt/synth.sh" - "./manual/CHAPTER_StateOfTheArt/validate_tb.sh" - "./techlibs/ice40/tests/test_bram.sh" - "./techlibs/ice40/tests/test_ffs.sh" - "./techlibs/xilinx/tests/bram1.sh" - "./techlibs/xilinx/tests/bram2.sh" - "./tests/bram/run-single.sh" - "./tests/realmath/run-test.sh" - "./tests/simple/run-test.sh" - "./tests/techmap/mem_simple_4x1_runtest.sh" - "./tests/tools/autotest.sh" - "./tests/vloghtb/common.sh") - (("if ! which iverilog") "if ! true") - (("iverilog ") (string-append iverilog " ")) - (("iverilog_bin=\".*\"") (string-append "iverilog_bin=\"" - iverilog "\"")))))) (add-after 'install 'add-symbolic-link (lambda* (#:key inputs #:allow-other-keys) ;; Previously this package provided a copy of the "abc" @@ -203,11 +182,15 @@ (define-public yosys (inputs (list libffi readline - tcl)) + tcl + zlib)) (propagated-inputs (list abc graphviz ; for dot + gtkwave ; for vcd2fst psmisc ; for fuser + python + python-click xdot z3)) ; should be in path for yosys-smtbmc (home-page "https://yosyshq.net/yosys/") -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 08 12:24:14 2023 Received: (at submit) by debbugs.gnu.org; 8 Feb 2023 17:24:14 +0000 Received: from localhost ([127.0.0.1]:56555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPoB3-0006R7-Kt for submit@debbugs.gnu.org; Wed, 08 Feb 2023 12:24:14 -0500 Received: from lists.gnu.org ([209.51.188.17]:40914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPoAz-0006Qq-Lm for submit@debbugs.gnu.org; Wed, 08 Feb 2023 12:24:10 -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 1pPoAz-0005Rf-9T for guix-patches@gnu.org; Wed, 08 Feb 2023 12:24:09 -0500 Received: from mira.cbaines.net ([212.71.252.8]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPoAx-00060L-BK for guix-patches@gnu.org; Wed, 08 Feb 2023 12:24:08 -0500 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:54d1:d5d4:280e:f699]) by mira.cbaines.net (Postfix) with ESMTPSA id 8655116303; Wed, 8 Feb 2023 17:24:04 +0000 (GMT) Received: from felis (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 633e2305; Wed, 8 Feb 2023 17:24:03 +0000 (UTC) References: <62b19db61f34b63e37ba204fd9691b97d5c245bb.1673202235.git.simon@simonsouth.net> User-agent: mu4e 1.8.11; emacs 28.2 From: Christopher Baines To: Simon South Subject: Re: [bug#60429] [PATCH v2 4/5] gnu: yosys: Propagate external dependencies. Date: Wed, 08 Feb 2023 17:14:59 +0000 In-reply-to: <62b19db61f34b63e37ba204fd9691b97d5c245bb.1673202235.git.simon@simonsouth.net> Message-ID: <87357g6pfz.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: 60429@debbugs.gnu.org, guix-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Simon South writes: > * gnu/packages/fpga.scm (yosys)[inputs]: Move graphviz, psmisc, xdot from > here... > [propagated-inputs]: ...to here, to ensure the availability at runtime of > executables invoked by yosys' "show" command. > [arguments]: Remove now-obsolete "fix-paths" phase. > --- > gnu/packages/fpga.scm | 20 +++++--------------- > 1 file changed, 5 insertions(+), 15 deletions(-) > > diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm > index 8effebd921..785d385621 100644 > --- a/gnu/packages/fpga.scm > +++ b/gnu/packages/fpga.scm > @@ -157,16 +157,6 @@ (define-public yosys > (string-append "PREFIX=" #$output)) > #:phases > #~(modify-phases %standard-phases > - (add-before 'configure 'fix-paths > - (lambda* (#:key inputs #:allow-other-keys) > - (substitute* "./passes/cmds/show.cc" > - (("exec xdot") > - (string-append "exec " (search-input-file inputs > - "/bin/xdot"))) > - (("dot -") > - (string-append (search-input-file inputs "/bin/dot") " -")) > - (("fuser") > - (search-input-file inputs "/bin/fuser"))))) > (replace 'configure > (lambda* (#:key make-flags #:allow-other-keys) > (apply invoke "make" "config-gcc" make-flags))) > @@ -211,14 +201,14 @@ (define-public yosys > python > tcl)) ; tclsh for the tests > (inputs > - (list graphviz > - libffi > - psmisc > + (list libffi > readline > - tcl > - xdot)) > + tcl)) > (propagated-inputs > (list abc > + graphviz ; for dot > + psmisc ; for fuser > + xdot > z3)) ; should be in path for yosys-smtbmc > (home-page "https://yosyshq.net/yosys/") > (synopsis "FPGA Verilog RTL synthesizer") Thanks Simon, I've pushed the first 3 patches from this series to the master branch now. For the changes regarding propagated-inputs though, I'm not sure this it the right direction. Firstly, I think it's possible (and maybe desirable) to keep the 'fix-paths phase, even if the inputs are changed to be propagated. 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? Thanks, Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmPj2rBfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9Xfbog/+IEgcaWo8mnj6zY6uN1a4HiLzXXMcb6DF O4q0IVYWpN3YH4TvFKmrROZ5A0yRr48ATnG3lrxX/WlAxwsPCxysflz4x3sITvP1 yfgyTsxW+i0Ep6BjkvCa6Sr7Gnb72imPU14nnKDLdaPhk3zA9KXY2aGQ8lpnvWMS Nq+/PyPVADzaTL6cwbzuoVYtCOaba6v9WoUepgMIPw4n9BgsTbKdEami5Uz4im3i 4nNTgchvT0WdZnTAZNUyIdMooeuAjdSTogaypDC7sXSJapMcCLZv1F9RsoinXh1B gwutVJnV3kmNnmRi4KV/I8YM8YruhR7zd5atyorXTEfLeGKxUhxIQtSRfRCGC4kx 86eDw5pRDVdjRZ9zTUSQ1MkBZGp0qcpk9Of6s/7HWgcVYDO0Z8gGRHG0ZTIzmh30 tIROonm5QhAFGAGNhfrbJGfkcS0ZiqVBoZQg/I4VByEuDxti4ZW7OCQ6Dtgm9xOP VIF05xj9p4X5NsD8N4o1ocxjhAM144YViQ2THYHqbarm/g9zVkTV+TTR5NbHmscz NA/KhYRAXKQN6cNUV84iarg6Vwt5gbmcIOYEZBf5WIUsadr+qWidguKw7atXz/uP Qik07oK3nJhR+6EPOKJM1LNHyjtNopG5HuF/qHtw+g9dOg4aoUOskNmsnPxedBSW bbZGdL89X/o= =rYkZ -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 08 19:35:44 2023 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 To: Christopher Baines Subject: Re: [bug#60429] [PATCH v2 4/5] gnu: yosys: Propagate external dependencies. 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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60429 Cc: 60429@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 09 00:29:40 2023 Received: (at 60429) by debbugs.gnu.org; 9 Feb 2023 05:29:40 +0000 Received: from localhost ([127.0.0.1]:57203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPzV5-00034N-Ma for submit@debbugs.gnu.org; Thu, 09 Feb 2023 00:29:39 -0500 Received: from mail-ej1-f67.google.com ([209.85.218.67]:38782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPzV0-000344-Nv for 60429@debbugs.gnu.org; Thu, 09 Feb 2023 00:29:37 -0500 Received: by mail-ej1-f67.google.com with SMTP id gr7so3151540ejb.5 for <60429@debbugs.gnu.org>; Wed, 08 Feb 2023 21:29:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=3HeJ5kIdQRHkUOdLsQBix+mBO/m0Kt9D+rm/qrKa4uk=; b=VEFxCMflEXstM6RyU18vXcGDES6YlNxZBOjjqM6Bpg6dQqnX1aLQWV5yowIs0VOhqU Qa5BW5xX7WV/QB4YwVj4UHL9o6br6HBu1JsTUH/NIh+YDa4Th7EKbcov2h2lz3ajqS1T KAvY/xG9r3ZK0aOMZMZn+QbiKXdei/eK6MdvPlATvk+Wup3CN4jp691708Ci6bnG8ifS 8s2tvmwDeTFCKR5TIWUIymhT6t4JqIl+9pkmcKSwhu6NkR7Wc0TlkNnVBsfawl8jKoBa K3HmiVwoqjh/N9vaDUJSVwYPYAg00bQ7LTUWc3NSnzRJjE8xaY8c7fzmvH+5IVNgS0Y3 yajA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=3HeJ5kIdQRHkUOdLsQBix+mBO/m0Kt9D+rm/qrKa4uk=; b=VxsPNpyDNQm2NLTL4PSGs0JtRD9bM2dKMX6YUz6b20Sr7jjF2GysLDdLVadFUe5/iM fh/lFfralomfFanLRiokWIan/cPf/MGqRuUh9XveYKkoZcuCyrM17bFV9XsyMW1k1ayJ H5sWt1VcoKVDCFVCHbyD1EckVW27+uihRiFEWOAHI3cd9hLwNi5w1DKYLtiyyeYBUAFC oi5jqpICZwduPGBKF9m77G5kw2xtoqSGF4IKXbA3N0xglNbBkL7fKboVFNzL4/rWEqOD +iwfoVPxAAReNpyi3CVpOxIYf3z1Jp2Vl07A5ubI++j9LX2BrQTJ0SmCocVjQd79gd8B alNA== X-Gm-Message-State: AO0yUKWHAzTGCW+d2vYubtYUfqv3DolNKAnzXt36WWq5B+AhsCgvXatU x2C/3X+fmL9OPF0aeVx6fqM= X-Google-Smtp-Source: AK7set++4hDY+n9t3nFOGU9OcqH4yCYF1dWgm3FLhNN2DAfgOsJbwoEj3GBT1KCh0dn9zm12V8s0Mw== X-Received: by 2002:a17:906:5246:b0:8af:4120:63a8 with SMTP id y6-20020a170906524600b008af412063a8mr235196ejm.68.1675920568514; Wed, 08 Feb 2023 21:29:28 -0800 (PST) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id a12-20020a17090640cc00b008a47ee398a9sm392102ejk.47.2023.02.08.21.29.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 21:29:27 -0800 (PST) Message-ID: Subject: Re: [bug#60429] [PATCH v2 4/5] gnu: yosys: Propagate external dependencies. From: Liliana Marie Prikler To: Simon South , Christopher Baines Date: Thu, 09 Feb 2023 06:29:26 +0100 In-Reply-To: <87v8kb7k19.fsf@simonsouth.net> References: <62b19db61f34b63e37ba204fd9691b97d5c245bb.1673202235.git.simon@simonsouth.net> <87357g6pfz.fsf@cbaines.net> <87v8kb7k19.fsf@simonsouth.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.0 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60429 Cc: 60429@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Am Mittwoch, dem 08.02.2023 um 19:35 -0500 schrieb Simon South: > Yosys' "show" command produces its output by building and executing a > shell command that invokes "dot" or "xdot" on the user's data.=C2=A0 The > implementation is in passes/cmds/show.cc[0]; the code for invoking > dot for instance looks like >=20 > =C2=A0=C2=A0=C2=A0 #define DOT_CMD "dot -T%s '%s' > '%s.new' && mv '%s.ne= w' '%s'" > =C2=A0=C2=A0=C2=A0 (...) > =C2=A0=C2=A0=C2=A0 std::string cmd =3D stringf(DOT_CMD, format.c_str(), > dot_file.c_str(), out_file.c_str(), out_file.c_str(), > out_file.c_str()); > =C2=A0=C2=A0=C2=A0 log("Exec: %s\n", cmd.c_str()); > =C2=A0=C2=A0=C2=A0 if (run_command(cmd) !=3D 0) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 log_cmd_error("Shell command f= ailed!\n"); >=20 > 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.=C2=A0 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). >=20 > 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. When propagating inputs, it creates the same tight coupling as hardcoding would, but with worse UX (think propagating conflicts). You should instead try: std::optional dot_bin =3D which("dot") if (!dot_bin) dot_bin =3D "@dot@"; std::string cmd =3D string(DOT_CMD, *dot_bin, ...) Cheers From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 09 11:47:13 2023 Received: (at 60429) by debbugs.gnu.org; 9 Feb 2023 16:47:13 +0000 Received: from localhost ([127.0.0.1]:33524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQA4n-0004d1-Eg for submit@debbugs.gnu.org; Thu, 09 Feb 2023 11:47:13 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:50294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQA4k-0004cl-TP for 60429@debbugs.gnu.org; Thu, 09 Feb 2023 11:47:11 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 3A15768397; Thu, 9 Feb 2023 16:47:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo09-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo09-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bkeAVbTrk_xu; Thu, 9 Feb 2023 16:47:05 +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 DB1FF68352; Thu, 9 Feb 2023 16:47:04 +0000 (UTC) From: Simon South To: Liliana Marie Prikler Subject: Re: [bug#60429] [PATCH v2 4/5] gnu: yosys: Propagate external dependencies. References: <62b19db61f34b63e37ba204fd9691b97d5c245bb.1673202235.git.simon@simonsouth.net> <87357g6pfz.fsf@cbaines.net> <87v8kb7k19.fsf@simonsouth.net> Date: Thu, 09 Feb 2023 11:47:04 -0500 In-Reply-To: (Liliana Marie Prikler's message of "Thu, 09 Feb 2023 06:29:26 +0100") Message-ID: <87zg9meqgn.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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60429 Cc: 60429@debbugs.gnu.org, Christopher Baines X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Liliana Marie Prikler writes: > You should instead try: That would be a nice approach but I don't really want to start modifying the source code. I'll send out a v3 of the remaining patches that keeps the 'fix-paths phase (and updates Yosys to 0.26, since that came out yesterday). Embedding store references directly in source code still feels ugly to me but I can see how propagating packages just creates a different problem. Pity there isn't an elegant way to specify a package should "use this input, but not exclusively" (though at least there's "guix build --with-input"). -- Simon South simon@simonsouth.net From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 10 08:17:06 2023 Received: (at 60429) by debbugs.gnu.org; 10 Feb 2023 13:17:06 +0000 Received: from localhost ([127.0.0.1]:34480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQTH0-0003U3-8Q for submit@debbugs.gnu.org; Fri, 10 Feb 2023 08:17:06 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:38960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQTGy-0003TF-Ay for 60429@debbugs.gnu.org; Fri, 10 Feb 2023 08:17:04 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 54ABFE8865 for <60429@debbugs.gnu.org>; Fri, 10 Feb 2023 13:16:58 +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 Fyq_a391S5Ix for <60429@debbugs.gnu.org>; Fri, 10 Feb 2023 13:16:58 +0000 (UTC) Received: from localhost.localdomain (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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id EA1B3E87D1 for <60429@debbugs.gnu.org>; Fri, 10 Feb 2023 13:16:57 +0000 (UTC) From: Simon South To: 60429@debbugs.gnu.org Subject: [PATCH v3 0/5] gnu: yosys: Update to 0.24. Date: Fri, 10 Feb 2023 08:16:53 -0500 Message-Id: X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60429 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Here's a third revision of the remaining two patches in this series. These updated patches now - Remove the remaining propagated inputs (abc and z3) from the yosys package via changes to its "fix-paths" and "use-external-abc" phases, and - Update Yosys to version 0.26. Note the second patch adds python and python-click as new propagated inputs. The Click library is needed by the "yosys-witness" command, and including both it and the Python interpreter in propagated-inputs is the only combination I've found that will cause Guix to set GUIX_PYTHONPATH appropriately on installation so this command can function. This appears to be supported by the Guix manual (in the sections "Search Paths" and "Python Modules") but if there's a better approach, please let me know. As usual, I've tested these changes on x86-64 and AArch64 and all appears well. -- Simon South simon@simonsouth.net Simon South (2): gnu: yosys: Do not propagate any inputs. gnu: yosys: Update to 0.26. gnu/packages/fpga.scm | 56 +++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 32 deletions(-) base-commit: b8f6ead5faac3c1b9a8fa6e060c00cf0917e884e -- 2.39.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 10 08:17:07 2023 Received: (at 60429) by debbugs.gnu.org; 10 Feb 2023 13:17:07 +0000 Received: from localhost ([127.0.0.1]:34482 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQTH0-0003U6-JI for submit@debbugs.gnu.org; Fri, 10 Feb 2023 08:17:07 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:38968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQTGy-0003TG-B0 for 60429@debbugs.gnu.org; Fri, 10 Feb 2023 08:17:04 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 715E3E87D1 for <60429@debbugs.gnu.org>; Fri, 10 Feb 2023 13:16:58 +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 l9zLtOBPBi6w for <60429@debbugs.gnu.org>; Fri, 10 Feb 2023 13:16:58 +0000 (UTC) Received: from localhost.localdomain (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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 0E886E881B for <60429@debbugs.gnu.org>; Fri, 10 Feb 2023 13:16:58 +0000 (UTC) From: Simon South To: 60429@debbugs.gnu.org Subject: [PATCH v3 4/5] gnu: yosys: Do not propagate any inputs. Date: Fri, 10 Feb 2023 08:16:54 -0500 Message-Id: <2341e855934118580304aaf92195878fc6c71dff.1676033083.git.simon@simonsouth.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60429 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/fpga.scm (yosys)[arguments]<#:phases>: Patch reference to z3 in "fix-paths" phase; in "use-external-abc" phase, use complete path to "abc" executable in store. [propagated-inputs]: Remove, moving abc and z3 from here... [inputs]: ...to here. --- gnu/packages/fpga.scm | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 7b3c522bf7..4a01714e81 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -159,6 +159,9 @@ (define-public yosys #~(modify-phases %standard-phases (add-before 'configure 'fix-paths (lambda* (#:key inputs #:allow-other-keys) + (substitute* "./backends/smt2/smtio.py" + (("\\['z3") + (string-append "['" (search-input-file inputs "/bin/z3")))) (substitute* "./passes/cmds/show.cc" (("exec xdot") (string-append "exec " (search-input-file inputs @@ -171,9 +174,11 @@ (define-public yosys (lambda* (#:key make-flags #:allow-other-keys) (apply invoke "make" "config-gcc" make-flags))) (add-after 'configure 'use-external-abc - (lambda _ + (lambda* (#:key inputs #:allow-other-keys) (substitute* '("./Makefile") - (("ABCEXTERNAL \\?=") "ABCEXTERNAL = abc")))) + (("ABCEXTERNAL \\?=") + (string-append "ABCEXTERNAL = " + (search-input-file inputs "/bin/abc")))))) (add-before 'check 'fix-iverilog-references (lambda* (#:key inputs native-inputs #:allow-other-keys) (let ((iverilog (search-input-file (or native-inputs inputs) @@ -211,15 +216,14 @@ (define-public yosys python tcl)) ; tclsh for the tests (inputs - (list graphviz + (list abc + graphviz libffi psmisc readline tcl - xdot)) - (propagated-inputs - (list abc - z3)) ; should be in path for yosys-smtbmc + xdot + z3)) (home-page "https://yosyshq.net/yosys/") (synopsis "FPGA Verilog RTL synthesizer") (description "Yosys synthesizes Verilog-2005.") -- 2.39.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 10 08:17:11 2023 Received: (at 60429) by debbugs.gnu.org; 10 Feb 2023 13:17:11 +0000 Received: from localhost ([127.0.0.1]:34484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQTH4-0003UL-9S for submit@debbugs.gnu.org; Fri, 10 Feb 2023 08:17:11 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:38988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQTGy-0003TK-Dn for 60429@debbugs.gnu.org; Fri, 10 Feb 2023 08:17:06 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id D31F0E881B for <60429@debbugs.gnu.org>; Fri, 10 Feb 2023 13:16:58 +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 xIkOpwCQYrSq for <60429@debbugs.gnu.org>; Fri, 10 Feb 2023 13:16:58 +0000 (UTC) Received: from localhost.localdomain (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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 275CBE885F for <60429@debbugs.gnu.org>; Fri, 10 Feb 2023 13:16:58 +0000 (UTC) From: Simon South To: 60429@debbugs.gnu.org Subject: [PATCH v3 5/5] gnu: yosys: Update to 0.26. Date: Fri, 10 Feb 2023 08:16:55 -0500 Message-Id: <86a0feb6df92cf2765408198627925e6fd88decd.1676033083.git.simon@simonsouth.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60429 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/fpga.scm (yosys): Update to 0.26. [source]: Disable unnecessary recursive checkout. [arguments]<#:phases>: Expand "fix-paths" phase to match new version; remove obsolete "fix-iverilog-references" phase. [inputs]: Add gtkwave, zlib. [propagated-inputs]: Add python, python-click. --- gnu/packages/fpga.scm | 42 +++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 4a01714e81..8f03ba7a1d 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -137,16 +137,15 @@ (define-public iverilog (define-public yosys (package (name "yosys") - (version "0.9") + (version "0.26") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/YosysHQ/yosys") - (commit (string-append "yosys-" version)) - (recursive? #t))) ; for the ‘iverilog’ submodule + (commit (string-append "yosys-" version)))) (sha256 - (base32 - "0lb9r055h8y1vj2z8gm4ip0v06j5mk7f9zx9gi67kkqb7g4rhjli")) + (base32 + "0s79ljgbcfkm7l9km7dcvlz4mnx38nbyxppscvh5il5lw07n45gx")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments @@ -162,7 +161,11 @@ (define-public yosys (substitute* "./backends/smt2/smtio.py" (("\\['z3") (string-append "['" (search-input-file inputs "/bin/z3")))) - (substitute* "./passes/cmds/show.cc" + (substitute* "./kernel/fstdata.cc" + (("vcd2fst") + (search-input-file inputs "/bin/vcd2fst"))) + (substitute* '("./passes/cmds/show.cc" + "./passes/cmds/viz.cc") (("exec xdot") (string-append "exec " (search-input-file inputs "/bin/xdot"))) @@ -179,26 +182,6 @@ (define-public yosys (("ABCEXTERNAL \\?=") (string-append "ABCEXTERNAL = " (search-input-file inputs "/bin/abc")))))) - (add-before 'check 'fix-iverilog-references - (lambda* (#:key inputs native-inputs #:allow-other-keys) - (let ((iverilog (search-input-file (or native-inputs inputs) - "/bin/iverilog"))) - (substitute* '("./manual/CHAPTER_StateOfTheArt/synth.sh" - "./manual/CHAPTER_StateOfTheArt/validate_tb.sh" - "./techlibs/ice40/tests/test_bram.sh" - "./techlibs/ice40/tests/test_ffs.sh" - "./techlibs/xilinx/tests/bram1.sh" - "./techlibs/xilinx/tests/bram2.sh" - "./tests/bram/run-single.sh" - "./tests/realmath/run-test.sh" - "./tests/simple/run-test.sh" - "./tests/techmap/mem_simple_4x1_runtest.sh" - "./tests/tools/autotest.sh" - "./tests/vloghtb/common.sh") - (("if ! which iverilog") "if ! true") - (("iverilog ") (string-append iverilog " ")) - (("iverilog_bin=\".*\"") (string-append "iverilog_bin=\"" - iverilog "\"")))))) (add-after 'install 'add-symbolic-link (lambda* (#:key inputs #:allow-other-keys) ;; Previously this package provided a copy of the "abc" @@ -218,12 +201,17 @@ (define-public yosys (inputs (list abc graphviz + gtkwave libffi psmisc readline tcl xdot - z3)) + z3 + zlib)) + (propagated-inputs + (list python + python-click)) (home-page "https://yosyshq.net/yosys/") (synopsis "FPGA Verilog RTL synthesizer") (description "Yosys synthesizes Verilog-2005.") -- 2.39.1 From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 11 15:41:45 2023 Received: (at submit) by debbugs.gnu.org; 11 Feb 2023 20:41:45 +0000 Received: from localhost ([127.0.0.1]:43291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQwgr-0002fK-AW for submit@debbugs.gnu.org; Sat, 11 Feb 2023 15:41:45 -0500 Received: from lists.gnu.org ([209.51.188.17]:58302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQwgo-0002f9-HJ for submit@debbugs.gnu.org; Sat, 11 Feb 2023 15:41:42 -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 1pQwgo-0005q9-Bw for guix-patches@gnu.org; Sat, 11 Feb 2023 15:41:42 -0500 Received: from mira.cbaines.net ([212.71.252.8]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQwgm-0006pz-RM for guix-patches@gnu.org; Sat, 11 Feb 2023 15:41:42 -0500 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:3a91:a0a4:ecee:f157]) by mira.cbaines.net (Postfix) with ESMTPSA id 818121623C; Sat, 11 Feb 2023 20:41:39 +0000 (GMT) Received: from felis (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 34f24f66; Sat, 11 Feb 2023 20:41:38 +0000 (UTC) References: User-agent: mu4e 1.8.11; emacs 28.2 From: Christopher Baines To: Simon South Subject: Re: [bug#60429] [PATCH v3 0/5] gnu: yosys: Update to 0.24. Date: Sat, 11 Feb 2023 20:38:02 +0000 In-reply-to: Message-ID: <878rh453zz.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: 60429-done@debbugs.gnu.org, guix-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Simon South writes: > Here's a third revision of the remaining two patches in this series. These > updated patches now > > - Remove the remaining propagated inputs (abc and z3) from the yosys package > via changes to its "fix-paths" and "use-external-abc" phases, and > > - Update Yosys to version 0.26. Thanks for the update, I made a tweak and pushed these to master as 8553148dfb91a9957b95c7bc6bc108cc0a973f9e. > Note the second patch adds python and python-click as new propagated inputs. > The Click library is needed by the "yosys-witness" command, and including both > it and the Python interpreter in propagated-inputs is the only combination > I've found that will cause Guix to set GUIX_PYTHONPATH appropriately on > installation so this command can function. > > This appears to be supported by the Guix manual (in the sections "Search > Paths" and "Python Modules") but if there's a better approach, please let me > know. I believe the good approach to do this is to wrap the relevant script. I've gone ahead and changed the patch to do this rather than add the propagated inputs. Do let me know if there's a problem with this approach though, as I don't know how to test this software as well as you. Thanks again, Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmPn/YBfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9Xdqgw//ScUtuC3TP42e1Qih3uI68jDjING2Rs9M PMbMt8TY3mX+keMluiO8hDJiPBha+NTjWe+9ntcqAaddYa3WRzgEL3XPYWgJcW+/ bO0Fgpl7beRK68KgxU+e/BR1ijwY9DBA5mjBNhzp9r3iTt6xpZ//CeiMKedkoC/n TQjtB9jfxnWSTNO6r2LDxo6yn4C/YUsg7EnR0dMr4Ah+SaKwkomqPpZBa6b8CxYA NkCARmS2xnFBGpsa3idAvA7GNDMlLXvrkXqVuK6AuIcRZ/1EF5sm8RE3RQbrAjag nwB2QcyMXEAfz27+SVN5HIKBzxnLuC77PUja6PmLhLeuuroW4I1PAX3GYG6bITFD 9xtHx4s34ybAyM4CDWY2I7x9VxBPHmAu5fLdXi7ji1QOweHnAyIDDqefbE7F8XB/ cpLYyE0p9vFOsngR/jtqfwJ16C8SxgxECaHywkmSxO1hiaRdBT54t1VkH+mMU6XK eguY/NAWSxtl0K6tR6PN1l0/zeCbtyNzakO0bOzwgFj1DXmPGhZz3OFPGujCHHSI vPf9d9qRutz3BbK3obzxPY5ocGPOE+Nz8f+Ekh7CxL+2JxFkdZBJd1dWB8z/j9Pm x1U90IZO5XCVTKI9m501CPsjOjeEPDgPvu9S9HjA5L0/I0fPQJnUckayebXgL/OS EVT1R/iNC4Y= =mZDd -----END PGP SIGNATURE----- --=-=-=-- From unknown Tue Jun 17 22:02:02 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 12 Mar 2023 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator