Hi,

Nikolaos Chatzikonstantinou <nchatz...@gmail.com> writes:

> On Fri, Sep 12, 2025 at 8:58 AM Maxim Cournoyer <ma...@guixotic.coop> wrote:
>> > 1) The issues with Guile and Autotools need to be outlined: a) Guile
>> > wants to install both source and compiled files b) Guile is
>> > second-class to Autotools (say, unlike C) and c) the mtime issue with
>> > the .scm.go rule that currently requires a "hack" to fix on Autotools.
>> > To be specific, I'm talking about Automake too when I mention
>> > Autotools. The examples in the manual only consider Autoconf.
>> > 2) More examples need to be included, both as snippets in the manual
>> > and full examples in the GNU Guile distribution.
>> > 3) The meta/guile.m4 file has issues that need fixing, for instance
>> > GUILE_SITE is a hardcoded path that disallows the use of --prefix.
>>
>> What is the mtime issue with .scm.go? I don't think I've encountered a
>> problem with it. Anyway, this all sounds very useful to document and/or
>> fix, so I'd encourage you to work on it.
>
> Briefly, imagine that the user installs /usr/bin/foo which is a Guile
> script, with corresponding .go file which is in the ccache. When
> executed for the first time, unless the installation preserved the
> mtime of the ccache object to be larger than of the script, it will be
> recompiled.

Are you sure about this? If the mtimes are equal, wouldn't that be good
enough? Because that's the situation in Guix, and it seems to work fine
(the source are not recompiled upon execution):

--8<---------------cut here---------------start------------->8---
$ stat 
/gnu/store/wjpxvb4f2qakki153pd9v1i3ja3xjadw-guile-lib-0.2.8.1/share/guile/site/3.0/htmlprag.scm
  File: 
/gnu/store/wjpxvb4f2qakki153pd9v1i3ja3xjadw-guile-lib-0.2.8.1/share/guile/site/3.0/htmlprag.scm
  Size: 103798          Blocks: 208        IO Block: 4096   regular file
Device: 0,26    Inode: 649006      Links: 10
Access: (0444/-r--r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 1970-01-01 09:00:01.000000000 +0900
Modify: 1970-01-01 09:00:01.000000000 +0900
Change: 2025-09-07 17:40:19.397522007 +0900
 Birth: 2024-09-06 05:27:02.015439303 +0900

$ stat 
/gnu/store/wjpxvb4f2qakki153pd9v1i3ja3xjadw-guile-lib-0.2.8.1/lib/guile/3.0/site-ccache/htmlprag.go
  File: 
/gnu/store/wjpxvb4f2qakki153pd9v1i3ja3xjadw-guile-lib-0.2.8.1/lib/guile/3.0/site-ccache/htmlprag.go
  Size: 193533          Blocks: 312        IO Block: 4096   regular file
Device: 0,26    Inode: 649062      Links: 6
Access: (0444/-r--r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 1970-01-01 09:00:01.000000000 +0900
Modify: 1970-01-01 09:00:01.000000000 +0900
Change: 2025-09-07 17:40:19.124662154 +0900
 Birth: 2024-09-06 05:27:02.019439303 +0900
--8<---------------cut here---------------end--------------->8---

Guix sets both GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH to locate
the source and byte-compiled .go files, but this should be equivalent to
using a fixed location in your file system hierarchy, I'd assume.

-- 
Thanks,
Maxim

Reply via email to