Opened 11 years ago

Last modified 10 years ago

#700 closed defect

requiring uncompiled extensions that use `use' fails — at Version 1

Reported by: Moritz Heidkamp Owned by: sjamaan
Priority: minor Milestone: 4.9.0
Component: compiler Version: 4.7.x
Keywords: Cc: Jim Ursetto
Estimated difficulty:

Description (last modified by Moritz Heidkamp)

The problem can be reproduced by having a file foo.scm containing something like this:

(module foo

()
(import chicken scheme)
(use extras)

)

and a file test.scm containing just (require-library foo). Now generate an import library through csc -Jt foo.scm. csi -s test.scm will work whereas csc test.scm and then running ./test will result in:

Warning: reference to possibly unbound identifier `extras'

Warning: reference to possibly unbound identifier `use'

Error: module unresolved: foo

        Call history:

        ##sys#require     
        <syntax>          (module foo () (import chicken scheme) (use extras))
        <syntax>          (##core#module foo () (import chicken scheme) (use extras))
        <syntax>          (import chicken scheme)
        <syntax>          (##core#undefined)
        <syntax>          (use extras)  <--

Compiling foo.import.scm doesn't change this behavior. Compiling foo.scm to foo.so via csc -s foo.scm makes it work again. Looks like loading uncompiled extensions that use use (and possibly other special forms?) doesn't work from compiled programs. This has been tested with both 4.7.0 and aa2d6b8247b13476fe609d1fd263238cc10a6a8e.

Change History (1)

comment:1 Changed 11 years ago by Moritz Heidkamp

Description: modified (diff)
Note: See TracTickets for help on using tickets.