unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: Re: Failure in test-suite/standalone/test-ffi test
Date: Fri, 30 Oct 2015 17:33:19 +0200	[thread overview]
Message-ID: <83r3kcz800.fsf@gnu.org> (raw)
In-Reply-To: <878u6kierv.fsf@gnu.org>

> From: ludo@gnu.org (Ludovic Courtès)
> Cc: guile-devel <guile-devel@gnu.org>
> Date: Fri, 30 Oct 2015 15:59:00 +0100
> 
> >      In unknown file:
> > 	?: 3 [primitive-load "d:/gnu/guile-2.0.11/test-suite/standalone/test-ffi"]
> >      In ice-9/eval.scm:
> >       453: 2 [eval # ()]
> >       387: 1 [eval # ()]
> >      In unknown file:
> > 	?: 0 [dynamic-func "strerror" #<dynamic-object #f>]
> >    ERROR: In procedure dynamic-func:
> >      ERROR: In procedure dynamic-pointer: Symbol not found: strerror
> >      FAIL: test-ffi
> >
> > Does this test make some unportable assumptions about the 'strerror'
> > symbol?
> 
> Yes.
> 
> Since the test just tries to use a global symbol exported from libc, we
> could use something else.

The equivalent of libc on Windows is a dynamic library, so these
functions are never statically linked into a program.

> Would ‘gethostname’ work on Windows?  That is, does:
> 
>   (dynamic-func "gethostname" (dynamic-link))
> 
> return a valid pointer?

No, that fails, but this works:

  (dynamic-func "strerror" (dynamic-link "msvcrt"))
    => #<pointer 0x77c371fa>

(msvcrt.dll is the Windows equivalent of libc.)

So I think global references will always fail on Windows, so we should
simply skip this part of the test on Windows.

Thanks.




      reply	other threads:[~2015-10-30 15:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-16 12:28 Failure in test-suite/standalone/test-ffi test Eli Zaretskii
2014-08-16 13:22 ` Eli Zaretskii
2015-10-30 14:59 ` Ludovic Courtès
2015-10-30 15: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=83r3kcz800.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.org \
    /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).