bugGuile - Bugs: bug #28442, Compiler not seeing module define...

 
 

bug #28442: Compiler not seeing module define in load-extension

Submitter:  None
Submitted:  Wed 30 Dec 2009 03:21:47 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 03 Jan 2010 11:41:18 AM UTC, comment #2: 

See discussion in http://article.gmane.org/gmane.lisp.guile.devel/9815. Closing as invalid, as it appears that the module in question needs to have an eval-when (or eval-case if 1.8 compatibility is needed). Thanks for the report, and let us know if you have further problems.

Andy Wingo <wingo>
Group administrator
Wed 30 Dec 2009 04:04:39 PM UTC, comment #1: 

A strace does show guile stat'ing for mymodule-prim(.scm),

...
[pid  3056] stat64("./dir/mymodule-prim.scm", 0xbfcda24c) = -1 ENOENT (No such file or directory)
[pid  3056] stat64("./dir/mymodule-prim", 0xbfcda24c) = -1 ENOENT (No such file or directory)
[pid  3056] stat64("/usr/local/share/guile/1.9/dir/mymodule-prim.scm", 0xbfcda24c) = -1 ENOENT (No such file or directory)
[pid  3056] stat64("/usr/local/share/guile/1.9/dir/mymodule-prim", 0xbfcda24c) = -1 ENOENT (No such file or directory)
[pid  3056] stat64("/usr/local/share/guile/site/dir/mymodule-prim.scm", 0xbfcda24c) = -1 ENOENT (No such file or directory)
[pid  3056] stat64("/usr/local/share/guile/site/dir/mymodule-prim", 0xbfcda24c) = -1 ENOENT (No such file or directory)
[pid  3056] stat64("/usr/local/share/guile/dir/mymodule-prim.scm", 0xbfcda24c) = -1 ENOENT (No such file or directory)
[pid  3056] stat64("/usr/local/share/guile/dir/mymodule-prim", 0xbfcda24c) = -1 ENOENT (No such file or directory)
[pid  3056] stat64("/usr/local/lib/guile/1.9/ccache/dir/mymodule-prim.go", 0xbfcda28c) = -1 ENOENT (No such file or directory)
...

Anonymous
Wed 30 Dec 2009 03:21:47 PM UTC, original submission:  

Attached is a module fashioned after those currently generated by swig. It uses a scheme wrapper that uses a module import with a rename to import a module via an extension.

All code still works but the compiler compains that that module provided by the load-extension does not exist

untar the attached archive and run make. The output I get from git master is...

gcc -fpic -L/usr/local/include -c test-module.c
gcc -shared test-module.o -o test-module.so
LD_LIBRARY_PATH=. guile -L . test-script.scm
;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-autocompile argument to disable.
;;; compiling ./dir/mymodule.scm
;;; WARNING: compilation of ./dir/mymodule.scm failed:
;;; key misc-error, throw args (#f "~A ~S" ("no code for module" (dir mymodule-prim)) #f)
see, it does still work: 32

The code has run and worked, the symbols are all there, but the compiler still warns of "no code for module"

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #19395:  modexample.tgz added by None (787B - application/x-compressed - sample module code)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by wingo (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-01-03 wingo StatusNone Invalid
        Open/ClosedOpen Closed
    2009-12-30 None Attached File- Added modexample.tgz, #19395

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code