emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#10556: closed ((use-modules ) references not found


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#10556: closed ((use-modules ) references not found on file system when compiling)
Date: Fri, 20 Jan 2012 22:28:02 +0000

Your message dated Fri, 20 Jan 2012 22:19:26 +0000
with message-id <address@hidden>
and subject line Re: bug#10556: (use-modules ) references not found on file 
system when compiling
has caused the debbugs.gnu.org bug report #10556,
regarding (use-modules ) references not found on file system when compiling
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
10556: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10556
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: (use-modules ) references not found on file system when compiling Date: Thu, 19 Jan 2012 22:27:56 +0000 User-agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111124 Thunderbird/8.0
I am compiling a file which references some modules declared in source
files present in the %load-path.  However I get a "no code for (xxx
yyy)" error when I attempt to compile with guild compile.

Guile version 2.0.3
Ubuntu 11.10

I am running the compilation from a shell command procedure as follows
(the PWD is /home/ian/src/lilypond):
declare -x GUILE_LOAD_COMPILED_PATH='/home/ian/src/lilypond/scm/out'
declare -x GUILE_AUTO_COMPILE=0
guild compile scm/lily-guile2.scm \
--load-path=/home/ian/src/lilypond/scm/ \
--warn=unbound-variable \
--output=scm/out/lily-guile2.go


lily-guile2.scm starts as follows:


(eval-when (compile load eval)
(display "%load-path: ")
(display %load-path) (newline)
(display (%search-load-path "clip-region")) (newline)
(display (%search-load-path "memory-trace")) (newline)
(display (%search-load-path "coverage")) (newline)
(display (%search-load-path "safe-utility-defs")) (newline))

(use-modules (scm clip-region)
             (scm memory-trace)
             (scm coverage)
             (scm safe-utility-defs))

I've attached the trace-back below.  It looks like the use-modules code
isn't doing the right thing in translating the module name list into a
file system path and file-name (as in 6.19.1 General Information about
Modules, pages 385-386).

Cheers,
Ian Hulin

===================================================================================================

