Greetings folks,

Thanks for a great piece of software!

I am building guile using the guile-1.8.0 tarball downloaded from the
frontpage of I have successfully used the
tarball to compile  guile-1.8.0 to run on Linux, but couldn't get it
(cross-compile) to run on windows. I am using

i586-mingw32msvc-gcc (GCC) 3.4.2 (mingw-special)

as my cross-compiler. My first problem is:
./configure gets stuck with the following message.

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

Trawling on the Internet, I found the following suggestion, and
reproduce an excerpt here for completeness. Full post at

> In order to get cross-compile to work, the exit(1) code needs to
> be removed from the ./configure script when checking for writeable
> argv.

Thanks for catching this, Ben.

It turns out the AC_TRY_RUN() macro was not being used properly in
the script. I've now patched it to instead use
AC_RUN_IFELSE() and when cross-compiling, the option will default to
'no' and also output a warning about this being a default and not
actually checked for.

So I have followed the suggestion (to remove the exit calls) for now,
and deleted the exit codes, so that no testing is done since this is
meaningless. Refer to patch below. Of course, it should be that gets patched, but I am still reading through that,
so I'm not confident enough to do that myself. I am not too sure about
this fix even, but hopefully, someone can pick this up and run with

--- configure-old-with-errors   2006-05-13 20:19:06.000000000 +1200
+++ configure   2006-05-15 02:44:35.000000000 +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; }; }
+  }
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */

That manages to get me past the configure stage. For completeness,
here's my custom options (mostly related to me having a separate
directory for this particular build & dependencies):

export mybuild-dir=/home/tyc20/code/guile/guile-1.8.0
export CC=i586-mingw32msvc-gcc
export CPPFLAGS=-I$mybuild-dir/libgmp/include\
-I$mybuild-dir/libtool/win/include  # c PreProcessor flags.
export LDFLAGS=-L$mybuild-dir/libgmp/lib\ -L$mybuild-dir/libtool/win/lib
# export GUILE_FOR_BUILD # just leave this for now. We can use Linux
guile (older version even!) can't we?

./configure --prefix=/home/tyc20/code/guile/guile-1.8.0/win
--build=i486-linux-gnu --host=i586-mingw32msvc

That now runs fine. However, make runs into problems because
fileblocks is unavailable.

Generating libpath.h...
./guile-snarf -o load.x load.c -DHAVE_CONFIG_H -I..
-I/home/tyc20/code/guile/guile-1.8.0/libtool/win/include -g -O2 -Wall
-Wmissing-prototypes -Werror
make[2]: *** No rule to make target `fileblocks.x', needed by `all'.  Stop.
make[2]: Leaving directory
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tyc20/downloads/guile-test-install-dir'
make: *** [all] Error 2

It's a bit hard to track down, but I believe it's related to this line
in the Makefile

EXTRA_DOT_DOC_FILES = dynl.doc filesys.doc posix.doc net_db.doc
socket.doc win32-uname.doc win32-dirent.doc win32-socket.doc
inet_aton.doc mkstemp.doc fileblocks.doc

Looking at the other files on this line as well, it seems fileblocks.c
and fileblocks.h are needed. What gives? Were they in older guile
source-trees? I still don't know what is wrong here exactly (or if
this is a bug even), so any pointers would be appreciated. I've read
through the file (saw commented code for removing
fileblocks.o using sed, but there're also some comments about
AC_STRUCT_ST_BLOCKS, which I don't understand (yet :))).

As a general question as well (slightly off-topic), it seems the files
in EXTRA_DOT_DOC_FILES are compatibility-ish wrappers (for windows
perhaps). Are they reused from some other project or are they specific
to guile only?

Cheers everyone!
Bug-guile mailing list

Reply via email to