GNU bug report logs - #10474
Building guile 2.x under mingw + msys

Previous Next

Package: guile;

Reported by: Andy Wingo <wingo <at> pobox.com>

Date: Tue, 10 Jan 2012 21:59:02 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Andy Wingo <wingo <at> pobox.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#10474: closed (Building guile 2.x under mingw + msys)
Date: Sun, 24 Feb 2013 13:27:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 24 Feb 2013 14:25:06 +0100
with message-id <87zjythmj1.fsf <at> pobox.com>
and subject line Re: bug#10474: Building guile 2.x under mingw + msys
has caused the debbugs.gnu.org bug report #10474,
regarding Building guile 2.x under mingw + msys
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
10474: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10474
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Andy Wingo <wingo <at> pobox.com>
To: bug-guile <at> gnu.org
Cc: commander.sirow <at> googlemail.com
Subject: Building guile 2.x under mingw + msys
Date: Tue, 10 Jan 2012 22:58:05 +0100
[Message part 3 (message/rfc822, inline)]
From: Commander Sirow <commander.sirow <at> googlemail.com>
To: guile-user <at> gnu.org
Subject: Building guile 2.x under mingw + msys
Date: Tue, 3 Jan 2012 16:46:55 +0100
[Message part 4 (text/plain, inline)]
Hi there,

so I've been trying to build guile 2.0.3 from source with mingw (gcc 4.6.2)
+ msys.

So far I've been making progress by going with
./configure --without-threads --disable-shared

Add:
- - - - - - - -
#ifndef HAVE_STRUCT_TIMESPEC
#define HAVE_STRUCT_TIMESPEC 1
struct timespec {
        long tv_sec;
        long tv_nsec;
};
#endif /* HAVE_STRUCT_TIMESPEC */
- - - - - - - -
to libguile/threads.c, because pthread.h does not seem to set the timespec
struct. I'm using Pthreads-w32 which does have this struct in its
pthread.h, but for some weird reason id does not define the struct
(dereferencing pointer to imcomplete type).

And add:
- - - - - - - -
#ifdef __MINGW32__
static void
setenv (char const *name, char const *value, int overwrite)
{
  (void) overwrite;
  int len = strlen (value) + strlen (value) + 2;
  char *str = malloc (len);
  sprintf (str, "%s=%s", name, value);
  putenv (str);
}
#endif /* __MINGW32__ */
- - - - - - - -
to libguile/dynl.c because Windows does only have putenv and not setenv.

Commented out:
- - - - - - - -
_GL_FUNCDECL_SYS (getnameinfo, int,
                  (const struct sockaddr *restrict sa, socklen_t salen,
                   char *restrict node, socklen_t nodelen,
                   char *restrict service, socklen_t servicelen,
                   int flags)
                  _GL_ARG_NONNULL ((1)));
- - - - - - - -
and
- - - - - - - -
_GL_FUNCDECL_SYS (getaddrinfo, int,
                  (const char *restrict nodename,
                   const char *restrict servname,
                   const struct addrinfo *restrict hints,
                   struct addrinfo **restrict res)
                  _GL_ARG_NONNULL ((4)));
- - - - - - - -
and
- - - - - - - -
_GL_FUNCDECL_SYS (inet_ntop, const char *,
                  (int af, const void *restrict src,
                   char *restrict dst, socklen_t cnt)
                  _GL_ARG_NONNULL ((2, 3)));
- - - - - - - -
and
- - - - - - - -
_GL_FUNCDECL_SYS (inet_pton, int,
                  (int af, const char *restrict src, void *restrict dst)
                  _GL_ARG_NONNULL ((2, 3)));
- - - - - - - -
in lib/netdb.h and /lib/arpa/inet.h because those are given by winsock2.h
(Was getting compiler errors otherwise).

Added:
- - - - - - - -
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <ws2tcpip.h>
#include <arpa/inet.h>
#include <errno.h>
#include <netinet/in.h>
#include <signal.h>
#include <winsock.h>
#include <winsock2.h>
- - - - - - - -
to libguile/net_db.c because I got missing AI_* and EAI_* defines.
(winsock2.h would probably have been enough, but I wanted to be sure)

After that compilation went fine up until (and past) generating
guile-procedures.texi:
- - - - - - - -
make[3]: Entering directory `/home/Commander/guile-2.0.3/libguile'
  GEN    guile-procedures.texi
Throw without catch before boot:
Throw to key system-error with args ("canonicalize-path" "~A" ("No such
file or
directory") (2))Aborting.

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
make[3]: *** [guile-procedures.texi] Error 1
make[3]: Leaving directory `/home/Commander/guile-2.0.3/libguile'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/Commander/guile-2.0.3/libguile'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Commander/guile-2.0.3'
make: *** [all] Error 2
- - - - - - - -
When "This application has requested the Runtime to terminate it in an
unusual way.
Please contact the application's support team for more information." occurs
the application crashes.

When calling guile.exe directly I get:
- - - - - - - -
$ guile
Throw without catch before boot:
Throw to key misc-error with args ("primitive-load-path" "Unable to find
file ~S
 in load path" ("ice-9/boot-9") #f)Aborting.

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
- - - - - - - -
and the same crash occures.

I'm currently a bit out of ideas what to do next, eg. if the
error/exception throw is causing guile to crash or if there is something
wrong with what I modified inside the source causing this.


PS: I get the same behavior when configuring with:
./configure --without-threads --disable-shared scm_cv_struct_timespec=no
ac_cv_type_struct_addrinfo=no
[Message part 5 (text/html, inline)]
[Message part 6 (text/plain, inline)]

-- 
http://wingolog.org/
[Message part 7 (message/rfc822, inline)]
From: Andy Wingo <wingo <at> pobox.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: ludo <at> gnu.org, 10474-done <at> debbugs.gnu.org
Subject: Re: bug#10474: Building guile 2.x under mingw + msys
Date: Sun, 24 Feb 2013 14:25:06 +0100
On Tue 19 Feb 2013 19:00, Eli Zaretskii <eliz <at> gnu.org> writes:

>> > 	* libguile/load.c (scm_init_load_path) [__MINGW32__]: Convert
>> > 	backslashes to forward slashes in values of GUILE_LOAD_PATH and
>> > 	GUILE_LOAD_COMPILED_PATH.
>> 
>> Is this necessary now that backslash is recognized as a file name
>> separator?
>
> Possibly.  But are you sure there's no more references to '/' alone in
> C code (as opposed to in Scheme)?

I am pretty sure, yes.  I just pushed some patches to make sure this is
the case, altering load.c's logic to be more structurally similar to
boot-9.scm's and preferring backslashes on Windows.

So with these last commits, hopefully native MinGW builds are supported.
Would you mind testing again?  Please send a new mail to
bug-guile <at> gnu.org to track any new failures.

Thanks,

Andy
-- 
http://wingolog.org/


This bug report was last modified 12 years and 93 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.