Subject: bug#34181: guile-hall: no code for module (config)

From: Alex Sassmannshausen <[email-masked]>
Date: Fri, 25 Jan 2019 18:10:28 +0100

Hi Jack,

Cheers for trying these things out!

Jack Hill writes:

> On Wed, 23 Jan 2019, Alex Sassmannshausen wrote:
>
>> Hi Jack,
>>
>> Thanks for your bug report — this is super helpful to debug the
>> guile-build-system in guix!
>>
>> Jack Hill writes:
>>
>>> The guile-hall package appears to be broken. All hall commands that I
>>> run result in a "no code for module (config)" error.
>>
>> The Guile build system propagates installs of dependent
>> modules. Guile-Hall depends on Guile-Config, and it looks like it is
>> built fine as part of the built process.
>>
>> What I'm curious about is whether your search paths are set correctly?
>>
>> Would you mind trying the following commands:
>> $ guile -c "(use-modules (config))"
>> $ guile -c "(use-modules (hall clean))"
>
> Both of these end produce a backtrace that ends in "no code for module
> (config)" or "… (hall clean)"
>
>> $ echo $GUILE_LOAD_PATH +++ $GUILE_LOAD_COMPILED_PATH
>
> /run/current-system/profile/share/guile/site/2.2 and
> /run/current-system/profile/lib/guile/2.2/site-ccache
>
> So it looks like my environment variables aren't set correctly?

Correct, all of this points to GUILE_LOAD_PATH &
GUILE_LOAD_COMPILED_PATH not being set up correctly.

> Is this a user error on my part? I had hoped that guix environment
> would set these if needed.

OK, I did some research.  The issue is as follows:
- Virtually all guile packages declare guile an input, but not a
  propgated input.  This seems to make Guile available in the
  environment, but without the Guile environment paths defined.
- Guile-DBI on the other hand seems to declare guile a propagated
  input.  This causes the environment paths to be set.
- Similarly, when you install in your profile:
  + installing guile too will encourage you to set up the environment
    path.
  + installing only the library will not.
  + installing only guile will not do this either (see the example in
    the manual, at
    https://www.gnu.org/software/guix/manual/en/html_node/Invoking-guix-package.html#index-search-paths
- When you install, either in environment, or in profile, both guile and
  a guile-library, the env variables are set/reported correctly.

This looks like it is intended behaviour.

Please test and let me know if this resolves the issue for you!

Best wishes,

Alex

> Thanks!
> Jack