unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Christopher Baines <mail@cbaines.net>
Cc: Guile User <guile-user@gnu.org>
Subject: Re: Debugging Guile module loading
Date: Tue, 13 Mar 2018 12:57:39 -0400	[thread overview]
Message-ID: <87po47j4l8.fsf@netris.org> (raw)
In-Reply-To: <87h8pl9jvo.fsf@cbaines.net> (Christopher Baines's message of "Mon, 12 Mar 2018 19:25:15 +0000")

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



      parent reply	other threads:[~2018-03-13 16:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87po47j4l8.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=guile-user@gnu.org \
    --cc=mail@cbaines.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).