From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Trofimovich Subject: Re: cross-compiling in core-updates Date: Tue, 2 May 2017 20:03:15 +0100 Message-ID: <20170502200309.2ee511e8@sf> References: <20170425222658.785f93da@sf> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/kK.=gflJ5DcPk26OxXfjxOf"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42099) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5d5E-0002z2-Dv for Guix-devel@gnu.org; Tue, 02 May 2017 15:03:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d5d5D-0001fH-Ag for Guix-devel@gnu.org; Tue, 02 May 2017 15:03:36 -0400 In-Reply-To: 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+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Andy Wingo Cc: Guix-devel , rennes --Sig_/kK.=gflJ5DcPk26OxXfjxOf Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 02 May 2017 09:14:21 +0200 Andy Wingo wrote: > On Fri 28 Apr 2017 21:04, Manolis Ragkousis writes: >=20 > > The reason for the cascading errors is bash-minimal. > > > > Trying to build `./pre-inst-env guix build bash-minimal' > > on core-updates ends up with : > > > > The following derivation will be built: > > /gnu/store/1r0fpfcik796g2b5v9ns163sgan1rkmz-bash-minimal-4.4.12.drv > > @ build-started > > /gnu/store/1r0fpfcik796g2b5v9ns163sgan1rkmz-bash-minimal-4.4.12.drv - > > x86_64-linux > > /usr/local/var/log/guix/drvs/1r//0fpfcik796g2b5v9ns163sgan1rkmz-bash-mi= nimal-4.4.12.drv.bz2 > > ice-9/psyntax.scm:1534:32: In procedure expand-macro: > > ice-9/psyntax.scm:1534:32: Syntax error: > > /gnu/store/k84sww1zzh33a5hw8bcmsa5yp7w628a8-bash-minimal-4.4.12-guile-b= uilder:1:2285: > > source expression failed to match any pattern in form (%modify-phases > > phases* (delete (quote move-development-files))) > > builder for > > `/gnu/store/1r0fpfcik796g2b5v9ns163sgan1rkmz-bash-minimal-4.4.12.drv' > > failed with exit code 1 > > @ build-failed > > /gnu/store/1r0fpfcik796g2b5v9ns163sgan1rkmz-bash-minimal-4.4.12.drv - 1 > > builder for > > `/gnu/store/1r0fpfcik796g2b5v9ns163sgan1rkmz-bash-minimal-4.4.12.drv' > > failed with exit code 1 > > guix build: error: build failed: build of > > `/gnu/store/1r0fpfcik796g2b5v9ns163sgan1rkmz-bash-minimal-4.4.12.drv' f= ailed > > > > It's the same issue Sergei reported and commit 78dea6f1d4a did not fix = it. =20 >=20 > Hi! >=20 > I suspect I know what this is. First, the package in question: >=20 > (define-public bash-minimal > ;; A stripped-down Bash for non-interactive use. > (package (inherit bash) > (name "bash-minimal") > (inputs '()) ; no readline, no curses >=20 > ;; No "include" output because there's no support for loadable modu= les. > (outputs (delete "include" (package-outputs bash))) >=20 > (arguments > (let ((args `(#:modules ((guix build gnu-build-system) > (guix build utils) > (srfi srfi-1) > (srfi srfi-26)) > ,@(package-arguments bash)))) > (substitute-keyword-arguments args > ((#:configure-flags flags) > `(list "--without-bash-malloc" > "--disable-readline" > "--disable-history" > "--disable-help-builtin" > "--disable-progcomp" > "--disable-net-redirections" > "--disable-nls" >=20 > ;; Pretend 'dlopen' is missing so we don't build loada= ble > ;; modules and related code. > "ac_cv_func_dlopen=3Dno" >=20 > ,@(if (%current-target-system) > '("bash_cv_job_control_missing=3Dno" > "bash_cv_getcwd_malloc=3Dyes") > '()))) > ((#:phases phases) > `(modify-phases ,phases > ;; No loadable modules. > (delete 'move-development-files)))))))) >=20 > So you are aware of the change in Guile regarding "keyword" matching in > macros. In this case the "delete" in the modify-phases macro is a > keyword. Whereas before in Guile, they were only matched by name, now > they are matched by binding. If the keyword was bound where the macro > was defined, then it will only be matched to identifiers bound to the > same variable when the macro is used. Otherwise if the keyword was > unbound when the macro was defined, then it will match by name, but only > if the name is also unbound at the macro use. >=20 > In (guix build utils), `delete' is bound to "delete" from (srfi srfi-1). > In the bash package definition, I am not sure what the scope is because > it's staged. However let's assume that the #:modules bit intends to > make it so that srfi-1 is present also in the bash-minimal module. That > should work, right? Except I think because the bash package *also* > defines a #:modules argument, that will result in: >=20 > #:modules the-bash-minimal-modules ... #:modules the-bash-modules >=20 > and the last keyword wins. So, perhaps try putting the > ,@(package-arguments bash) first in this list? >=20 > (#:modules ((guix build gnu-build-system) > (guix build utils) > (srfi srfi-1) > (srfi srfi-26)) > ,@(package-arguments bash)) Yay! The following patch makes bash-minimal compile fine! diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index ef22728a9..38aa1786e 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -213,7 +213,7 @@ without modification.") (arguments - (let ((args `(#:modules ((guix build gnu-build-system) + (let ((args `(,@(package-arguments bash) + #:modules ((guix build gnu-build-system) (guix build utils) (srfi srfi-1) - (srfi srfi-26)) - ,@(package-arguments bash)))) + (srfi srfi-26))))) (substitute-keyword-arguments args I'm afraid I understood almost nothing about your comments of=20 visibility. The only thing I've got is that keyword argument order matters :) Would the similar ordering change have the no-op effect in master branch or does it mean core-updates should do this reordering while master should not? Thank you! --=20 Sergei --Sig_/kK.=gflJ5DcPk26OxXfjxOf Content-Type: application/pgp-signature Content-Description: Цифровая подпись OpenPGP -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSZKa0VG5avZRlY01hxoe52YR/zqgUCWQjX8wAKCRBxoe52YR/z qhbkAJwMRE8TaximWAx1NClEvVezeqa1MgCdGxAQhV9jS39YCsqzohDOLaytz1Q= =eBtd -----END PGP SIGNATURE----- --Sig_/kK.=gflJ5DcPk26OxXfjxOf--