GNU bug report logs - #68505
[PATCH v2] Add more detailed instructions into the HACKING file.

Previous Next

Package: guile;

Reported by: Tomas Volf <~@wolfsden.cz>

Date: Tue, 16 Jan 2024 12:53:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 68505 in the body.
You can then email your comments to 68505 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#68505; Package guile. (Tue, 16 Jan 2024 12:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tomas Volf <~@wolfsden.cz>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Tue, 16 Jan 2024 12:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tomas Volf <~@wolfsden.cz>
To: bug-guile <at> gnu.org
Cc: Tomas Volf <~@wolfsden.cz>
Subject: [PATCH v2] Add more detailed instructions into the HACKING file.
Date: Tue, 16 Jan 2024 13:50:26 +0100
Until now, the ./meta/guile was not mentioned anywhere, and therefore it
was not obvious how to run the locally compiled Guile without installing
it.

While modifying the file, I took the liberty to also mention a bit about
compiling Guile using Guix.

Finally, the header lines where cleaned up, ensuring all of them end at
70 and have a leading space.

* HACKING (Hacking It Yourself): Add Guix instructions.  Add a note
about meta/guile script.
(Sample GDB Initialization File),
(Naming conventions): Clean up the header line.
---
v2:
Add note regarding JIT and GNU Hurd.  Add note regarding -fexcess-precision.
Add --disable-static and explain it.

Previous discussion happened on the mailing list.

 HACKING | 38 ++++++++++++++++++++++++++++++++++++--
 1 file changed, 36 insertions(+), 2 deletions(-)

diff --git a/HACKING b/HACKING
index 387643bf7..5926fb275 100644
--- a/HACKING
+++ b/HACKING
@@ -26,6 +26,40 @@ http://www.gnu.org/software/guile/mail/mail.html for more info.
 
 Hacking It Yourself ==================================================
 
+You can spawn a shell with all the required dependencies using GNU Guix
+by running the following command:
+
+    guix shell -D -f guix.scm --pure
+
+In this way, you can effortlessly compile Guile from the Git checkout
+with just these three lines:
+
+    guix shell -D -f guix.scm --pure -- ./autogen.sh
+    guix shell -D -f guix.scm --pure -- ./configure \
+    	 --enable-mini-gmp --disable-static
+    guix shell -D -f guix.scm --pure -- make
+
+Disabling of the static libraries is optional, but it does speed up the
+builds, and you are unlikely to need them for local development.
+
+  Note: Currently JIT causes Guile to crash in obscure ways on GNU Hurd,
+        so on that platform you want to also pass the --disable-jit flag
+        to the configure script.
+
+  Note: On any i*86 architecture, you also need to pass in the compiler
+        flag -fexcess-precision=standard in order to get the test suite
+        to pass.  That can be done by passing an additional argument to
+        the configure script:
+	  CFLAGS='-g -O2 -fexcess-precision=standard'
+
+Once that finishes, you can execute your newly compiled Guile using the
+./meta/guile script:
+
+    $ ./meta/guile -v | head -n1
+    guile (GNU Guile) 3.0.9.139-d7cf5-dirty
+
+For more manual approach, read on.
+
 When Guile is obtained from Git, a few extra steps must be taken
 before the usual configure, make, make install.  You will need to have
 up-to-date versions of the tools as listed below, correctly installed.
@@ -73,7 +107,7 @@ Here is the authoritative list of tool/version/platform tuples that
 have been known to cause problems, and a short description of the problem.
 
 
-Sample GDB Initialization File=========================================
+Sample GDB Initialization File =======================================
 
 In GDB, you probably want to load the gdbinit file included with Guile,
 which defines a number of GDB helpers to inspect Scheme values.
@@ -215,7 +249,7 @@ The goal is to reduce (and over time, eliminate) spurious diffs.
 For Emacs users:
   (add-hook 'before-save-hook 'delete-trailing-whitespace)
 
-Naming conventions =================================================
+Naming conventions ===================================================
 
 We use certain naming conventions to structure the considerable number
 of global identifiers.  All identifiers should be either all lower
-- 
2.41.0





