Re: configure cannot test when cross-compiling should be ok

2006-05-24 Thread The Senator

 eval.c:3248: warning: implicit declaration of function `alloca'

 The relevant line in the c file was I think in the debugging code,

Yes, but it's the debugging evaluator, ie. when you run with --debug
so you can see scheme-level backtraces.


Ok, so that probably needs fixing.


 so what's the best way to fix this?

I'd have thought mingw is supposed to provide alloca.h or something to
give that function.  It's Gnu C so it must exist, as __builtin_alloca
or whatever I suppose.


Indeed. There's no alloca.h in my mingw, but there's malloc.h:
[EMAIL PROTECTED]:/usr/i586-mingw32msvc/include$ ls a*.h
accctrl.h  aclapi.h  aclui.h  afxres.h  assert.h
[EMAIL PROTECTED]:/usr/i586-mingw32msvc/include$ ls *lloc*.h
malloc.h
[EMAIL PROTECTED]:/usr/i586-mingw32msvc/include$

--
Inside that malloc.h we have:

#ifdef  __cplusplus
extern C {
#endif
/*
  The _heap* memory allocation functions are supported on NT
  but not W9x. On latter, they always set errno to ENOSYS.
*/
_CRTIMP int __cdecl _heapwalk (_HEAPINFO*);
#ifdef __GNUC__
#define _alloca(x) __builtin_alloca((x))
#endif

#ifndef _NO_OLDNAMES
_CRTIMP int __cdecl heapwalk (_HEAPINFO*);
#ifdef __GNUC__
#define alloca(x) __builtin_alloca((x))
#endif
#endif  /* Not _NO_OLDNAMES */


So perhaps eval.c will need to include malloc.h, or is this autoconf's
(or even somebody else's) job?
--
Just in case this is needed, my mingw-gcc has these predefined macros:
[EMAIL PROTECTED]:~/temp$ touch test.h; i586-mingw32msvc-cpp -dM test.h | grep 
GNUC
#define __GNUC_PATCHLEVEL__ 2
#define __GNUC__ 3
#define __GNUC_MINOR__ 4

--

 I am not sure of the intent of this code. Is FIONREAD being used
 as a test for the presence of ioctl?

I think so.  If the ioctl constant FIONREAD exists then the ioctl
function exists ...

 It doesn't work here because FIONREAD (and more) is also defined in
 winsock...

Thanks.  I'll conditionalize it on ioctl existing too.

I see there's a select() in winsock.h, not sure if that's what should
be used in that bit of code ... maybe not.  I thought DOS did have a
way to ask if there was input waiting on an fd though.


??? This is out of my league, I don't know what to do about this. I'll
be happy to provide whatever information is required though.

--

I see boot-9 loads session.scm which loads documentation.scm which
uses regexps.  Bit annoying that.  I guess nobody's built anywhere
without regexps for a while.  It might work to remove the session line
from boot-9

(module-use! guile-user-module (resolve-interface '(ice-9 session)))


Yay, that does it, I finally got guile running!

[EMAIL PROTECTED] /cygdrive/c/guile2
$ ./a
guile (+ 1 1)
2
guile ((lambda (a b) (+ a b)) 4 5)
9
guile (write 'a)
aguile (write Lithp ith lithtening.)
Lithp ith lithtening.guile (exit)

Thanks for all the help!


You might be able to delete most of the guts of documentation.scm, it
shouldn't get used unless you run `help' or `procedure-documentation'
or whatever.



Well, since it runs now, I'll have a play around first, and see how far I get.

Thanks again, really appreciate that! If you, or any testers need more
details on my build options or other configurations, send me an email,
and I'll see what I can dig up.

Happy hacking!
___
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


Re: configure cannot test when cross-compiling should be ok

2006-05-14 Thread The Senator

Cool, thanks for the suggestions on the build process. I'll try those,
and hopefully I won't come back with errors.


Incidentally, last time I tried cross-compiling to mingw (a while ago
now) it didn't work.  I think in the end it bombed because mingw
didn't have pthreads and guile wasn't yet setup for no-threads in the
1.8 branch.  :(



Err, damn, lol. Should I use an older version of Guile perhaps? Which
version? (Or alternatively, is it hard to do that setup? I'm expecting
to mess around this a bit, so if it's a straight forward thing to do,
I can see how far I get, and provide feedback on that).

Have a good day.
___
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


Re: configure cannot test when cross-compiling should be ok

2006-05-14 Thread Kevin Ryde
The Senator [EMAIL PROTECTED] writes:

 checking for restartable system calls... configure: error: cannot run
 test program while cross compiling

You should be able to force it with

./configure ac_cv_sys_restartable_syscalls=yes

or no if that's the right answer, I don't know how system calls and
signals interact on mingw.

 --- configure-old-with-errors   2006-05-13 20:19:06.0 +1200
 +++ configure   2006-05-15 02:44:35.0 +1200
 @@ -37596,7 +37596,7 @@
 See \`config.log' for more details. 5
 echo $as_me: error: cannot run test program while cross compiling
 See \`config.log' for more details. 2;}
 -   { (exit 1); exit 1; }; }
 +  }

That's probably not what you want.


___
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile