From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#31392: gnome.scm cannot import (gnu packages rust) Date: Thu, 10 May 2018 00:56:10 +0200 Message-ID: <87h8ngv3p1.fsf@gnu.org> References: <87vabwg5is.fsf@fastmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGY18-0000Xm-UM for bug-guix@gnu.org; Wed, 09 May 2018 18:57:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGY17-00054e-SO for bug-guix@gnu.org; Wed, 09 May 2018 18:57:03 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:47818) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGY17-00054a-Oy for bug-guix@gnu.org; Wed, 09 May 2018 18:57:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fGY17-000224-Hr for bug-guix@gnu.org; Wed, 09 May 2018 18:57:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87vabwg5is.fsf@fastmail.com> (Marius Bakke's message of "Wed, 09 May 2018 18:25:47 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Marius Bakke Cc: 31392@debbugs.gnu.org Hello, Marius Bakke skribis: > I'm trying to update librsvg, which requires "rust". Speaking of which, what are other distros doing? Are all of them switching to the Rust implementation, or are some keeping the C implementation? Not that I=E2=80=99m fond of C, but adding Rust (which is not bootstrapped, etc.) in this place can be problematic. > However adding this simple diff: > > --- a/gnu/packages/gnome.scm > +++ b/gnu/packages/gnome.scm > @@ -114,6 +114,7 @@ > #:use-module (gnu packages pulseaudio) > #:use-module (gnu packages python) > #:use-module (gnu packages rdesktop) > + #:use-module (gnu packages rust) > #:use-module (gnu packages scanner) > #:use-module (gnu packages selinux) > #:use-module (gnu packages slang) > > Causes the module to compile (sometimes), but any Guix action results in > a backtrace similar to this: Here=E2=80=99s a debugging trick (not as helpful as one might like, but sti= ll): --8<---------------cut here---------------start------------->8--- $ GUIX_PACKAGE_PATH=3D ./pre-inst-env guile GNU Guile 2.2.3 Copyright (C) 1995-2017 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> (primitive-load "gnu/packages/abiword.scm") gnu/packages/rust.scm:241:25: error: gcc: unbound variable Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(gnu packages rust) [1]> ,bt 1190 (primitive-load "gnu/packages/abiword.scm") In ice-9/eval.scm: 721:201189 (primitive-eval _) In ice-9/psyntax.scm: 1235:361188 (expand-top-sequence _ _ _ #f _ _ _) 1182:241187 (parse _ (("placeholder" placeholder)) ((top) #(ribcage () ()= ())) _ e # =E2=80=A6) 285:101186 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) (hyg= iene #)) In ice-9/eval.scm: 293:341185 (_ #) In ice-9/boot-9.scm: 2862:41184 (define-module* _ #:filename _ #:pure _ #:version _ #:imports= _ # _ # _ =E2=80=A6) 2071:241183 (call-with-deferred-observers _) 2875:241182 (_) 222:291181 (map1 _) 222:291180 (map1 _) 222:291179 (map1 _) 222:291178 (map1 _) 222:291177 (map1 _) 222:291176 (map1 _) 222:171175 (map1 (((gnu packages autotools)) ((gnu packages boost)) ((gn= u # #)) # =E2=80=A6)) 2788:171174 (resolve-interface (gnu packages autotools) #:select _ #:hide= _ #:prefix =E2=80=A6) [...] In unknown file: 22 (primitive-load-path "gnu/packages/gnome" #) In gnu/packages/gnome.scm: 49:0 21 (_) In ice-9/boot-9.scm: 2862:4 20 (define-module* _ #:filename _ #:pure _ #:version _ #:imports = _ #:exports =E2=80=A6) 2875:24 19 (_) 222:29 18 (map1 _) 222:29 17 (map1 _) 222:29 16 (map1 _) 222:29 15 (map1 _) 222:29 14 (map1 _) 222:29 13 (map1 _) 222:29 12 (map1 _) 222:29 11 (map1 _) 222:29 10 (map1 _) 222:29 9 (map1 _) 222:29 8 (map1 _) 222:17 7 (map1 (((gnu packages rust)) ((gnu packages admin)) ((gnu pack= ages #)) =E2=80=A6)) 2788:17 6 (resolve-interface (gnu packages rust) #:select _ #:hide _ #:p= refix _ # _ =E2=80=A6) 2714:10 5 (_ (gnu packages rust) _ _ #:ensure _) 2982:16 4 (try-module-autoload _ _) 2312:4 3 (save-module-excursion _) 3002:22 2 (_) In unknown file: 1 (primitive-load-path "gnu/packages/rust" #) In gnu/packages/rust.scm: 241:25 0 (_) scheme@(gnu packages rust) [1]> ,error gnu/packages/rust.scm:241:25: error: gcc: unbound variable --8<---------------cut here---------------end--------------->8--- The issue was the reference to =E2=80=98gcc=E2=80=99 from the =E2=80=98nati= ve-search-paths=E2=80=99 field (a =E2=80=9Ctop level reference=E2=80=9D because it=E2=80=99s execute= d as soon as we load rust.scm.) While Guile allows for circular dependencies among modules, it only works if the top-level of modules don=E2=80=99t look up variables exported by each other, if you see what I mean. Fixed in afc2bf53066975558676bc7f4957ad85d0ec170a. Thanks, Ludo=E2=80=99.