Information forwarded to bug-guile <at> gnu.org:
bug#68505; Package guile. (Wed, 24 Jan 2024 10:19:01 GMT) Full text and rfc822 format available.

Message #8 received at 68505 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Tomas Volf <~@wolfsden.cz>
Cc: 68505 <at> debbugs.gnu.org
Subject: Re: bug#68505: [PATCH v2] Add more detailed instructions into the
 HACKING file.
Date: Wed, 24 Jan 2024 11:18:27 +0100
Hi,

Tomas Volf <~@wolfsden.cz> skribis:

> Until now, the ./meta/guile was not mentioned anywhere, and therefore it
> was not obvious how to run the locally compiled Guile without installing
> it.
>
> While modifying the file, I took the liberty to also mention a bit about
> compiling Guile using Guix.
>
> Finally, the header lines where cleaned up, ensuring all of them end at
> 70 and have a leading space.
>
> * HACKING (Hacking It Yourself): Add Guix instructions.  Add a note
> about meta/guile script.
> (Sample GDB Initialization File),
> (Naming conventions): Clean up the header line.
> ---
> v2:
> Add note regarding JIT and GNU Hurd.  Add note regarding -fexcess-precision.
> Add --disable-static and explain it.

Much welcome addition!

> +You can spawn a shell with all the required dependencies using GNU Guix
> +by running the following command:
> +
> +    guix shell -D -f guix.scm --pure

I would suggest running:

  guix shell -CP

(Currently ‘README’ suggests ‘guix shell’.)

The rationale is: it’s shorter, using a container avoids interference,
and ‘-P’ works well with ‘config.cache’ & co. (because the cached file
names then are $HOME/.guix-profile/…).

WDYT?

Thanks,
Ludo’.




Information forwarded to bug-guile <at> gnu.org:
bug#68505; Package guile. (Wed, 24 Jan 2024 16:56:01 GMT) Full text and rfc822 format available.

Message #11 received at 68505 <at> debbugs.gnu.org (full text, mbox):

From: Tomas Volf <~@wolfsden.cz>
To: 68505 <at> debbugs.gnu.org
Cc: Tomas Volf <~@wolfsden.cz>
Subject: [PATCH v3] Add more detailed instructions into the HACKING file.
Date: Wed, 24 Jan 2024 17:48:04 +0100
Until now, the ./meta/guile was not mentioned anywhere, and therefore it
was not obvious how to run the locally compiled Guile without installing
it.

While modifying the file, I took the liberty to also mention a bit about
compiling Guile using Guix.

Finally, the header lines where cleaned up, ensuring all of them end at
70 and have a leading space.

* HACKING (Hacking It Yourself): Add Guix instructions.  Add a note
about meta/guile script.
(Sample GDB Initialization File),
(Naming conventions): Clean up the header line.
---
v2:
Add note regarding JIT and GNU Hurd.  Add note regarding -fexcess-precision.
Add --disable-static and explain it.

v3:
Use -CP instead of --pure.

 HACKING | 38 ++++++++++++++++++++++++++++++++++++--
 1 file changed, 36 insertions(+), 2 deletions(-)

diff --git a/HACKING b/HACKING
index 387643bf7..94fba199c 100644
--- a/HACKING
+++ b/HACKING
@@ -26,6 +26,40 @@ http://www.gnu.org/software/guile/mail/mail.html for more info.

 Hacking It Yourself ==================================================

