[plt-scheme] Problem with contracts and zo-compiled modules

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Dec 1 08:28:25 EST 2005

At Wed, 30 Nov 2005 21:18:01 -0500, Ittai Balaban wrote:
> I have a module, A, with that provides a symbol defined by
> define/contract.
> Module A is required by module B. All is well when nothing is compiled.
> But when mzscheme tries to require a .zo of B, I get this:
> compile: variable not provided (directly or indirectly and at the
> expected position) from module: |,/home/balaban/nusmv-tests/A| in:
> define/contract-contract-id-extend-env!.1

How do you generate the .zo files?

If you use something like

 mzc --zo *.zo

then it may be that B is compiled before A, which means that A gets
compiled twice. Something in the contract system causes the compiled
code to be slightly different after each compilation (I need to look
into this, eventually). You can avoid the mismatch compiling A first,
so that the compiled form is used to compile B.

If you use

 mzc --make *.zo


 setup-plt -l <your-collection>

then the files should be compiled in the right order.


Posted on the users mailing list.