address@hidden ~/src/lilypond (T1686)$ sh compile-lily.sh
compile-lily.sh: 1: declare: not found
compile-lily.sh: 2: declare: not found
%load-path: (/home/ian/src/lilypond/scm/ /usr/local/share/guile/2.0
/usr/local/share/guile/site/2.0 /usr/local/share/guile/site
/usr/local/share/guile)
/home/ian/src/lilypond/scm/clip-region.scm
/home/ian/src/lilypond/scm/memory-trace.scm
/home/ian/src/lilypond/scm/coverage.scm
/home/ian/src/lilypond/scm/safe-utility-defs.scm
Backtrace:
In scripts/compile.scm:
 174: 19 [#<procedure 97d98a0 at scripts/compile.scm:171:14 (file)>
"scm/lily-guile2.scm"]
In system/base/compile.scm:
 148: 18 [compile-file "scm/lily-guile2.scm" #:output-file ...]
  43: 17 [call-once #<procedure 97d9720 at system/base/compile.scm:56:5 ()>]
In ice-9/boot-9.scm:
 184: 16 [with-throw-handler #t ...]
In system/base/compile.scm:
  59: 15 [#<procedure 97d9700 at system/base/compile.scm:58:9 ()>]
 151: 14 [#<procedure 97d9740 at system/base/compile.scm:149:8 (port)>
#<input-output: scm/out/lily-guile2.go.SmCR1v 41>]
 200: 13 [read-and-compile #<input: lily-guile2.scm 40> #:from ...]
 212: 12 [lp (# #) #<directory # 994fd38> #<directory # 994fd38>]
 178: 11 [lp (#<procedure compile-tree-il (x e opts)>) (use-modules # #
...) ...]
In ice-9/boot-9.scm:
2095: 10 [save-module-excursion #<procedure 996bc78 at
language/scheme/compile-tree-il.scm:29:3 ()>]
In language/scheme/compile-tree-il.scm:
  31: 9 [#<procedure 996bc78 at language/scheme/compile-tree-il.scm:29:3
()>]
In ice-9/psyntax.scm:
1011: 8 [chi-top-sequence ((use-modules # # # ...)) () ((top)) ...]
 898: 7 [scan ((use-modules (scm clip-region) (scm memory-trace) ...))
() ...]
 269: 6 [scan ((# #) #(syntax-object *unspecified* # #)) () (()) ...]
In ice-9/boot-9.scm:
3117: 5 [process-use-modules ((#) (#) (#) (#))]
 538: 4 [map #<procedure 97227f0 at ice-9/boot-9.scm:3117:25 (mif-args)>
(# # # #)]
3118: 3 [#<procedure 97227f0 at ice-9/boot-9.scm:3117:25 (mif-args)> (#)]
2567: 2 [resolve-interface (scm clip-region) #:select ...]
In unknown file:
   ?: 1 [scm-error misc-error #f ...]
In ice-9/boot-9.scm:
 119: 0 [#<procedure 97d96e0 at ice-9/boot-9.scm:110:6 (thrown-k .
args)> misc-error ...]

ice-9/boot-9.scm:119:20: In procedure #<procedure 97d96e0 at
ice-9/boot-9.scm:110:6 (thrown-k . args)>:
ice-9/boot-9.scm:119:20: no code for module (scm clip-region)
address@hidden ~/src/lilypond (T1686)$




--- End Message ---
--- Begin Message --- Subject: Re: bug#10556: (use-modules ) references not found on file system when compiling Date: Fri, 20 Jan 2012 22:19:26 +0000 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)
Ian Hulin <address@hidden> writes:

> I am compiling a file which references some modules declared in source
> files present in the %load-path.  However I get a "no code for (xxx
> yyy)" error when I attempt to compile with guild compile.
>
> Guile version 2.0.3
> Ubuntu 11.10
>
> I am running the compilation from a shell command procedure as follows
> (the PWD is /home/ian/src/lilypond):
> declare -x GUILE_LOAD_COMPILED_PATH='/home/ian/src/lilypond/scm/out'
> declare -x GUILE_AUTO_COMPILE=0
> guild compile scm/lily-guile2.scm \
> --load-path=/home/ian/src/lilypond/scm/ \
> --warn=unbound-variable \
> --output=scm/out/lily-guile2.go
>
>
> lily-guile2.scm starts as follows:
>
>
> (eval-when (compile load eval)
> (display "%load-path: ")
> (display %load-path) (newline)
> (display (%search-load-path "clip-region")) (newline)
> (display (%search-load-path "memory-trace")) (newline)
> (display (%search-load-path "coverage")) (newline)
> (display (%search-load-path "safe-utility-defs")) (newline))
>
> (use-modules (scm clip-region)
>              (scm memory-trace)
>              (scm coverage)
>            (scm safe-utility-defs))
>
> I've attached the trace-back below.  It looks like the use-modules code
> isn't doing the right thing in translating the module name list into a
> file system path and file-name (as in 6.19.1 General Information about
> Modules, pages 385-386).

This is your mistake, I would say.

Lets see, quoting
https://www.gnu.org/software/guile/manual/html_node/General-Information-about-Modules.html
 

To use a module, it must be found and loaded. All Guile modules have a
unique module name, which is a list of one or more symbols. Examples are
(ice-9 popen) or (srfi srfi-11). When Guile searches for the code of a
module, it constructs the name of the file to load by concatenating the
name elements with slashes between the elements and appending a number
of file name extensions from the list %load-extensions (see
Loading). The resulting file name is then searched in all directories in
the variable %load-path (see Build Config). For example, the (ice-9
popen) module would result in the filename ice-9/popen.scm and searched
in the installation directories of Guile and in all other directories in
the load path.

So, for your example, (scm clip-region), it looks for
scm/clip-region.scm in %load-path, or in scheme
(%search-load-path "scm/clip-region")

Which fails to match in your case, because /home/ian/src/lilypond/scm/
is in your path, not /home/ian/src/lilypond/. And hence it will look for 
the existence of a /home/ian/src/lilypond/scm/scm/clip-region.scm. 

My advice is to change your %load-path, or if you prefer, use
(clip-region) instead of (scm clip-region), and so on.

-- 
Ian Price

"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"


--- End Message ---

reply via email to

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