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.
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