From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id cIbSDl5+iWPNYQAAbAwnHQ (envelope-from ) for ; Fri, 02 Dec 2022 05:26:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id ADjwDl5+iWPUPwEAauVa8A (envelope-from ) for ; Fri, 02 Dec 2022 05:26:06 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0C36629E29 for ; Fri, 2 Dec 2022 05:26:05 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0xcC-0003e0-IN; Thu, 01 Dec 2022 23:25:32 -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 1p0xcA-0003c7-Tz for guix-devel@gnu.org; Thu, 01 Dec 2022 23:25:31 -0500 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p0xc8-0008Kj-2Q for guix-devel@gnu.org; Thu, 01 Dec 2022 23:25:29 -0500 Received: by mail-qt1-x836.google.com with SMTP id l15so3726551qtv.4 for ; Thu, 01 Dec 2022 20:25:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=keM84E9/KNdvJF4Dgvnn+asabqN6wEvl6ChEzRJbOa8=; b=UfDMtKXrVep64xDALjZxmHd5fII/Dmlkvt43orz9A42p6Qoym7ZytCKZ58wFyqoNWk SeqcLO2YAJOB6N/bTsVn3yztp+7bGxYFZiZWnnYMgYZF+l8hWVOyYMXkEe08LG39aNJb 0Xgh9+d6ePBnP32bBKxm7y5WjWycysBy6gkqeaoBqbJQBoMUFGid/btPSJtTZKpHtrej JNBnf3cjgD2C8BEOlG1RQGGiHIIwyUEHIhVqU4u6E3+NqmAgvPlk/LN6y1SDDBwd2sS/ /+6mgD0VO3vFhagkeWymMxDV75blyI4Y2D51P3aD4bKVQjbchcgOTjJ3TamF0lClt0m9 0kvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=keM84E9/KNdvJF4Dgvnn+asabqN6wEvl6ChEzRJbOa8=; b=Renp6p25nZdWYfYUGMvKS0H/nkqluFLOvd3E+1pYIXRA3tjCU5z0yn2BsahMGAq1MA yU5dSdB/VnYsjyYMI4zsg/cUI+Lz/NovBC/VZ7AV2b+qz7F9EPsRq2pjbaJkb9v24IdL Dk19Hk9QAHWwy+ii6vQvpHqy4yNznKg+yxOehxsp1+OmXc5N6cuocXHP7tFCIkbXQQaK An9HyQNdoFcPta+s05bgdxsAhtt96QzIbK+EhV4Ofvov4pxqoRF9xM1oSIPx0Zw5+ONX Iyl+REMobjrLGqqep9zesn0rxlkGRyGplPZ674jbfuY5Gj/na0iPvlD7zuYaPkXmfwtw ZN0w== X-Gm-Message-State: ANoB5pkmnsWGNSR7ILWP4rtJz11ti5lNfRoQjGlycv9vAY7Mt/ySk7ub Iy4LN50E3NXDLqB9uD15e8sPXy/Ki+w= X-Google-Smtp-Source: AA0mqf5plPlxOJoTeWY9yDSdnLCtVTQOaRx1/dZ+TuMy+ZWPomvegJcBbC5gxBpHZo65/Y93xtWUmQ== X-Received: by 2002:ac8:1411:0:b0:3a4:fe13:5274 with SMTP id k17-20020ac81411000000b003a4fe135274mr65185142qtj.381.1669955126448; Thu, 01 Dec 2022 20:25:26 -0800 (PST) Received: from hurd ([2607:fad8:4:3::1001]) by smtp.gmail.com with ESMTPSA id l27-20020ac84cdb000000b00399fe4aac3esm3514178qtv.50.2022.12.01.20.25.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Dec 2022 20:25:26 -0800 (PST) From: Maxim Cournoyer To: guix-devel Subject: Circular dependency woes with gcc variables Date: Thu, 01 Dec 2022 23:25:25 -0500 Message-ID: <87pmd2h1oq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::836; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x836.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-TUID: nmdyAmeKCBOD Hi, After struggling for a couple hours (!) with top level cycles when attempting to use the procedures from (gnu packages cross-base), I've decided to try to have top level pre-defined variables for these in a new module. The idea was that a new module could minimize the inter-dependencies at the top level: Put in : gnu/packages/cross-toolchains.scm --8<---------------cut here---------------start------------->8--- (define-module (gnu packages cross-toolchains) #:use-module (gnu packages cross-base) #:autoload (gnu packages gcc) (gcc-9)) (define-public xgcc-armhf (let ((triplet "arm-linux-gnueabihf")) (cross-gcc triplet #:xbinutils (cross-binutils triplet) #:libc (cross-libc triplet)))) (define-public xgcc-armhf-9 (let ((triplet "arm-linux-gnueabihf")) (cross-gcc triplet #:xgcc gcc-9 #:xbinutils (cross-binutils triplet) #:libc (cross-libc triplet #:xgcc gcc-9)))) --8<---------------cut here---------------end--------------->8--- And register in gnu/local.mk like: --8<---------------cut here---------------start------------->8--- modified gnu/local.mk @@ -185,6 +185,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/crates-graphics.scm \ %D%/packages/crates-gtk.scm \ %D%/packages/cross-base.scm \ + %D%/packages/cross-toolchains.scm \ %D%/packages/crypto.scm \ %D%/packages/cryptsetup.scm \ %D%/packages/cups.scm \ --8<---------------cut here---------------end--------------->8--- When we try to build, we get: --8<---------------cut here---------------start------------->8--- Compiling Scheme modules... [ 78%] LOAD gnu/packages/cross-toolchains.scm error: failed to load 'gnu/packages/cross-toolchains.scm': ice-9/eval.scm:293:34: No variable named gcc-9 in # --8<---------------cut here---------------end--------------->8--- Is there a way to get passed that? Everything I've tried (lazily resolving gcc-9, delaying via 'delay', etc. hasn't worked). It'd be nice to have the cross-compilers more readily available/usable. -- Thanks, Maxim