|
From: | Jay |
Subject: | RE: errors building guile 1.8.6 for Interix 3.5, with some small patches |
Date: | Fri, 19 Jun 2009 19:20:11 +0000 |
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: address@hidden To: address@hidden 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 |
[Prev in Thread] | Current Thread | [Next in Thread] |