unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Mark H Weaver <mhw@netris.org>
Cc: wingo@pobox.com, guile-devel@gnu.org
Subject: Re: Guile test-ffi uses an unportable assumption
Date: Sat, 13 Aug 2016 10:33:24 +0300	[thread overview]
Message-ID: <83a8ghdsxn.fsf@gnu.org> (raw)
In-Reply-To: <87mvklvxd8.fsf@netris.org> (message from Mark H Weaver on Wed, 10 Aug 2016 04:31:15 -0400)

> From: Mark H Weaver <mhw@netris.org>
> Cc: Andy Wingo <wingo@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



      reply	other threads:[~2016-08-13  7:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-23 11:51 Guile test-ffi uses an unportable assumption Eli Zaretskii
2016-07-23 21:17 ` Andy Wingo
2016-07-24 14:13   ` Eli Zaretskii
2016-08-10  8:31     ` Mark H Weaver
2016-08-13  7:33       ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a8ghdsxn.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=guile-devel@gnu.org \
    --cc=mhw@netris.org \
    --cc=wingo@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).