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

 
 

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

Submitted by:  None
Submitted on:  Wed 30 Dec 2009 03:21:47 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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 File(s):
   
   
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
  • -unavailable- added by wingo (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 03 Jan 2010 11:41:18 AM UTCwingoStatusNone=>Invalid
      Open/ClosedOpen=>Closed
    Wed 30 Dec 2009 03:21:47 PM UTCNoneAttached File-=>Added modexample.tgz, #19395

    Back to the top


    Powered by Savane 3.1-cleanup1