unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46826: [debian] compilation from git fails
@ 2021-02-28  8:03 cage
  2021-02-28  9:04 ` cage
  2021-03-01 11:42 ` Maxime Devos
  0 siblings, 2 replies; 6+ messages in thread
From: cage @ 2021-02-28  8:03 UTC (permalink / raw)
  To: 46826

Hi!

i tried to compile guix from git but the compilation fails with a syntax error, details below:

- OS Debian testing (bullseye)
- guix commit hash 8ef1f24f16354e08f23dfabf11396527b0417638 (master)
- $ guile --version
    guile (GNU Guile) 2.2.7

The error is:

$ make

[...]

guix/scripts/environment.scm:752:12: error: (define manifest (if profile (profile-manifest profile) manifest-from-opts)): definition in expression context, where definitions are not allowed,
make[2]: *** [Makefile:6246: make-go] Error 1


A    kind     user    suggested    to    comment     the    form    in
guix/scripts/environment.scm starting at line 178:

------------
(when (and profile
  (> (length (manifest-entries manifest-from-opts)) 0))
   (leave (G_ "'--profile' cannot be used with package options~%")))
-----------

After commenting the form above, the compilation works flawless.

Hope this help!
Bye!
C.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#46826: [debian] compilation from git fails
  2021-02-28  8:03 bug#46826: [debian] compilation from git fails cage
@ 2021-02-28  9:04 ` cage
  2021-03-01 11:42 ` Maxime Devos
  1 sibling, 0 replies; 6+ messages in thread
From: cage @ 2021-02-28  9:04 UTC (permalink / raw)
  To: 46826

Errata:

> guix/scripts/environment.scm starting at line 178:

line 748 actually.

Bye!
C.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#46826: [debian] compilation from git fails
  2021-02-28  8:03 bug#46826: [debian] compilation from git fails cage
  2021-02-28  9:04 ` cage
@ 2021-03-01 11:42 ` Maxime Devos
  2021-03-01 13:12   ` cage
  1 sibling, 1 reply; 6+ messages in thread
From: Maxime Devos @ 2021-03-01 11:42 UTC (permalink / raw)
  To: cage, 46826


[-- Attachment #1.1: Type: text/plain, Size: 1122 bytes --]

On Sun, 2021-02-28 at 09:03 +0100, cage wrote:

> [...]
> A    kind     user    suggested    to    comment     the    form    in
> guix/scripts/environment.scm starting at line 178:
> 
> ------------
> (when (and profile
>   (> (length (manifest-entries manifest-from-opts)) 0))
>    (leave (G_ "'--profile' cannot be used with package options~%")))
> -----------
> 
> After commenting the form above, the compilation works flawless.

The guile2.2-bytestructures dependency of guile2.2-guix is broken currently
(see https://issues.guix.gnu.org/46844), which makes my proposal somewhat annoying
to test ...

Perhaps replace (when COND STUFF) with (define _ (when COND STUFF))? That should
be ok for both guile2.2 and guile3.0.  It's not very aesthetical, but if the
alternative is putting everything below (when COND STUFF) in a let form
(leading to more indentation), perhaps that's ok.

cage, could you verify whether this patch works for you?

Greetings,
Maxime.
-- 
Maxime Devos <maximedevos@telenet.be>
PGP Key: C1F3 3EE2 0C52 8FDB 7DD7  011F 49E3 EE22 1917 25EE
Freenode handle: mdevos

[-- Attachment #1.2: 0001-scripts-environment-Replace-expression-with-definiti.patch --]
[-- Type: text/x-patch, Size: 1629 bytes --]

From 659e191c1e9d64a9cf7734db6e9bb99e47877344 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Mon, 1 Mar 2021 10:57:17 +0100
Subject: [PATCH] scripts: environment: Replace expression with definition.

This fixes the following build error when building guix with
GNU Guile 2.2.7 on Debian (bullseye) (reindented):

guix/scripts/environment.scm:752:12: error:
(define manifest (if profile (profile-manifest profile) manifest-from-opts)):
definition in expression context, where definitions are not allowed,

Fixes: <https://issues.guix.gnu.org/46826>.

* guix/scripts/environment.scm (guix-environment): Fix a syntax error
  on Guile 2.2.7.
---
 guix/scripts/environment.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index a39347743e..a28018e627 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -745,9 +745,10 @@ message if any test fails."
           (with-status-verbosity (assoc-ref opts 'verbosity)
             (define manifest-from-opts
               (options/resolve-packages store opts))
-            (when (and profile
-                       (> (length (manifest-entries manifest-from-opts)) 0))
-              (leave (G_ "'--profile' cannot be used with package options~%")))
+            (define _
+              (when (and profile
+                         (> (length (manifest-entries manifest-from-opts)) 0))
+                (leave (G_ "'--profile' cannot be used with package options~%"))))
 
             (define manifest
               (if profile
-- 
2.30.0


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#46826: [debian] compilation from git fails
  2021-03-01 11:42 ` Maxime Devos
@ 2021-03-01 13:12   ` cage
  2021-03-01 20:40     ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: cage @ 2021-03-01 13:12 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 46826, cage

On Mon, Mar 01, 2021 at 12:42:08PM +0100, Maxime Devos wrote:

Hi!

>
> Perhaps replace (when COND STUFF) with (define _ (when COND STUFF))? That should
> be ok for both guile2.2 and guile3.0.  It's not very aesthetical, but if the
> alternative is putting everything below (when COND STUFF) in a let form
> (leading to more indentation), perhaps that's ok.
>
> cage, could you verify whether this patch works for you?

I wrapped that form in a (define _ ...) and I was able to compile guix
without errors.

Bye!
C.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#46826: [debian] compilation from git fails
  2021-03-01 13:12   ` cage
@ 2021-03-01 20:40     ` Ludovic Courtès
  2021-03-02 19:39       ` cage
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2021-03-01 20:40 UTC (permalink / raw)
  To: cage; +Cc: 46826-done

Hi!

I pushed a slightly different fix as
9ce78f27a02b3a5fcaea2f0633404b940795989a.

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#46826: [debian] compilation from git fails
  2021-03-01 20:40     ` Ludovic Courtès
@ 2021-03-02 19:39       ` cage
  0 siblings, 0 replies; 6+ messages in thread
From: cage @ 2021-03-02 19:39 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 46826-done, cage

On Mon, Mar 01, 2021 at 09:40:33PM +0100, Ludovic Courtès wrote:
> Hi!

Hi!

>
> I pushed a slightly different fix as
> 9ce78f27a02b3a5fcaea2f0633404b940795989a.

FWIW the compilation works just fine! :)

> Thanks,

You're welcome!
C.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-03-02 19:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-28  8:03 bug#46826: [debian] compilation from git fails cage
2021-02-28  9:04 ` cage
2021-03-01 11:42 ` Maxime Devos
2021-03-01 13:12   ` cage
2021-03-01 20:40     ` Ludovic Courtès
2021-03-02 19:39       ` cage

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).