Summary

Something goes wrong when generating inline file for module using foregin-lambda*

Metadata

Description

Same results with C5 30c894a.

 + more foo.scm bar.scm
 + cat
 ::::::::::::::
 foo.scm
 ::::::::::::::
 (module
  foo
  (foo)
  (import chicken scheme)
  (import (only foreign foreign-lambda*))
 
  (define (foo x)
    ((foreign-lambda* int ((int x)) "C_return ( x + 1 );")
     x))
  )
 ::::::::::::::
 bar.scm
 ::::::::::::::
 (use foo)
 (print (foo 1))
 + rm -f bar.o foo.so foo.inline foo.import.scm bar
 + csc -O3 -s -J -oi foo.inline foo.scm
 + csc -O3 bar.scm
 bar.c: In function ‘f_222’:
 bar.c:77:4: warning: implicit declaration of function ‘stub16’ [-Wimplicit-function-declaration]
  t4=stub16(C_SCHEME_UNDEFINED,t3);
     ^
 bar.o: In function `f_222':
 bar.c:(.text+0x475): undefined reference to `stub16'
 collect2: error: ld returned 1 exit status
 
 Error: shell command terminated with non-zero exit status 256: 'gcc' 'bar.o' -o 'bar' -L/home/user/programs/chicken-4.12.0/lib  -Wl,-R'/home/user/programs/chicken-4.12.0/lib' -lchicken -lm -ldl

Changes and comments

[2019-06-29 14:28:32 UTC] sjamaan changed status from new to closed

[2019-06-29 14:28:32 UTC] sjamaan set resolution to fixed

[2019-06-29 14:28:32 UTC] sjamaan wrote:

Fixed by 070f2d22e7409371198b4cefe16243e9de8419e9