From: Neil Jerram <neil@ossau.uklinux.net>
To: Sylvain Beucler <beuc@beuc.net>
Cc: bug-guile@gnu.org
Subject: Re: Cross-compiling with mingw
Date: Thu, 25 Jun 2009 21:47:45 +0100 [thread overview]
Message-ID: <877hz0ujke.fsf@arudy.ossau.uklinux.net> (raw)
In-Reply-To: <20080528210005.GA19203@perso.beuc.net> (Sylvain Beucler's message of "Wed\, 28 May 2008 23\:00\:05 +0200")
[-- Attachment #1: Type: text/plain, Size: 2110 bytes --]
Sylvain Beucler <beuc@beuc.net> writes:
>> i586-mingw32msvc-gcc -I/usr/local/cross-tools/i386-mingw32msvc/include -g -O2 -Wall -Wmissing-prototypes -Werror .libs/guile.exeS.o -I/usr/local/cross-tools/i386-mingw32msvc/include -o guile.exe guile-guile.o -Wl,--export-dynamic -L/usr/local/cross-tools/i386-mingw32msvc/lib ./.libs/libguile.a /usr/local/cross-tools/i386-mingw32msvc/lib/libgmp.a -lws2_32 /usr/local/cross-tools/i386-mingw32msvc/lib/libltdl.dll.a -L/usr/local/cross-tools/i386-mingw32msvc/lib -L/usr/local/cross-tools/i386-mingw32msvc/lib
>> guile-guile.o: In function `main':
>> /usr/src/guile-1.8.5/libguile/guile.c:74: undefined reference to `__imp__scm_boot_guile'
>> guile-guile.o: In function `inner_main':
>> /usr/src/guile-1.8.5/libguile/guile.c:55: undefined reference to `__imp__gdb_options'
>> /usr/src/guile-1.8.5/libguile/guile.c:55: undefined reference to `__imp__gdb_language'
>> /usr/src/guile-1.8.5/libguile/guile.c:55: undefined reference to `__imp__gdb_result'
>> /usr/src/guile-1.8.5/libguile/guile.c:55: undefined reference to `__imp__gdb_output'
>> /usr/src/guile-1.8.5/libguile/guile.c:55: undefined reference to `__imp__gdb_output_length'
>> /usr/src/guile-1.8.5/libguile/guile.c:55: undefined reference to `__imp__gdb_maybe_valid_type_p'
>> /usr/src/guile-1.8.5/libguile/guile.c:55: undefined reference to `__imp__gdb_read'
>> /usr/src/guile-1.8.5/libguile/guile.c:55: undefined reference to `__imp__gdb_eval'
>> /usr/src/guile-1.8.5/libguile/guile.c:55: undefined reference to `__imp__gdb_print'
>> /usr/src/guile-1.8.5/libguile/guile.c:55: undefined reference to `__imp__gdb_binding'
>> /usr/src/guile-1.8.5/libguile/guile.c:59: undefined reference to `__imp__scm_shell'
>> collect2: ld returned 1 exit status
>> rm -f .libs/guile.exeS.o
>> make[3]: *** [guile.exe] Erreur 1
The area of import/export/visibility has moved on a bit since this
report, and the only troublesome bindings now are 3 gdb_* ones, which
we don't actually need. I've pushed the patch below, and hopefully
we'll now have a complete MinGW build (of branch_release-1-8).
Regards,
Neil
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Remove-GDB_INTERFACE-stuff-from-guile-s-main-program.patch --]
[-- Type: text/x-diff, Size: 2711 bytes --]
From 8510e39278161d3cbf8ec4ba87b123fe28763ed4 Mon Sep 17 00:00:00 2001
From: Neil Jerram <neil@ossau.uklinux.net>
Date: Thu, 25 Jun 2009 21:40:32 +0100
Subject: [PATCH] Remove GDB_INTERFACE stuff from guile's main program
The main motivation for this is wanting a successful MinGW build,
which is currently failing with:
guile-guile.o: In function `inner_main':
/home/neil/SW/Guile/ovnight/libguile/guile.c:55: undefined reference to `__imp__gdb_result'
/home/neil/SW/Guile/ovnight/libguile/guile.c:55: undefined reference to `__imp__gdb_output'
/home/neil/SW/Guile/ovnight/libguile/guile.c:55: undefined reference to `__imp__gdb_output_length'
The detailed problem here is to do with how those variables are
declared as exported from the libguile DLL and imported by the guile.c
main program. But in fact we don't need to solve that problem because
the GDB interface is an idea that never actually happened. So here we
just remove the offending variable references from guile.c.
For the record, Guile contains two kinds of GDB support, one of which
is real (and works, last time I tried it), and the other mythical.
The first kind is that libguile includes the utility functions
gdb_print, gdb_eval, etc., and the variable gdb_output. These have no
purpose except for developers to use from GDB when debugging
something. For example, if you have a SCM x and want to know what it
is, you can do:
(gdb) call gdb_print(x)
(gdb) p gdb_output
The second kind is that those utility functions are somehow declared
to GDB, and then GDB itself uses/calls them in some useful way. This
was an interesting idea, but (AFAICT) never actually happened.
I think it's worth leaving gdb_interface.h in the repository and the
distribution, in case this idea is properly resurrected in the future.
* libguile/guile.c (top level): Remove GDB_INTERFACE declaration.
(inner_main): Remove GDB_INTERFACE_INIT call.
---
libguile/guile.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/libguile/guile.c b/libguile/guile.c
index c8341c2..3e01b57 100644
--- a/libguile/guile.c
+++ b/libguile/guile.c
@@ -40,11 +40,6 @@
#include <winsock2.h>
#endif
-/* Debugger interface (don't change the order of the following lines) */
-#define GDB_TYPE SCM
-#include <libguile/gdb_interface.h>
-GDB_INTERFACE;
-
static void
inner_main (void *closure SCM_UNUSED, int argc, char **argv)
{
@@ -52,7 +47,6 @@ inner_main (void *closure SCM_UNUSED, int argc, char **argv)
/* This is necessary to startup the Winsock API under Win32. */
WSADATA WSAData;
WSAStartup (0x0202, &WSAData);
- GDB_INTERFACE_INIT;
#endif /* __MINGW32__ */
/* module initializations would go here */
--
1.5.6.5
next prev parent reply other threads:[~2009-06-25 20:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-26 20:43 Cross-compiling with mingw Sylvain Beucler
2008-05-28 21:00 ` Sylvain Beucler
2009-06-25 20:47 ` Neil Jerram [this message]
2009-06-21 16:34 ` Neil Jerram
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=877hz0ujke.fsf@arudy.ossau.uklinux.net \
--to=neil@ossau.uklinux.net \
--cc=beuc@beuc.net \
--cc=bug-guile@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).