bug-mes
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build issue with guile 2.0.14


From: Jan Nieuwenhuizen
Subject: Re: Build issue with guile 2.0.14
Date: Tue, 06 Apr 2021 19:29:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

W. J. van der Laan writes:

Hi,

> Configure by default passes "-O1" to guild, causing a compile error
> here with guile 2.0.14:
>
>> /usr/bin/guild compile -O1 -L /data/src/mes/module -L
>> /data/src/mes/build-aux -L /data/src/mes/scripts -o
>> module/mes/getopt-long.go /data/src/mes/module/mes/getopt-long.scm
>>
>> 1: unrecognized option

Hmm.  The "-O1" flag was added for Guile 3.0, see
<https://bugs.gnu.org/43831>.

> It comes from the following expression:
>
>>            (guild-optimize (let ((guile-version (and=> (find-dep "guile" 
>> deps) dependency-version-found)))
>>                             (and guile-version (tuple< '(2) guile-version) 
>> "-O1")))
>
> I don't know what the rationale for it is so can't propose a fix. I
> worked around it by replacing it with just "-O" which appears to work
> here.

Ah, oops.  A plain "-O" does not work with guile-2.2 or later.  How
about something like this

--8<---------------cut here---------------start------------->8---
diff --git a/configure b/configure
index e071a4668..f1ea4a04b 100755
--- a/configure
+++ b/configure
@@ -479,7 +479,7 @@ Some influential environment variables:
            (guile (file-name "guile" deps))
            ;; See https://bugs.gnu.org/43831; use -O1 with Guile-3
            (guild-optimize (let ((guile-version (and=> (find-dep "guile" deps) 
dependency-version-found)))
-                             (and guile-version (tuple< '(2) guile-version) 
"-O1")))
+                             (and guile-version (tuple< '(2 9) guile-version) 
"-O1")))
            (deps (if guile (cons (check-program-version (make-dep "nyacc" 
#:version '(0 99 0) #:commands (list (string-append guile " -c '(use-modules 
(nyacc lalr)) (display *nyacc-version*)'")) #:file-name #t #:version-option #f))
                                  deps)
                      deps))
--8<---------------cut here---------------end--------------->8---

does that work for you?

Greetings,
Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]