> From: Mark H Weaver <m...@netris.org> > Cc: Andy Wingo <wi...@pobox.com>, guile-devel@gnu.org > Date: Wed, 10 Aug 2016 04:31:15 -0400 > > > However, in the case in point even compiling guile with -export-dynamic > > won't help, because the function being used by the test, strerror, > > comes from the C library, and is not statically linked into the guile > > binary. So I suggest to modify the test to use a function that is > > part of the guile binary's own sources. > > Sounds good to me. Here's a proposed patch. Can you test it on MinGW > and report back?
It still fails, see the error messages below. I think that's expected, since scm_c_hook_add is in libguile, which is built as a dynamic library, so should be accessed via dl_open'ing libguile. What I suggested above is to access a function whose code is inside the executable itself, i.e. some function in test-ffi-lib.c, such as test_make_c_hook. Here's the error message I got: Backtrace: In ice-9/boot-9.scm: 160: 11 [catch #t #<catch-closure d9f670> ...] In unknown file: ?: 10 [apply-smob/1 #<catch-closure d9f670>] In ice-9/boot-9.scm: 66: 9 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 432: 8 [eval # #] In ice-9/boot-9.scm: 2404: 7 [save-module-excursion #<procedure db6c60 at ice-9/boot-9.scm:4051:3 ()>] 4056: 6 [#<procedure db6c60 at ice-9/boot-9.scm:4051:3 ()>] 1727: 5 [%start-stack load-stack #<procedure c9b410 at ice-9/boot-9.scm:4047:10 ()>] 1732: 4 [#<procedure c10ba0 ()>] In unknown file: ?: 3 [primitive-load "d:/gnu/guile-2.0.12/test-suite/standalone/test-ffi"] In ice-9/eval.scm: 453: 2 [eval # ()] 387: 1 [eval # ()] In unknown file: ?: 0 [dynamic-func "scm_c_hook_add" #<dynamic-object #f>] ERROR: In procedure dynamic-func: ERROR: In procedure dynamic-pointer: Symbol not found: scm_c_hook_add FAIL: test-ffi