[Top][All Lists]

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

Re: Guile 3.0.7 compile cache messages

From: Zelphir Kaltstahl
Subject: Re: Guile 3.0.7 compile cache messages
Date: Wed, 2 Jun 2021 21:52:15 +0000

On 6/2/21 6:53 PM, Chris Vine wrote:
> On Wed,  2 Jun 2021 12:20:48 +0000
> Zelphir Kaltstahl <> wrote:
>> Hi Chris!
>> On 6/2/21 12:30 PM, Chris Vine wrote:
>>> On Wed,  2 Jun 2021 08:52:54 +0000
>>> Zelphir Kaltstahl <> wrote:
>>>> On 6/2/21 8:00 AM, Adriano Peluso wrote:
>>>>> Il giorno mar, 01/06/2021 alle 08.14 -0400, Olivier Dion via General
>>>>> Guile related discussions ha scritto:
>>>>>> On Mon, 31 May 2021, Zelphir Kaltstahl <>
>>>>>> wrote:
>>>>>>> Hello Guile Users!
>>>>>>> It seems my Guile (version 3.0.7, installed via GNU Guile, updated
>>>>>>> today) is
>>>>>>> doing something weird, or perhaps something correct but unexpected
>>>>>>> with regard
>>>>>>> to informing about it finding compile caches. When I run a program
>>>>>>> with `guile
>>>>>>> -L . main.scm`, it displays the following:
>>>>>> I also find it annoying.  I use Guile as a script language for a
>>>>>> video game engine in C.  This interferes with the logging system and it
>>>>>> annoys the hell out of me >:-)
>>>>> Does this bug help anyone of you ?
>>>> To be honest my need is not as urgent as something failing because of the
>>>> messages, but rather a visual annoyance, that did not happen before. When 
>>>> I do
>>>> not expect a recompilation, because I did not change any code, then it is
>>>> surprising to see the cache messages appearing, even with auto compilation
>>>> switched off. For a moment I think: "Huh? Did something change?" and then 
>>>> "Ah,
>>>> it is only those always shown messages.". It did not use to do that.
>>>> I am not sure what changed in my setting or with GNU Guile. My theory is, 
>>>> that
>>>> it is something introduced between 3.0.5 (or 4?) and 3.0.7 perhaps. Or that
>>>> something was changed in the way that GNU Guix installs GNU Guile and that
>>>> affects the caching messages somehow.
>>> You reported that when running  a program file of yours named 'main.scm'
>>> which is in your project's source directory, you get this message:
>>> $ guile -L . main.scm 
>>> ;;; note: source file ./logging.scm
>>> ;;;       newer than compiled 
>>> /home/user/.guix-profile/lib/guile/3.0/site-ccache/logging.go
>>> ;;; found fresh local cache at 
>>> /home/user/.cache/guile/ccache/3.0-LE-8-4.5/home/user/dev/guile/lf2-data-files/logging.scm.go
>>> ;;; note: source file ./file-reader.scm
>>> ;;;       newer than compiled 
>>> /home/user/.guix-profile/lib/guile/3.0/site-ccache/file-reader.go
>>> ;;; found fresh local cache at 
>>> /home/user/.cache/guile/ccache/3.0-LE-8-4.5/home/user/dev/guile/lf2-data-files/file-reader.scm.go
>>> 160
>>> On the face of it the warnings look reasonable and I would be surprised
>>> if they were something new.  You appear to have two module files
>>> logging.scm and file-reader.scm in your project's source directory
>>> /home/user/dev/guile/lf2-data-files which are newer than
>>> pre-compiled .go files for them which you (or guix on your behalf) have
>>> installed at some time in the past in guile-3.0's site-ccache,
>>> presumably by some kind of 'make install' operation carried out for
>>> your project.  When you updated logging.scm and file-reader.scm in your
>>> project, guile noticed this, recompiled the modules for you
>>> automatically and put the generated code in your local cache
>>> directory.  It now emits helpful warnings in consequence.
>> Yes, the warnings would look reasonable, if they only were shown once every
>> change. However, what confuses me about them is, that no matter how often I 
>> run
>> the same program without changing any code (!), the same messages are shown, 
>> as
>> if there was constantly a newer version than the cache. If I understand the
>> messages correctly, that is.
>> (I do not doubt, that the messages can be helpful, in cases, where there 
>> really
>> is a newer version than the cache.)
> If you have (i) stale compiled bytecode files installed by guix in
> site-ccache, and (ii) up-to-date bytecode files installed by guile in
> local cache, then you will necessarily get the warning each time, and I
> wouldn't want it to behave in any other way.  You need to resolve the
> matter either by (i) removing the stale bytecode files in site-ccache,
> or (ii) removing the bytecode files in local cache, recompiling your
> project and reinstalling up-to-day bytecode files in site-ccache.
>> In this project I do not have any makefile yet and it is a pure GNU Guile
>> project. Link:
>> <>.
> Presumably guix is doing this then.
> What presumably guix has done is to install the bytecode files in
> site-ccache when first building and installing your project but then
> failed to update them when you change some of your source code files.
> Is there a guix support group, or some kind of documentation about this?
> This is pretty basic stuff so there must be some way of getting guix to
> behave correctly.  Is there some simple command like "guix rebuild"
> that you are supposed to use?

As far as I know, the environment is recreated every time it is activated by
calling the script I have in guix-env/, unless there is a change in
dependencies specified in the manifest.scm or channels.scm file. It should not
be necessary to do any cleanup, unless I am mistaken and my ideas about how it
works are actually wrong. (I thought (think?) I had finally found the way to
perfectly isolate my projects and make their environments reproducible across

>>> The question is how did you get into this position?  More particulaly,
>>> what installed logging.go and file-reader.go in site-ccache (presumably
>>> 'make install') and, when logging.scm and file-reader.scm were updated,
>>> why didn't you recompile and reinstall your modules?
>> I am not sure. I am merely calling `guile -L . main` in the project root
>> directory and have not had any other call to it, when I noticed this 
>> behavior. I
>> basically did not do anything special before.
> See above.  Running 'guile -L . main'  will not install anything in
> site-ccache, so something else (most likely guix) has done that.
> Instead, guile run as 'guile -L . main' will cause it to save its
> compiled bytecode in local cache.
> I suppose one other point to address is why you are using guix at all.
> If all you want to do is run your program with 'guile -L . main' then
> that is all you need to do.  What are you trying to achieve with guix?
> Aren't you supposed to run your program within the guix environment
> instead of outside it?
Yes, I am supposed to be running the program inside that environment and I think
that is what I did. Unless I was silly and somehow managed to forget to activate
the environment.
>>> The most immediate solution is to delete your local cache and reinstall
>>> your program modules.  Alternatively, I suspect from your comments that
>>> your normal work methods may be better served by not pre-compiling/
>>> installing the modules at all, and instead rely on their automatic
>>> compilation and installation into the local cache by guile on need.
>> How do I go about it? Simply removing the cache folder the messages point to?
>> And what commands would that alternative workflow entail?
> Dunno.  See above.

I think the assumption is that I was installing my project in any way. However,
I am merely running its Guile code, without installing it anywhere in Guix or my

Thank you for the idea with the caches, I will try that.

Best regards,


reply via email to

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