* Failure in test-suite/standalone/test-ffi test
@ 2014-08-16 12:28 Eli Zaretskii
2014-08-16 13:22 ` Eli Zaretskii
2015-10-30 14:59 ` Ludovic Courtès
0 siblings, 2 replies; 4+ messages in thread
From: Eli Zaretskii @ 2014-08-16 12:28 UTC (permalink / raw)
To: guile-devel
This test fails on MS-Windows in the MinGW build as follows:
Backtrace:
In ice-9/boot-9.scm:
157: 11 [catch #t #<catch-closure d9f620> ...]
In unknown file:
?: 10 [apply-smob/1 #<catch-closure d9f620>]
In ice-9/boot-9.scm:
63: 9 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
432: 8 [eval # #]
In ice-9/boot-9.scm:
2401: 7 [save-module-excursion #<procedure db6c80 at ice-9/boot-9.scm:4045:3 ()>]
4050: 6 [#<procedure db6c80 at ice-9/boot-9.scm:4045:3 ()>]
1724: 5 [%start-stack load-stack #<procedure ce4900 at ice-9/boot-9.scm:4041:10 ()>]
1729: 4 [#<procedure c0ecd8 ()>]
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? Or should I debug this?
TIA
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Failure in test-suite/standalone/test-ffi test
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
1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2014-08-16 13:22 UTC (permalink / raw)
To: guile-devel
> Date: Sat, 16 Aug 2014 15:28:00 +0300
> From: Eli Zaretskii <eliz@gnu.org>
>
> 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? Or should I debug this?
Answering myself here: according to libltdl documentation, the call to
lt_dlopen with the argument FILENAME being NULL will only work if the
program was linked with the -export-dynamic option to the linker.
So yes, this test does make some non-portable assumptions.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Failure in test-suite/standalone/test-ffi test
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
1 sibling, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2015-10-30 14:59 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: guile-devel
Eli Zaretskii <eliz@gnu.org> skribis:
> This test fails on MS-Windows in the MinGW build as follows:
>
> Backtrace:
> In ice-9/boot-9.scm:
> 157: 11 [catch #t #<catch-closure d9f620> ...]
> In unknown file:
> ?: 10 [apply-smob/1 #<catch-closure d9f620>]
> In ice-9/boot-9.scm:
> 63: 9 [call-with-prompt prompt0 ...]
> In ice-9/eval.scm:
> 432: 8 [eval # #]
> In ice-9/boot-9.scm:
> 2401: 7 [save-module-excursion #<procedure db6c80 at ice-9/boot-9.scm:4045:3 ()>]
> 4050: 6 [#<procedure db6c80 at ice-9/boot-9.scm:4045:3 ()>]
> 1724: 5 [%start-stack load-stack #<procedure ce4900 at ice-9/boot-9.scm:4041:10 ()>]
> 1729: 4 [#<procedure c0ecd8 ()>]
> 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.
Would ‘gethostname’ work on Windows? That is, does:
(dynamic-func "gethostname" (dynamic-link))
return a valid pointer?
If the answer is yes, I’ll adapt this test to use this symbol instead.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Failure in test-suite/standalone/test-ffi test
2015-10-30 14:59 ` Ludovic Courtès
@ 2015-10-30 15:33 ` Eli Zaretskii
0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2015-10-30 15:33 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guile-devel
> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-30 15:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).