[plt-scheme] Problem with compiled file dependencies

From: Paulo J. Matos (pocm at soton.ac.uk)
Date: Sat Mar 10 10:19:42 EST 2007

On 3/10/07, Robby Findler <robby.findler at gmail.com> wrote:

> Did you consider just using mzc -k from the commandline to compile the files?
>

Hello,

I've tried using mzc -k but even if I do use that to compile foo:
~/test $ mzc -k foo.scm
mzc v369.8 [3m], Copyright (c) 2004-2007 PLT Scheme Inc.
"foo.scm":
  making "/home/pmatos/test/foo.scm"
  making "/home/pmatos/test/bar.scm"
 [output to "./compiled/foo.zo"]
pmatos at euler ~/test $ cd compiled/
pmatos at euler ~/test/compiled $ ls
bar.dep  bar.zo  foo.dep  foo.zo

Now I get to mzscheme:
$ mzscheme
Welcome to MzScheme v369.8 [3m], Copyright (c) 2004-2007 PLT Scheme Inc.
> (dynamic-require "test/compiled/foo.zo" 'foo-test)
default-load-handler: cannot open input file:
"/home/pmatos/test/compiled/bar.scm" (No such file or directory;
errno=2)

So, even though I have bar.dep and bar.zo compiled in, this still
happens. Now, this is not a result I would expect. Possible bug?

Cheers,

Paulo Matos

> Robby
>
> On 3/10/07, Paulo J. Matos <pocm at soton.ac.uk> wrote:
> > Hello all,
> >
> > I have the following:
> > test/foo.scm
> > (module foo mzscheme
> >   (require "bar.scm")
> >   (provide foo-test)
> >
> >   (define (foo-test x) (bar x)))
> >
> > test/bar.scm
> > (module bar mzscheme
> >
> >   (provide bar)
> >
> >   (define (bar x)
> >     (* 2 x)))
> >
> > Now in interactions:
> > > (require (lib "compile.ss"))
> > > (compile-file "test/foo.scm")
> > #<path:test/compiled/foo.zo>
> > > (dynamic-require "test/compiled/foo.zo" 'foo-test)
> > . open-input-file: cannot open input file:
> > "/home/pmatos/test/compiled/bar.scm" (No such file or directory;
> > errno=2)
> >
> > I understand that bar.scm is not in the same dir as the compiled file.
> > I could just compile the file to the same dir as the bar.scm but I
> > would like to know about other solutions. Any suggestions?
> >
> > Cheers,
> > --
> > Paulo Jorge Matos - pocm at soton.ac.uk
> > http://www.personal.soton.ac.uk/pocm
> > PhD Student @ ECS
> > University of Southampton, UK
> > _________________________________________________
> >   For list-related administrative tasks:
> >   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> >
>
>
>


-- 
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK


Posted on the users mailing list.