unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Debugging Guile module loading
@ 2018-03-12 19:25 Christopher Baines
  2018-03-12 20:40 ` Mike Gran
  2018-03-13 16:57 ` Mark H Weaver
  0 siblings, 2 replies; 3+ messages in thread
From: Christopher Baines @ 2018-03-12 19:25 UTC (permalink / raw)
  To: Guile User

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

Hey,

I'm having some trouble with Guile module loading. I've got a
(use-modules ...) call which results in some warnings, which seem to be
actually more like errors, as the modules aren't  loaded.

From loading one module, I get two errors in the form:

  warning: failed to load '...':
  Unbound variable: ...

The modules and variables all exist, but as far as I understand Guile
modules, they shouldn't be required for loading the module requested.

Any tips on debugging use-modules? Initially it would be good to work
out what modules it's attempting to load.

Thanks,

Chris

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

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

* Re: Debugging Guile module loading
  2018-03-12 19:25 Debugging Guile module loading Christopher Baines
@ 2018-03-12 20:40 ` Mike Gran
  2018-03-13 16:57 ` Mark H Weaver
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Gran @ 2018-03-12 20:40 UTC (permalink / raw)
  To: Christopher Baines; +Cc: Guile User

On Mon, Mar 12, 2018 at 07:25:15PM +0000, Christopher Baines wrote:
> Hey,
> 
> I'm having some trouble with Guile module loading. I've got a
> (use-modules ...) call which results in some warnings, which seem to be
> actually more like errors, as the modules aren't  loaded.
> 
> From loading one module, I get two errors in the form:
> 
>   warning: failed to load '...':
>   Unbound variable: ...
> 
> The modules and variables all exist, but as far as I understand Guile
> modules, they shouldn't be required for loading the module requested.
> 
> Any tips on debugging use-modules? Initially it would be good to work
> out what modules it's attempting to load.

I often find that, using "LD_DEBUG=all guile" will reveal the
problem, somewhere at the bottom of its very verbose output.




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

* Re: Debugging Guile module loading
  2018-03-12 19:25 Debugging Guile module loading Christopher Baines
  2018-03-12 20:40 ` Mike Gran
@ 2018-03-13 16:57 ` Mark H Weaver
  1 sibling, 0 replies; 3+ messages in thread
From: Mark H Weaver @ 2018-03-13 16:57 UTC (permalink / raw)
  To: Christopher Baines; +Cc: Guile User

Hi Chris,

Christopher Baines <mail@cbaines.net> writes:

> I'm having some trouble with Guile module loading. I've got a
> (use-modules ...) call which results in some warnings, which seem to be
> actually more like errors, as the modules aren't  loaded.
>
> From loading one module, I get two errors in the form:
>
>   warning: failed to load '...':
>   Unbound variable: ...

When I search for "failed to load" in the guile-2.2 sources, the only
match is "WARNING: failed to load compiled file ...".  Was that the
actual message?

Exact output is generally more useful than approximate messages typed
from human memory.

> The modules and variables all exist, but as far as I understand Guile
> modules, they shouldn't be required for loading the module requested.

I'm sorry, but you haven't provided enough information to tell what the
problem is.  Can you provide the source code for a small self-contained
example, along with a list of commands needed to reproduce the problem?

> Any tips on debugging use-modules? Initially it would be good to work
> out what modules it's attempting to load.

Running Guile within 'strace' would show you what system calls are being
executed, including 'open' calls attempting to open files, whether the
attempts were successful, and what the error codes were on failures.
While Guile loads modules, it attempts to open *.scm and *.go files in
the directories of Guile's load path (%load-path).  You may find useful
clues there.

     Mark



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

end of thread, other threads:[~2018-03-13 16:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-12 19:25 Debugging Guile module loading Christopher Baines
2018-03-12 20:40 ` Mike Gran
2018-03-13 16:57 ` Mark H Weaver

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