[racket] Problem with mzc v.5.1.1 and contracts
Hi!
I'm having a problem with byte-compiled modules and contracts. There are
2 files, ihash.scm and config-enumerators.scm, both are compiled with
PLTCOLLECTS=/opt/dozor/racket/lib/racket/collects:/home/timur/develop/projects/dozor/build
LD_LIBRARY_PATH=/opt/dozor/racket/lib:$$LD_LIBRARY_PATH
/opt/dozor/racket/bin/mzc -z -d . $<
(working string from Makefile).
Small piece of ihash.scm:
#lang racket
(define (ihash? ht)
(and (hash? ht) (let ((index (hash-ref ht #f #f)))
(number? index))))
(provide/contract (ihash-get (-> ihash? any/c any/c any/c)))
(define (ihash-get ihash key default)
(let ((value (hash-ref ihash key #f)))
(if value (cdr value) default)))
Small piece of config-enumerators.scm:
#lang racket
(require (lib "ihash.scm" "lib"))
(define (section-replicable? section)
(car (ihash-get section 'replicable? '(#f))))
Before compilation both scm-s are put to
/home/timur/develop/projects/dozor/build/lib, compiled and then put to
/opt/dozor/smap/lib/lib/compiled. $HOME/.racketrc has the next command:
(current-library-collection-paths (list* "/opt/dozor/smap/lib"
(current-library-collection-paths)))
Then i run /opt/dozor/racket/bin/mzscheme,
type (require (lib "config-enumerators.scm" "lib")) and get the
following error:
link: module mismatch, probably from old bytecode whose dependencies
have changed: variable not provided (directly or indirectly and at the
expected position) from module: "/opt/dozor/smap/lib/lib/ihash.scm"
accessed from module: "/opt/dozor/smap/lib/lib/config-enumerators.scm"
at source phase level: 0 in: provide/contract-contract-id-ihash-get.14
Any ideas?
--
Best regards,
Sufiev Timur