unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* RE: errors building guile 1.8.6 for Interix 3.5, with some small patches
@ 2009-06-19 19:20 Jay
  2010-03-26  1:07 ` Neil Jerram
  0 siblings, 1 reply; 2+ messages in thread
From: Jay @ 2009-06-19 19:20 UTC (permalink / raw)
  To: bug-guile

[-- Attachment #1: Type: text/plain, Size: 7429 bytes --]


Here is a very strange but successul fix for the hang. Now guile 1.8.6 builds all the way through for me.

 

 

C:\src\guile-1.8.6\libguile>\cygwin\bin\diff -u iselect.h.orig iselect.h
--- iselect.h.orig      2009-06-19 12:14:43.265625000 -0700
+++ iselect.h   2009-06-19 12:15:00.031250000 -0700
@@ -38,7 +38,12 @@
 #ifdef FD_SET

 #define SELECT_TYPE fd_set
+#if defined(__INTERIX) && FD_SETSIZE == 4096
+/* Interix defines FD_SETSIZE 4096 but select rejects that. */
+#define SELECT_SET_SIZE 1024
+#else
 #define SELECT_SET_SIZE FD_SETSIZE
+#endif

 #else /* no FD_SET */

 

 

 - Jay

 


From: jay.krell@cornell.edu
To: bug-guile@gnu.org
Subject: errors building guile 1.8.6 for Interix, with some small patches
Date: Fri, 19 Jun 2009 18:52:22 +0000



/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.. -I/src/g
uile-1.8.6 -I.. -g -O2 -Wall -Wmissing-prototypes -Werror -MT filesys.lo -MD -
MP -MF .deps/filesys.Tpo -c -o filesys.lo /src/guile-1.8.6/libguile/filesys.c
libtool: compile: gcc -DHAVE_CONFIG_H -I.. -I/src/guile-1.8.6 -I.. -g -O2 -Wall
-Wmissing-prototypes -Werror -MT filesys.lo -MD -MP -MF .deps/filesys.Tpo -c /s
rc/guile-1.8.6/libguile/filesys.c -DPIC -o .libs/filesys.o
/src/guile-1.8.6/libguile/filesys.c: In function `scm_readdir':
/src/guile-1.8.6/libguile/filesys.c:918: warning: implicit declaration of functi
on `readdir_r'
make[3]: *** [filesys.lo] Error 1
make[3]: Leaving directory `/dev/fs/C/obj/guile/libguile'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/dev/fs/C/obj/guile/libguile'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/dev/fs/C/obj/guile'
make: *** [all] Error 2
bash-4.0$ '
 
 
c:\sfu\usr\include\dirent.h
 
 
#if defined ( _REENTRANT ) || (_POSIX_C_SOURCE - 0 >= 199506L)
extern int __cdecl readdir_r(DIR *, struct dirent *, 
struct dirent **);
#endif
 
 
config.log
configure:26632: checking for readdir_r
configure:26688: gcc -o conftest -g -O2 conftest.c -lm -lltdl >&5
configure:26695: $? = 0
configure:26717: result: yes
 
 
This is very typical of configure problems now in my experience.
configure compiles one way, checks for linking.
Compilation then does something different and fails.
I have seen this many times now in various projects.
 
 
C:\src\guile-1.8.6\libguile>\cygwin\bin\diff -u filesys.c.orig filesys.c
--- filesys.c.orig 2009-06-19 11:32:41.984375000 -0700
+++ filesys.c 2009-06-19 11:33:00.171875000 -0700
@@ -20,7 +20,7 @@
/* See stime.c for comments on why _POSIX_C_SOURCE is not always defined. */
#define _LARGEFILE64_SOURCE /* ask for stat64 etc */
-#ifdef __hpux
+#if defined(__hpux) || defined(__INTERIX)
#define _POSIX_C_SOURCE 199506L /* for readdir_r */
#endif
 
 
Hm. reading stime.c makes me think defining _REENTRANT would be better,
since it probably only gives where _POSIX can take away?
So, this also worked:
 
 
C:\src\guile-1.8.6\libguile>\cygwin\bin\diff -u filesys.c.orig filesys.c
--- filesys.c.orig      2009-06-19 11:32:41.984375000 -0700
+++ filesys.c   2009-06-19 11:48:15.546875000 -0700
@@ -23,6 +23,9 @@
 #ifdef __hpux
 #define _POSIX_C_SOURCE 199506L  /* for readdir_r */
 #endif
+#ifndef _REENTRANT
+# define _REENTRANT   /* ask Interix for readdir_r prototype */
+#endif
 #ifdef HAVE_CONFIG_H
 #  include <config.h>

 
