[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile 1.5.2 problems on cygwin

From: Gerrit P. Haase
Subject: guile 1.5.2 problems on cygwin
Date: Sun, 16 Sep 2001 03:03:23 +0200


I wanted to build guile on cygwin.
I had some problems with this.
After compiling successful, i got problems with regex:
A guile script from lilypond causes this error.
$ ./as2text
/usr/share/guile/1.5.2/ice-9/getopt-long.scm:252:32: In procedure 
scm_allocate_string in expression (make-regexp "^-([a-zA-Z]+)(.*)"):
/usr/share/guile/1.5.2/ice-9/getopt-long.scm:252:32: Argument 1 out of range: 

I tried also the crosscompiled version 1.4-1 from lilypond website 
and this works fine.
I'm not sure what is the reason for this problem, it seems libregex/librx were 
not inclded in LIBS/GUILE_LIBS like libcrypt and libm.
On cygwin it is needed to link against libregex or librxposix.
I don't know how to implement this in the autoscripts.
I added libregex to the macros GUILE_LIBS and LIBS in the Makefiles
and it works fine after building that.

I tried 1.4 and also 1.5.2 from a recent snapshot.
There are some defines in 1.5.2 (not in 1.4) which are for mingw32
but they don't fit for cygwin.

In particular:
#ifdef HAVE_WINSOCK2_H (several places)
and (net_db.c):
#if !defined(HAVE_H_ERRNO) && !defined(__MINGW32__)
/* h_errno not found in netdb.h, maybe this will help.  */
extern int h_errno;

It would be helpful to include also some options for cygwin, 
because it differs much from the mingw32 behaviour.
I needed to patch some files to get to compile on cygwin without
errors, see attached patch.
This or I need to rename winsock2.h so it isn't found during

It is only a temporary fix, it should be included in configure 
checks so HAVE_WINSOCK2_H gets not defined if OS is cygwin.

diff -ur guile-core-20010912-orig/libguile/net_db.c 
--- guile-core-20010912-orig/libguile/net_db.c  Mon Jul  9 16:36:09 2001
+++ guile-core-20010912/libguile/net_db.c       Sat Sep 15 18:58:52 2001
@@ -74,7 +74,7 @@
 #include <arpa/inet.h>
-#if !defined (HAVE_H_ERRNO) && !defined (__MINGW32__)
+#if !defined(HAVE_H_ERRNO) && !defined(__MINGW32__) && !defined(__CYGWIN__)
 /* h_errno not found in netdb.h, maybe this will help.  */
 extern int h_errno;
diff -ur guile-core-20010912-orig/libguile/ 
--- guile-core-20010912-orig/libguile/    Wed Sep 12 01:00:17 2001
+++ guile-core-20010912/libguile/ Sat Sep 15 18:55:19 2001
@@ -612,7 +612,9 @@
 /* Define if you have the <winsock2.h> header file. */
+#if !defined(__CYGWIN__)
 /* Name of package */
 #undef PACKAGE



reply via email to

[Prev in Thread] Current Thread [Next in Thread]