+You can spawn a shell with all the required dependencies using GNU Guix
+by running the following command:
+
+    guix shell -D -f guix.scm --pure
+
+In this way, you can effortlessly compile Guile from the Git checkout
+with just these three lines:
+
+    guix shell -CP -D -f guix.scm -- ./autogen.sh
+    guix shell -CP -D -f guix.scm -- ./configure \
+    	 --enable-mini-gmp --disable-static
+    guix shell -CP -D -f guix.scm -- make
+
+Disabling of the static libraries is optional, but it does speed up the
+builds, and you are unlikely to need them for local development.
+
+  Note: Currently JIT causes Guile to crash in obscure ways on GNU Hurd,
+        so on that platform you want to also pass the --disable-jit flag
+        to the configure script.
+
+  Note: On any i*86 architecture, you also need to pass in the compiler
+        flag -fexcess-precision=standard in order to get the test suite
+        to pass.  That can be done by passing an additional argument to
+        the configure script:
+	  CFLAGS='-g -O2 -fexcess-precision=standard'
+
+Once that finishes, you can execute your newly compiled Guile using the
+./meta/guile script:
+
+    $ guix shell -CP -D -f guix.scm -- ./meta/guile -v | head -n1
+    guile (GNU Guile) 3.0.9.139-d7cf5-dirty
+
+For more manual approach, read on.
+
 When Guile is obtained from Git, a few extra steps must be taken
 before the usual configure, make, make install.  You will need to have
 up-to-date versions of the tools as listed below, correctly installed.
@@ -73,7 +107,7 @@ Here is the authoritative list of tool/version/platform tuples that
 have been known to cause problems, and a short description of the problem.


-Sample GDB Initialization File=========================================
+Sample GDB Initialization File =======================================

 In GDB, you probably want to load the gdbinit file included with Guile,
 which defines a number of GDB helpers to inspect Scheme values.
@@ -215,7 +249,7 @@ The goal is to reduce (and over time, eliminate) spurious diffs.
 For Emacs users:
   (add-hook 'before-save-hook 'delete-trailing-whitespace)

-Naming conventions =================================================
+Naming conventions ===================================================

 We use certain naming conventions to structure the considerable number
 of global identifiers.  All identifiers should be either all lower
--
2.41.0




Information forwarded to bug-guile <at> gnu.org:
bug#68505; Package guile. (Wed, 24 Jan 2024 17:00:03 GMT) Full text and rfc822 format available.

Message #14 received at 68505 <at> debbugs.gnu.org (full text, mbox):

From: Tomas Volf <~@wolfsden.cz>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 68505 <at> debbugs.gnu.org
Subject: Re: bug#68505: [PATCH v2] Add more detailed instructions into the
 HACKING file.
Date: Wed, 24 Jan 2024 17:59:07 +0100
[Message part 1 (text/plain, inline)]
Thank you for the review.

On 2024-01-24 11:18:27 +0100, Ludovic Courtès wrote:
> > +You can spawn a shell with all the required dependencies using GNU Guix
> > +by running the following command:
> > +
> > +    guix shell -D -f guix.scm --pure
>
> I would suggest running:
>
>   guix shell -CP
>
> (Currently ‘README’ suggests ‘guix shell’.)
>
> The rationale is: it’s shorter, using a container avoids interference,
> and ‘-P’ works well with ‘config.cache’ & co. (because the cached file
> names then are $HOME/.guix-profile/…).
>
> WDYT?

Modified as agreed on irc.  I am not convinced on the -P, but I defer to your
judgment on this.

Have a nice day,
Tomas Volf

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[signature.asc (application/pgp-signature, inline)]

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 29 Jan 2024 13:28:02 GMT) Full text and rfc822 format available.

Notification sent to Tomas Volf <~@wolfsden.cz>:
bug acknowledged by developer. (Mon, 29 Jan 2024 13:28:02 GMT) Full text and rfc822 format available.

Message #19 received at 68505-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Tomas Volf <~@wolfsden.cz>
Cc: 68505-done <at> debbugs.gnu.org
Subject: Re: bug#68505: [PATCH v2] Add more detailed instructions into the
 HACKING file.
Date: Mon, 29 Jan 2024 14:27:32 +0100
Tomas Volf <~@wolfsden.cz> skribis:

> Until now, the ./meta/guile was not mentioned anywhere, and therefore it
> was not obvious how to run the locally compiled Guile without installing
> it.
>
> While modifying the file, I took the liberty to also mention a bit about
> compiling Guile using Guix.
>
> Finally, the header lines where cleaned up, ensuring all of them end at
> 70 and have a leading space.
>
> * HACKING (Hacking It Yourself): Add Guix instructions.  Add a note
> about meta/guile script.
> (Sample GDB Initialization File),
> (Naming conventions): Clean up the header line.

Applied, thanks!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 27 Feb 2024 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 113 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.