Surely:
#if !defined(_REENTRANT) && defined(__INTERIX)
would also work if you want to narrow it down (but stime.c doesn't).
 
 
/src/guile-1.8.6/libguile/posix.c: In function `scm_seteuid':
/src/guile-1.8.6/libguile/posix.c:728: warning: implicit declaration of function
`seteuid'
/src/guile-1.8.6/libguile/posix.c: In function `scm_setegid':
/src/guile-1.8.6/libguile/posix.c:753: warning: implicit declaration of function
`setegid'
/src/guile-1.8.6/libguile/posix.c: In function `scm_putenv':
/src/guile-1.8.6/libguile/posix.c:1364: warning: implicit declaration of functio
n `unsetenv'
/src/guile-1.8.6/libguile/posix.c: In function `scm_crypt':
/src/guile-1.8.6/libguile/posix.c:1611: warning: implicit declaration of functio
n `crypt'
/src/guile-1.8.6/libguile/posix.c:1611: warning: assignment makes pointer from i
nteger without a cast
make[3]: *** [posix.lo] Error 1
make[3]: Leaving directory `/dev/fs/C/obj/guile/libguile'
 
 
I don't see these prototyped anywhere.
I don't know if this patch is acceptable, since it doesn't adapt in the future if Interix improves.
I also think there is confusion here between HAVE_SETEUID and HAVE_SETEGID.
It appears gnulib could help with unsetenv.
 
 
C:\src\guile-1.8.6\libguile>\cygwin\bin\diff -u posix.c.orig posix.c
--- posix.c.orig 2008-12-08 09:42:55.000000000 -0800
+++ posix.c 2009-06-19 11:39:28.500000000 -0700
@@ -724,7 +724,7 @@
{
int rv;
-#ifdef HAVE_SETEUID
+#if defined(HAVE_SETEUID) && !defined(__INTERIX)
rv = seteuid (scm_to_int (id));
#else
rv = setuid (scm_to_int (id));
@@ -749,7 +749,7 @@
{
int rv;
-#ifdef HAVE_SETEUID
+#if defined(HAVE_SETEUID) && !defined(__INTERIX)
rv = setegid (scm_to_int (id));
#else
rv = setgid (scm_to_int (id));
@@ -1359,7 +1359,7 @@
build would be to try "NAME" then "NAME=" at runtime, if that's not
too much like overkill. */
-#if HAVE_UNSETENV
+#if HAVE_UNSETENV && !defined(__INTERIX)
/* when unsetenv() exists then we use it */
unsetenv (c_str);
free (c_str);
@@ -1587,7 +1587,7 @@
multiple cpus. So for now we don't bother with anything fancy, just
ensure it works. */
-#if HAVE_CRYPT
+#if HAVE_CRYPT && !defined(__INTERIX)
SCM_DEFINE (scm_crypt, "crypt", 2, 0, 0,
(SCM key, SCM salt),
"Encrypt @var{key} using @var{salt} as the salt value to the\n"
C:\src\guile-1.8.6\libguile>
 
 
Later on I get to:
gawk -f ./guile-func-name-check /src/guile-1.8.6/libguile/regex-posix.c
(./guile-snarf-docs -DHAVE_CONFIG_H -I.. -I/src/guile-1.8.6 -I.. -g -O2 -Wall -
Wmissing-prototypes -Werror /src/guile-1.8.6/libguile/regex-posix.c | \
./guile_filter_doc_snarfage --filter-snarfage) > regex-posix.doc || { rm
regex-posix.doc; false; }
cat alist.doc arbiters.doc async.doc backtrace.doc boolean.doc chars.doc continu
ations.doc debug.doc deprecation.doc deprecated.doc discouraged.doc dynl.doc dyn
wind.doc environments.doc eq.doc error.doc eval.doc evalext.doc extensions.doc f
eature.doc fluids.doc fports.doc futures.doc gc.doc goops.doc gsubr.doc gc-mark.
doc gc-segment.doc gc-malloc.doc gc-card.doc guardians.doc hash.doc hashtab.doc
hooks.doc i18n.doc init.doc ioext.doc keywords.doc lang.doc list.doc load.doc ma
cros.doc mallocs.doc modules.doc numbers.doc objects.doc objprop.doc options.doc
pairs.doc ports.doc print.doc procprop.doc procs.doc properties.doc random.doc
rdelim.doc read.doc root.doc rw.doc scmsigs.doc script.doc simpos.doc smob.doc s
ort.doc srcprop.doc stackchk.doc stacks.doc stime.doc strings.doc srfi-4.doc srf
i-13.doc srfi-14.doc strorder.doc strports.doc struct.doc symbols.doc threads.do
c throw.doc values.doc variable.doc vectors.doc version.doc vports.doc weaks.doc
ramap.doc unif.doc dynl.doc filesys.doc posix.doc net_db.doc socket.doc regex-p
osix.doc | GUILE="/dev/fs/C/obj/guile/pre-inst-guile" /src/guile-1.8.6/scripts/s
narf-check-and-output-texi > guile-procedures.texi || { rm guile-proced
ures.texi; false; }
ERROR: In procedure fport_input_waiting:
ERROR: Invalid argument
 
 
and it hangs.
I'll try to look into that later but might just configure -disable-doc and move on, leaving it hanging for anyone else. :(
 
 
- Jay


[-- Attachment #2: Type: text/html, Size: 8821 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: errors building guile 1.8.6 for Interix 3.5, with some small patches
  2009-06-19 19:20 errors building guile 1.8.6 for Interix 3.5, with some small patches Jay
@ 2010-03-26  1:07 ` Neil Jerram
  0 siblings, 0 replies; 2+ messages in thread
From: Neil Jerram @ 2010-03-26  1:07 UTC (permalink / raw)
  To: Jay; +Cc: bug-guile

Jay <jay.krell@cornell.edu> writes:

> Here is a very strange but successul fix for the hang. Now guile 1.8.6 builds
> all the way through for me.
>  
>  
> C:\src\guile-1.8.6\libguile>\cygwin\bin\diff -u iselect.h.orig iselect.h
> --- iselect.h.orig      2009-06-19 12:14:43.265625000 -0700
> +++ iselect.h   2009-06-19 12:15:00.031250000 -0700
> @@ -38,7 +38,12 @@
>  #ifdef FD_SET
>  #define SELECT_TYPE fd_set
> +#if defined(__INTERIX) && FD_SETSIZE == 4096
> +/* Interix defines FD_SETSIZE 4096 but select rejects that. */
> +#define SELECT_SET_SIZE 1024
> +#else
>  #define SELECT_SET_SIZE FD_SETSIZE
> +#endif
>  #else /* no FD_SET */

Thanks, I've committed this fix.

     Neil




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-26  1:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-19 19:20 errors building guile 1.8.6 for Interix 3.5, with some small patches Jay
2010-03-26  1:07 ` Neil Jerram

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