From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.user Subject: Re: Debugging Guile module loading Date: Tue, 13 Mar 2018 12:57:39 -0400 Message-ID: <87po47j4l8.fsf@netris.org> References: <87h8pl9jvo.fsf@cbaines.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1520961250 15473 195.159.176.226 (13 Mar 2018 17:14:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 13 Mar 2018 17:14:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cc: Guile User To: Christopher Baines Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Mar 13 18:14:06 2018 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1evnUz-0003v3-Ei for guile-user@m.gmane.org; Tue, 13 Mar 2018 18:14:05 +0100 Original-Received: from localhost ([::1]:41376 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evnX2-0000KU-8B for guile-user@m.gmane.org; Tue, 13 Mar 2018 13:16:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evnFt-0002vX-4M for guile-user@gnu.org; Tue, 13 Mar 2018 12:58:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evnFp-0005hL-5D for guile-user@gnu.org; Tue, 13 Mar 2018 12:58:29 -0400 Original-Received: from world.peace.net ([50.252.239.5]:41268) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1evnFo-0005gy-Vi for guile-user@gnu.org; Tue, 13 Mar 2018 12:58:25 -0400 Original-Received: from 50-252-239-6-static.hfc.comcastbusiness.net ([50.252.239.6] helo=jojen) by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1evnFm-0007LZ-G1; Tue, 13 Mar 2018 12:58:22 -0400 In-Reply-To: <87h8pl9jvo.fsf@cbaines.net> (Christopher Baines's message of "Mon, 12 Mar 2018 19:25:15 +0000") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 50.252.239.5 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:14488 Archived-At: Hi Chris, Christopher Baines 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