[plt-scheme] "variable not provided from module"

From: Guillaume Marceau (gmarceau at cs.brown.edu)
Date: Thu Mar 18 16:48:43 EST 2004

Alright, I can now compile my code. While doing do, I appear to have
uncovered a compiler bug. Since the bug report page seems to be down at
the moment, I will post it here.

I've reduced the offending code down to the following four lines:

  (module frp mzscheme
    (let-values ([(a b) (values 1 2)])
      (define (foo c) (printf "yey~n"))
      (foo 5)))

The bug occur both with 206p1 and with the exp-tagged cvs version.

        gmarceau at catacomb gmarceau $ cd ~/src/plt/collects/frtime/
        gmarceau at catacomb frtime $ rm -rf compiled/
        gmarceau at catacomb frtime $ cat frp.ss
        (module frp mzscheme
          (let-values ([(a b) (values 1 2)])
            (define (foo c) (printf "yey~n"))
            (foo 5)))
        gmarceau at catacomb frtime $ mzscheme -u frp.ss
        yey
        gmarceau at catacomb frtime $ setup-plt -l frtime
        setup-plt: Setup version is 206p1
        setup-plt: PLT home directory is /home/gmarceau/src/plt
        setup-plt: Collection paths are 
        setup-plt:   /home/gmarceau/.plt-scheme/206p1/collects
        setup-plt:   /home/gmarceau/src/plt/collects
        setup-plt: Compiling .zos used by frtime
        setup-plt:   in /home/gmarceau/src/plt/collects/frtime/
        compiled/frp.zo::129: read (compiled): ill-formed code
        setup-plt: Done setting up
        setup-plt: 
        setup-plt: Error during Compiling .zos for frtime (/home/gmarceau/src/plt/collects/frtime)
        setup-plt:   compiled/frp.zo::129: read (compiled): ill-formed code
        gmarceau at catacomb frtime $ 


On Thu, 2004-03-18 at 13:46, Robby Findler wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> Note that there is already a user-specific collection path, built into
> mzscheme. The manual says where it is, but under os X, it is
> ~/Library/PLT Scheme/206.1/collects in 206.1.
> 
> Robby
> 
> At Thu, 18 Mar 2004 11:44:38 -0700, Scott Owens wrote:
> >   For list-related administrative tasks:
> >   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> > 
> > I suggest putting your code into a collection either with the 
> > PLTCOLLECTS environment variable or by placing it in the collects 
> > directory.  Then you can use "setup-plt -l collection-name" to compile 
> > it.
> > 
> > I suspect the problem below is that enough files aren't being 
> > re-compiled.  The setup-plt solution will make sure everything is 
> > re-compiled as it needs to be.  As an added bonus, no additional script 
> > is needed.
> > 
> > -Scott
> > 
> > On Mar 18, 2004, at 10:58 AM, Guillaume Marceau wrote:
> > 
> > >   For list-related administrative tasks:
> > >   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> > >
> > > What does the following error message means?
> > >
> > >         compile: variable not provided (directly or indirectly and at
> > >         the expected position) from module:
> > >         |,/home/gmarceau/projects/frp-debugger/jdwp| in:
> > >         provide/contract-contract2
> > >
> > > The error message disappears after I remove precompiled .zo for my
> > > project. I guess I am not generating them correctly. Here is the script
> > > I am using:
> > >
> > >         #!/home/gmarceau/bin/mzscheme -r
> > >         # mz-pre-parse.ss : generates .zo's for the target scheme 
> > > files.
> > >         (require (lib "compiler.ss" "compiler"))
> > >
> > >         ; main: (listof string) ->
> > >         (define (main args)
> > >           (or (directory-exists? "compiled")
> > >               (make-directory "compiled"))
> > >           ((compile-zos #f) args "compiled"))
> > >
> > >
> > >         (main (vector->list (current-command-line-arguments)))
> > >
> > >



Posted on the users mailing list.