unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [PATCH] Add more detailed instructions into the HACKING file.
@ 2023-11-29 16:40 Tomas Volf
  2023-12-04 21:06 ` Maxime Devos
  0 siblings, 1 reply; 4+ messages in thread
From: Tomas Volf @ 2023-11-29 16:40 UTC (permalink / raw)
  To: guile-devel; +Cc: Tomas Volf

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.
---
I think this will make it easier for people to start hacking on the Guile.

 HACKING | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/HACKING b/HACKING
index 387643bf7..ae39218fa 100644
--- a/HACKING
+++ b/HACKING
@@ -26,6 +26,26 @@ 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
+    guix shell -D -f guix.scm --pure -- make
+
+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 +93,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 +235,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



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

* Re: [PATCH] Add more detailed instructions into the HACKING file.
  2023-11-29 16:40 [PATCH] Add more detailed instructions into the HACKING file Tomas Volf
@ 2023-12-04 21:06 ` Maxime Devos
  2023-12-04 23:12   ` Tomas Volf
  0 siblings, 1 reply; 4+ messages in thread
From: Maxime Devos @ 2023-12-04 21:06 UTC (permalink / raw)
  To: Tomas Volf, guile-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 610 bytes --]



Op 29-11-2023 om 17:40 schreef Tomas Volf:
> +    guix shell -D -f guix.scm --pure -- ./configure --enable-mini-gmp

Also -fexcess-precision=standard (see #49368 / #49659 on debbugs) (at 
least for i*86, should be harmless for other architectures though).

Also --disable-jit when on the Hurd.

You might want to check if static libraries are built by default (*), 
and if so, add --disable-static to reduce compilation time.

(*) can be tested with "find . -name '*.a'" after "make" -- don't worry 
about libgnu.a, IIUC only libguile-3.0.a / .so is important.

Best regards,
Maxime Devos.

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

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

* Re: [PATCH] Add more detailed instructions into the HACKING file.
  2023-12-04 21:06 ` Maxime Devos
@ 2023-12-04 23:12   ` Tomas Volf
  2023-12-15 22:16     ` Maxime Devos
  0 siblings, 1 reply; 4+ messages in thread
From: Tomas Volf @ 2023-12-04 23:12 UTC (permalink / raw)
  To: Maxime Devos; +Cc: guile-devel

[-- Attachment #1: Type: text/plain, Size: 1124 bytes --]

Thank you for the review.

On 2023-12-04 22:06:42 +0100, Maxime Devos wrote:
>
>
> Op 29-11-2023 om 17:40 schreef Tomas Volf:
> > +    guix shell -D -f guix.scm --pure -- ./configure --enable-mini-gmp
>
> Also -fexcess-precision=standard (see #49368 / #49659 on debbugs) (at least
> for i*86, should be harmless for other architectures though).

That explains why I did not catch it (I did run the test suite, but I am on
x86_64).

Out of curiosity, since it should be harmless elsewhere, is there a reason this
is not a flag set by default?

>
> Also --disable-jit when on the Hurd.
>
> You might want to check if static libraries are built by default (*), and if
> so, add --disable-static to reduce compilation time.
>
> (*) can be tested with "find . -name '*.a'" after "make" -- don't worry
> about libgnu.a, IIUC only libguile-3.0.a / .so is important.
>
> Best regards,
> Maxime Devos.

I added a note regarding the Hurd and the disabling of static libraries.

Will send v2.

Have a nice day,
Tomas Volf

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] Add more detailed instructions into the HACKING file.
  2023-12-04 23:12   ` Tomas Volf
@ 2023-12-15 22:16     ` Maxime Devos
  0 siblings, 0 replies; 4+ messages in thread
From: Maxime Devos @ 2023-12-15 22:16 UTC (permalink / raw)
  To: Tomas Volf; +Cc: guile-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 1386 bytes --]



Op 05-12-2023 om 00:12 schreef Tomas Volf:
> Thank you for the review.
> 
> On 2023-12-04 22:06:42 +0100, Maxime Devos wrote:
>>
>>
>> Op 29-11-2023 om 17:40 schreef Tomas Volf:
>>> +    guix shell -D -f guix.scm --pure -- ./configure --enable-mini-gmp
>>
>> Also -fexcess-precision=standard (see #49368 / #49659 on debbugs) (at least
>> for i*86, should be harmless for other architectures though).
> 
> That explains why I did not catch it (I did run the test suite, but I am on
> x86_64).

I think it might, in theory, also happen on x86_64, and perhaps other 
architectures with ‘excessive’ floats (I don't know any, but they could 
exist).

If you encounter the issue or not depends on how, precisely, the 
compiler optimises things, allocates registers/pushes things on the 
stack ... you might have missed the issue by accident/luck.

> Out of curiosity, since it should be harmless elsewhere, is there a reason this
> is not a flag set by default?

I guess for compatible with non-GCC, non-Clang compilers.
But given how configure.ac now checks for support of '-flto', it should 
be easy to copy/edit things to do the same for -fexcess-precision.

(Also, it is plausible that GCC simply does not recognise the flag on 
non-i*86 and non-x86_64 architectures -- someone would need to actually 
check this.)

Best regards,
Maxime Devos.

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

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

end of thread, other threads:[~2023-12-15 22:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-29 16:40 [PATCH] Add more detailed instructions into the HACKING file Tomas Volf
2023-12-04 21:06 ` Maxime Devos
2023-12-04 23:12   ` Tomas Volf
2023-12-15 22:16     ` Maxime Devos

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).