* [PATCH]: Cross building and Cygwin fixes.
@ 2002-07-03 16:25 Jan Nieuwenhuizen
2002-07-07 20:35 ` Marius Vollmer
0 siblings, 1 reply; 11+ messages in thread
From: Jan Nieuwenhuizen @ 2002-07-03 16:25 UTC (permalink / raw)
Cc: Han-Wen
Hi,
Today I spent making a fresh Guile patch to get it compiled for
Cygwin, and to fix cross building issues that were introduced during
Guile's 1.5 development cycle.
It's against latest 1.6 CVS, making use of autoconf, automake, and
libtool from CVS, that are supposed to have fresh fixes for Cygwin.
I still can't get the shared version to link:
/bin/sh ../libtool --mode=link gcc -I/home/cygwin/cygwin-1.3.10/usr/include -L/home/cygwin/cygwin-1.3.10/usr/lib -L/home/cygwin/cygwin-1.3.10/usr/lib/w32api -L/home/cygwin/cygwin-1.3.10/usr/bin -O2 -g -Wall -Wmissing-prototypes -o guile.exe -dlpreopen force guile.o libguile.la -lm
libtool: link: not configured to extract global symbols from dlpreopened files
gcc -I/home/cygwin/cygwin-1.3.10/usr/include -O2 -g -Wall -Wmissing-prototypes -o guile.exe guile.o -L/home/cygwin/cygwin-1.3.10/usr/lib -L/home/cygwin/cygwin-1.3.10/usr/lib/w32api -L/home/cygwin/cygwin-1.3.10/usr/bin ./.libs/libguile.a /home/fred/cvs/guile/cygwin/libltdl/.libs/libltdl.a
guile.o: In function `main':
/home/fred/cvs/guile/cygwin/libguile/../../guile-core-1.6/libguile/guile.c:90: undefined reference to `lt_preloaded_symbols'
but the static version cross builds fine. Of course, I'm enquiring at
Cygwin and will continue to look into this.
Please let me know what needs to be done to get this into CVS.
Greetings,
Jan.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/ChangeLog,v
retrieving revision 1.281.2.72
diff -p -u -r1.281.2.72 ChangeLog
--- ChangeLog 6 May 2002 19:15:04 -0000 1.281.2.72
+++ ChangeLog 3 Jul 2002 15:40:16 -0000
@@ -1,3 +1,13 @@
+2002-07-03 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * autogen.sh: Only fix libltdl/configure.in if it exists. Current
+ libtool CVS does not need this fix.
+
+ * configure.in (AC_LIBTOOL_WIN32_DLL): Add for shared Cygwin
+ build.
+ Add --with-cc-for-build option to re-enable cross building.
+ Add --with-guile-for-build option to re-enable cross building.
+
2002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
* configure.in: Include <sys/types.h> before <netinet/in.h> when
Index: autogen.sh
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/autogen.sh,v
retrieving revision 1.11.2.10
diff -p -u -r1.11.2.10 autogen.sh
--- autogen.sh 1 May 2002 21:05:26 -0000 1.11.2.10
+++ autogen.sh 3 Jul 2002 15:40:16 -0000
@@ -47,11 +47,14 @@ $mscripts/render-bugs > BUGS
rm -rf libltdl
libtoolize --force --copy --automake --ltdl
+# Fix older versions of libtool.
# Make sure we use a ./configure.in compatible autoconf in ./libltdl/
-mv libltdl/configure.in libltdl/configure.tmp
-echo 'AC_PREREQ(2.50)' > libltdl/configure.in
-cat libltdl/configure.tmp >> libltdl/configure.in
-rm libltdl/configure.tmp
+if [ -f libltdl/configure.in ]; then
+ mv libltdl/configure.in libltdl/configure.tmp
+ echo 'AC_PREREQ(2.50)' > libltdl/configure.in
+ cat libltdl/configure.tmp >> libltdl/configure.in
+ rm libltdl/configure.tmp
+fi
######################################################################
autoheader
Index: configure.in
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/configure.in,v
retrieving revision 1.157.2.19
diff -p -u -r1.157.2.19 configure.in
--- configure.in 6 May 2002 19:11:00 -0000 1.157.2.19
+++ configure.in 3 Jul 2002 15:40:17 -0000
@@ -155,6 +155,9 @@ AC_ISC_POSIX
AC_MINIX
AM_PROG_CC_STDC
+
+## Needed for building DLLs on Cygwin, before AM_PROG_LIBTOOL
+AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AC_CHECK_PROG(have_makeinfo, makeinfo, yes, no)
@@ -621,6 +624,54 @@ if test "${THREAD_PACKAGE}" != "" ; then
fi
fi
+## Cross building
+if test "$cross_compiling" = "yes"; then
+ AC_MSG_CHECKING(cc for build)
+ ## /usr/bin/cc still uses wrong assembler
+ ## CC_FOR_BUILD="${CC_FOR_BUILD-/usr/bincc}"
+ CC_FOR_BUILD="${CC_FOR_BUILD-PATH=/usr/bin:$PATH cc}"
+else
+ CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
+fi
+AC_ARG_WITH(cc-for-build,
+ [ --with-cc-for-build=CC native C compiler, to be used during build])
+test -n "$with_cc_for_build" && CC_FOR_BUILD="$with_cc_for_build"
+
+## AC_MSG_CHECKING("if we are cross compiling")
+## AC_MSG_RESULT($cross_compiling)
+if test "$cross_compiling" = "yes"; then
+ AC_MSG_RESULT($CC_FOR_BUILD)
+fi
+
+## No need as yet to be more elaborate
+CCLD_FOR_BUILD="$CC_FOR_BUILD"
+
+AC_SUBST(cross_compiling)
+AC_SUBST(CC_FOR_BUILD)
+AC_SUBST(CCLD_FOR_BUILD)
+
+## libtool erroneously calls CC_FOR_BUILD HOST_CC;
+## --HOST is the platform that PACKAGE is compiled for.
+HOST_CC="$CC_FOR_BUILD"
+AC_SUBST(HOST_CC)
+
+if test "$cross_compiling" = "yes"; then
+ AC_MSG_CHECKING(guile for build)
+ GUILE_FOR_BUILD="${GUILE_FOR_BUILD-guile}"
+else
+ GUILE_FOR_BUILD='$(top_builddir_absolute)/pre-inst-guile'
+fi
+AC_ARG_WITH(guile-for-build,
+ [ --with-guile-for-build=CC native guile executable, to be used during build])
+test -n "$with_guile_for_build" && GUILE_FOR_BUILD="$with_cc_for_build"
+
+## AC_MSG_CHECKING("if we are cross compiling")
+## AC_MSG_RESULT($cross_compiling)
+if test "$cross_compiling" = "yes"; then
+ AC_MSG_RESULT($GUILE_FOR_BUILD)
+fi
+AC_SUBST(GUILE_FOR_BUILD)
+
## If we're using GCC, ask for aggressive warnings.
case "$GCC" in
yes )
Index: am/ChangeLog
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/am/ChangeLog,v
retrieving revision 1.1.2.4
diff -p -u -r1.1.2.4 ChangeLog
--- am/ChangeLog 1 Apr 2002 20:02:29 -0000 1.1.2.4
+++ am/ChangeLog 3 Jul 2002 15:40:17 -0000
@@ -1,3 +1,8 @@
+2002-07-03 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * pre-inst-guile (preinstguile): Initialize with
+ $(GUILE_FOR_BUILD) configure parameter.
+
2002-04-01 Thien-Thi Nguyen <ttn@giblet.glug.org>
* maintainer-dirs: Remove "if MAINTAINER_MODE" conditional.
Index: am/pre-inst-guile
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/am/pre-inst-guile,v
retrieving revision 1.1.2.1
diff -p -u -r1.1.2.1 pre-inst-guile
--- am/pre-inst-guile 26 Feb 2002 11:12:18 -0000 1.1.2.1
+++ am/pre-inst-guile 3 Jul 2002 15:40:17 -0000
@@ -28,7 +28,7 @@
## Code:
-preinstguile = $(top_builddir_absolute)/pre-inst-guile
+preinstguile = $(GUILE_FOR_BUILD)
preinstguiletool = GUILE="$(preinstguile)" $(top_srcdir)/scripts
## am/pre-inst-guile ends here
Index: libguile/ChangeLog
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/ChangeLog,v
retrieving revision 1.1465.2.92
diff -p -u -r1.1465.2.92 ChangeLog
--- libguile/ChangeLog 17 Jun 2002 23:22:45 -0000 1.1465.2.92
+++ libguile/ChangeLog 3 Jul 2002 15:40:20 -0000
@@ -1,3 +1,14 @@
+2002-07-03 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
+ this should be compiled for BUILD host.
+ Override default rule for
+ guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
+ Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
+
+ * guile.c, iselect.h, net_db.c, posix.c, socket.c: Cygwin compile
+ fixes.
+
2002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
* print.c (scm_simple_format): Print missing part of format before
Index: libguile/Makefile.am
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/Makefile.am,v
retrieving revision 1.138.2.21
diff -p -u -r1.138.2.21 Makefile.am
--- libguile/Makefile.am 9 Apr 2002 17:24:41 -0000 1.138.2.21
+++ libguile/Makefile.am 3 Jul 2002 15:40:20 -0000
@@ -33,14 +33,33 @@ ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\
lib_LTLIBRARIES = libguile.la
bin_PROGRAMS = guile
+
noinst_PROGRAMS = guile_filter_doc_snarfage
+guile_filter_doc_snarfage_SOURCES = c-tokenize.c
+
+## Override default rule; this should be compiled for BUILD host.
+## For some reason, OBJEXT does not include the dot
+c-tokenize.$(OBJEXT): c-tokenize.c
+ if [ "$(cross_compiling)" = "yes" ]; then \
+ $(CC_FOR_BUILD) -c -o $@ $<; \
+ else \
+ $(COMPILE) -c -o $@ $<; \
+ fi
+
+## Override default rule; this should run on BUILD host.
+guile_filter_doc_snarfage$(EXEEXT): $(guile_filter_doc_snarfage_OBJECTS) $(guile_filter_doc_snarfage_DEPENDENCIES)
+ @rm -f guile_filter_doc_snarfage$(EXEEXT)
+ if [ "$(cross_compiling)" = "yes" ]; then \
+ $(CCLD_FOR_BUILD) -o $@ $(guile_filter_doc_snarfage_OBJECTS); \
+ else \
+ $(LINK) $(guile_filter_doc_snarfage_OBJECTS) $(LDADD) $(LIBS); \
+ fi
+
guile_SOURCES = guile.c
guile_LDADD = libguile.la
guile_LDFLAGS = @DLPREOPEN@
-guile_filter_doc_snarfage_SOURCES = c-tokenize.c
-
libguile_la_SOURCES = alist.c arbiters.c async.c backtrace.c boolean.c \
chars.c continuations.c debug.c deprecation.c dynl.c dynwind.c \
environments.c eq.c error.c eval.c evalext.c extensions.c \
@@ -197,7 +216,7 @@ SUFFIXES = .x .doc
.c.doc:
-(test -n "${AWK+set}" || AWK="@AWK@"; ${AWK} -f ./guile-func-name-check $<)
(./guile-snarf-docs $(snarfcppopts) $< | \
- ./guile_filter_doc_snarfage --filter-snarfage) > $@ || { rm $@; false; }
+ ./guile_filter_doc_snarfage$(EXEEXT) --filter-snarfage) > $@ || { rm $@; false; }
$(DOT_X_FILES) $(EXTRA_DOT_DOC_FILES): snarf.h guile-snarf.in
Index: libguile/guile.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/guile.c,v
retrieving revision 1.8
diff -p -u -r1.8 guile.c
--- libguile/guile.c 26 Jun 2001 17:53:09 -0000 1.8
+++ libguile/guile.c 3 Jul 2002 15:40:21 -0000
@@ -55,7 +55,8 @@
#include <libltdl/ltdl.h>
#endif
-#ifdef HAVE_WINSOCK2_H
+#if defined (HAVE_WINSOCK2_H) \
+ && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
#include <winsock2.h>
#endif
Index: libguile/iselect.h
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/iselect.h,v
retrieving revision 1.9.2.1
diff -p -u -r1.9.2.1 iselect.h
--- libguile/iselect.h 19 Jul 2001 21:28:54 -0000 1.9.2.1
+++ libguile/iselect.h 3 Jul 2002 15:40:21 -0000
@@ -67,7 +67,8 @@
#include <sys/select.h>
#endif
-#ifdef HAVE_WINSOCK2_H
+#if defined (HAVE_WINSOCK2_H) \
+ && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
#include <winsock2.h>
#endif
Index: libguile/net_db.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/net_db.c,v
retrieving revision 1.62.2.3
diff -p -u -r1.62.2.3 net_db.c
--- libguile/net_db.c 15 Mar 2002 09:23:19 -0000 1.62.2.3
+++ libguile/net_db.c 3 Jul 2002 15:40:21 -0000
@@ -65,7 +65,8 @@
#include <sys/types.h>
-#ifdef HAVE_WINSOCK2_H
+#if defined (HAVE_WINSOCK2_H) \
+ && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
#include <winsock2.h>
#else
#include <sys/socket.h>
Index: libguile/posix.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/posix.c,v
retrieving revision 1.92.2.5
diff -p -u -r1.92.2.5 posix.c
--- libguile/posix.c 15 Mar 2002 10:33:37 -0000 1.92.2.5
+++ libguile/posix.c 3 Jul 2002 15:40:22 -0000
@@ -95,7 +95,8 @@ extern char *ttyname();
#ifdef HAVE_IO_H
#include <io.h>
#endif
-#ifdef HAVE_WINSOCK2_H
+#if defined (HAVE_WINSOCK2_H) \
+ && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
#include <winsock2.h>
#endif
Index: libguile/socket.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/socket.c,v
retrieving revision 1.80.2.3
diff -p -u -r1.80.2.3 socket.c
--- libguile/socket.c 15 Mar 2002 09:23:19 -0000 1.80.2.3
+++ libguile/socket.c 3 Jul 2002 15:40:22 -0000
@@ -61,7 +61,8 @@
#include <unistd.h>
#endif
#include <sys/types.h>
-#ifdef HAVE_WINSOCK2_H
+#if defined (HAVE_WINSOCK2_H) \
+ && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
#include <winsock2.h>
#else
#include <sys/socket.h>
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH]: Cross building and Cygwin fixes.
@ 2002-07-03 17:06 Jan Nieuwenhuizen
0 siblings, 0 replies; 11+ messages in thread
From: Jan Nieuwenhuizen @ 2002-07-03 17:06 UTC (permalink / raw)
Cc: Han-Wen
Hi,
This didn't make it into the patch, obviously. I was not familiar
with the workbook symlinks.
Jan.
Index: INSTALL
===================================================================
RCS file: /cvsroot/guile/guile/workbook/build/dist-files/INSTALL,v
retrieving revision 1.1
diff -p -u -r1.1 INSTALL
--- INSTALL 31 Mar 2002 21:45:53 -0000 1.1
+++ INSTALL 3 Jul 2002 17:02:51 -0000
@@ -199,6 +199,29 @@ switches specific to Guile you may find
--disable-regex --- omit regular expression interfaces
+Cross building Guile =====================================================
+
+As of guile-1.5.x, the build process uses compiled C files for
+snarfing, and (indirectly, through libtool) for linking, and uses the
+guile executable for generating documentation.
+
+When cross building guile, you first need to configure, build and
+install guile for your build host.
+
+Then, you may configure guile for cross building, eg:
+
+ ./configure --host=i686-pc-cygwin --disable-shared
+
+Two special options for cross building are available:
+
+--with-cc-for-build --- native C compiler, to be used during build
+ defaults to: `PATH=/usr/bin:$PATH cc'
+
+--with-guile-for-build --- native C compiler, to be used during build
+ defaults to: `guile', assuming you just
+ installed this guile natively.
+
+
Using Guile Without Installing It =========================================
If you want to run Guile without installing it, set the environment
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH]: Cross building and Cygwin fixes.
2002-07-03 16:25 [PATCH]: Cross building and Cygwin fixes Jan Nieuwenhuizen
@ 2002-07-07 20:35 ` Marius Vollmer
2002-07-08 9:04 ` Han-Wen Nienhuys
2002-07-08 9:52 ` Jan Nieuwenhuizen
0 siblings, 2 replies; 11+ messages in thread
From: Marius Vollmer @ 2002-07-07 20:35 UTC (permalink / raw)
Cc: guile-devel, Han-Wen
Jan Nieuwenhuizen <janneke@gnu.org> writes:
> Please let me know what needs to be done to get this into CVS.
Thanks! I have applied it (with some changes, see below) to the
'unstable' branch. It is too late for 1.6.
> +if test "$cross_compiling" = "yes"; then
> + AC_MSG_CHECKING(guile for build)
> + GUILE_FOR_BUILD="${GUILE_FOR_BUILD-guile}"
> +else
> + GUILE_FOR_BUILD='$(top_builddir_absolute)/pre-inst-guile'
I changed this to just
GUILE_FOR_BUILD='$(preinstguile)'
but did not change am/preinstguile. This keeps the roles of the
'pre-inst-guile' separate from the 'guile-for-build'. pre-inst-guile
is used during "make check" for example, and guile-for-build is used
for the doc snarfing.
> +fi
> +AC_ARG_WITH(guile-for-build,
> + [ --with-guile-for-build=CC native guile [...]
^^
> +test -n "$with_guile_for_build" && GUILE_FOR_BUILD="$with_cc_for_build"
^^
"GUILE" instead of "CC", no?
> +2002-07-03 Jan Nieuwenhuizen <janneke@gnu.org>
> +
> + * pre-inst-guile (preinstguile): Initialize with
> + $(GUILE_FOR_BUILD) configure parameter.
I didn't make this change, see above. Instead, I defined
snarf2checkedtexi as
GUILE="$(GUILE_FOR_BUILD)" $(top_srcdir)/scripts/snarf-check-and-output-texi
> -#ifdef HAVE_WINSOCK2_H
> +#if defined (HAVE_WINSOCK2_H) \
> + && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
> #include <winsock2.h>
> #endif
What is the reason for this change? Wouldn't it be better to fix the
check for <winsock2.h> in configure.in?
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH]: Cross building and Cygwin fixes.
2002-07-07 20:35 ` Marius Vollmer
@ 2002-07-08 9:04 ` Han-Wen Nienhuys
2002-07-08 18:12 ` Marius Vollmer
2002-07-08 9:52 ` Jan Nieuwenhuizen
1 sibling, 1 reply; 11+ messages in thread
From: Han-Wen Nienhuys @ 2002-07-08 9:04 UTC (permalink / raw)
Cc: Jan Nieuwenhuizen, guile-devel
mvo@zagadka.ping.de writes:
> Jan Nieuwenhuizen <janneke@gnu.org> writes:
>
> > Please let me know what needs to be done to get this into CVS.
>
> Thanks! I have applied it (with some changes, see below) to the
> 'unstable' branch. It is too late for 1.6.
Am I missing something? How is GUILE 1.6 supposed to build on cygwin,
then?
--
Han-Wen Nienhuys | hanwen@cs.uu.nl | http://www.cs.uu.nl/~hanwen/
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH]: Cross building and Cygwin fixes.
2002-07-07 20:35 ` Marius Vollmer
2002-07-08 9:04 ` Han-Wen Nienhuys
@ 2002-07-08 9:52 ` Jan Nieuwenhuizen
2002-07-09 18:08 ` Marius Vollmer
1 sibling, 1 reply; 11+ messages in thread
From: Jan Nieuwenhuizen @ 2002-07-08 9:52 UTC (permalink / raw)
Cc: guile-devel, Han-Wen
Marius Vollmer <mvo@zagadka.ping.de> writes:
> Thanks! I have applied it (with some changes, see below) to the
> 'unstable' branch. It is too late for 1.6.
Ah, that's very nice. Being too late is only a small setback, I'm
glad not having to maintain a patch against CVS; as I'm maintaining
Guile officially for Cygwin now.
> I changed this to just
>
> GUILE_FOR_BUILD='$(preinstguile)'
>
> but did not change am/preinstguile. This keeps the roles of the
> 'pre-inst-guile' separate from the 'guile-for-build'. pre-inst-guile
> is used during "make check" for example, and guile-for-build is used
> for the doc snarfing.
Ok.
>> +test -n "$with_guile_for_build" && GUILE_FOR_BUILD="$with_cc_for_build"
>
> "GUILE" instead of "CC", no?
Sure, thanks.
>> +2002-07-03 Jan Nieuwenhuizen <janneke@gnu.org>
>> +
>> + * pre-inst-guile (preinstguile): Initialize with
>> + $(GUILE_FOR_BUILD) configure parameter.
>
> I didn't make this change, see above. Instead, I defined
> snarf2checkedtexi as
>
> GUILE="$(GUILE_FOR_BUILD)" $(top_srcdir)/scripts/snarf-check-and-output-texi
Ok, looks good. I'll have a look at CVS today.
>> -#ifdef HAVE_WINSOCK2_H
>> +#if defined (HAVE_WINSOCK2_H) \
>> + && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
>> #include <winsock2.h>
>> #endif
>
> What is the reason for this change?
The reason is that Cygwin has the winsock header, but it also has unix
sockets. We don't want winsock.
> Wouldn't it be better to fix the check for <winsock2.h> in
> configure.in?
Possibly. But then it's not a HAVE_WINSOCK2, but rather a
WANT_WINSOCK2. If configure.in only changes 'have' into want if not
Cygwin, that would maybe be cleaner.
Jan.
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH]: Cross building and Cygwin fixes.
2002-07-08 9:04 ` Han-Wen Nienhuys
@ 2002-07-08 18:12 ` Marius Vollmer
0 siblings, 0 replies; 11+ messages in thread
From: Marius Vollmer @ 2002-07-08 18:12 UTC (permalink / raw)
Cc: Jan Nieuwenhuizen, guile-devel
Han-Wen Nienhuys <hanwen@cs.uu.nl> writes:
> mvo@zagadka.ping.de writes:
> > Jan Nieuwenhuizen <janneke@gnu.org> writes:
> >
> > > Please let me know what needs to be done to get this into CVS.
> >
> > Thanks! I have applied it (with some changes, see below) to the
> > 'unstable' branch. It is too late for 1.6.
>
> Am I missing something? How is GUILE 1.6 supposed to build on cygwin,
> then?
With the patch, maybe?
The first 1.6 release will likely not compile on Cygwin, but the ones
after it will be open for patches like this.
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH]: Cross building and Cygwin fixes.
2002-07-08 9:52 ` Jan Nieuwenhuizen
@ 2002-07-09 18:08 ` Marius Vollmer
2002-07-10 0:37 ` Jan Nieuwenhuizen
0 siblings, 1 reply; 11+ messages in thread
From: Marius Vollmer @ 2002-07-09 18:08 UTC (permalink / raw)
Cc: guile-devel, Han-Wen
Jan Nieuwenhuizen <janneke@gnu.org> writes:
> > Wouldn't it be better to fix the check for <winsock2.h> in
> > configure.in?
>
> Possibly. But then it's not a HAVE_WINSOCK2, but rather a
> WANT_WINSOCK2. If configure.in only changes 'have' into want if not
> Cygwin, that would maybe be cleaner.
Yes. Can you provide a patch?
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH]: Cross building and Cygwin fixes.
2002-07-09 18:08 ` Marius Vollmer
@ 2002-07-10 0:37 ` Jan Nieuwenhuizen
2002-07-10 19:34 ` Marius Vollmer
0 siblings, 1 reply; 11+ messages in thread
From: Jan Nieuwenhuizen @ 2002-07-10 0:37 UTC (permalink / raw)
Cc: guile-devel, Han-Wen
Marius Vollmer <mvo@zagadka.ping.de> writes:
>> Possibly. But then it's not a HAVE_WINSOCK2, but rather a
>> WANT_WINSOCK2. If configure.in only changes 'have' into want if not
>> Cygwin, that would maybe be cleaner.
>
> Yes. Can you provide a patch?
I would, but there seems to be some confusion about Guile's cvs setup,
at my part.
The patch I sent, was [meant to be applied] against
02:24:51 fred@peder:~/cvs/guile/guile-core-1.6
$ cat CVS/Tag
Tbranch_release-1-6
However, I found it applied to HEAD, that identifies itself as 1.7.0.
Now, I realise that the version should be partly ignored, but I had
the impression that there would be a stable, 1.6 branch, that would
produce 1.6.x releases. Is there somewhere else I should look?
Anyway, thanks a lot for applying the patch, most is of it is very
helpful for Cygwin and cross building. But as it turns out, for HEAD,
where it got applied, some was superfluous. In configure.in, I
already found:
if test "$MINGW32" = "yes" ; then
AC_CHECK_HEADER(winsock2.h, [AC_DEFINE([HAVE_WINSOCK2_H], 1,
etc, so that looks ok.
I've tested HEAD with the patch below, and it indeed builds fine.
Also, I found that some #include <winsock2.h> statements are still
inside #ifdef __MINGW32__ (fports.c, inet_aton.c). It doesn't do any
harm, but you may want to put them inside #ifdef HAVE_WINSOCK2_H now.
Thanks again,
Jan.
Index: libguile/guile.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/guile.c,v
retrieving revision 1.11
diff -p -u -r1.11 guile.c
--- libguile/guile.c 7 Jul 2002 19:58:15 -0000 1.11
+++ libguile/guile.c 10 Jul 2002 00:30:19 -0000
@@ -58,8 +58,7 @@
#include <libltdl/ltdl.h>
#endif
-#if defined (HAVE_WINSOCK2_H) \
- && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
+#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
Index: libguile/iselect.h
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/iselect.h,v
retrieving revision 1.13
diff -p -u -r1.13 iselect.h
--- libguile/iselect.h 7 Jul 2002 19:58:15 -0000 1.13
+++ libguile/iselect.h 10 Jul 2002 00:30:19 -0000
@@ -68,8 +68,7 @@
#include <sys/select.h>
#endif
-#if defined (HAVE_WINSOCK2_H) \
- && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
+#if HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
Index: libguile/net_db.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/net_db.c,v
retrieving revision 1.69
diff -p -u -r1.69 net_db.c
--- libguile/net_db.c 7 Jul 2002 19:58:15 -0000 1.69
+++ libguile/net_db.c 10 Jul 2002 00:30:19 -0000
@@ -65,8 +65,7 @@
#include <sys/types.h>
-#if defined (HAVE_WINSOCK2_H) \
- && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
+#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#else
#include <sys/socket.h>
Index: libguile/posix.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/posix.c,v
retrieving revision 1.105
diff -p -u -r1.105 posix.c
--- libguile/posix.c 7 Jul 2002 19:58:15 -0000 1.105
+++ libguile/posix.c 10 Jul 2002 00:30:20 -0000
@@ -96,8 +96,7 @@ extern char *ttyname();
#ifdef HAVE_IO_H
#include <io.h>
#endif
-#if defined (HAVE_WINSOCK2_H) \
- && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
+#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
Index: libguile/socket.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/socket.c,v
retrieving revision 1.87
diff -p -u -r1.87 socket.c
--- libguile/socket.c 7 Jul 2002 19:58:15 -0000 1.87
+++ libguile/socket.c 10 Jul 2002 00:30:21 -0000
@@ -68,8 +68,7 @@
#include <unistd.h>
#endif
#include <sys/types.h>
-#if defined (HAVE_WINSOCK2_H) \
- && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
+#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#else
#include <sys/socket.h>
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH]: Cross building and Cygwin fixes.
2002-07-10 0:37 ` Jan Nieuwenhuizen
@ 2002-07-10 19:34 ` Marius Vollmer
2002-07-10 19:52 ` Marius Vollmer
0 siblings, 1 reply; 11+ messages in thread
From: Marius Vollmer @ 2002-07-10 19:34 UTC (permalink / raw)
Cc: guile-devel, Han-Wen
Jan Nieuwenhuizen <janneke@gnu.org> writes:
> The patch I sent, was [meant to be applied] against
>
> 02:24:51 fred@peder:~/cvs/guile/guile-core-1.6
> $ cat CVS/Tag
> Tbranch_release-1-6
This is the branch for the 1.5.x and 1.6.x releases, correct. I think
the 'official' way to check for sticky tags is with "cvs status".
Maybe CVS/Tag is misleading?
> I've tested HEAD with the patch below, and it indeed builds fine.
Ok, I will apply it.
> Also, I found that some #include <winsock2.h> statements are still
> inside #ifdef __MINGW32__ (fports.c, inet_aton.c). It doesn't do any
> harm, but you may want to put them inside #ifdef HAVE_WINSOCK2_H now.
Yes, will do that as well.
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH]: Cross building and Cygwin fixes.
2002-07-10 19:34 ` Marius Vollmer
@ 2002-07-10 19:52 ` Marius Vollmer
2002-07-10 20:02 ` Jan Nieuwenhuizen
0 siblings, 1 reply; 11+ messages in thread
From: Marius Vollmer @ 2002-07-10 19:52 UTC (permalink / raw)
Cc: guile-devel, Han-Wen
Marius Vollmer <mvo@zagadka.ping.de> writes:
> Jan Nieuwenhuizen <janneke@gnu.org> writes:
>
> > Also, I found that some #include <winsock2.h> statements are still
> > inside #ifdef __MINGW32__ (fports.c, inet_aton.c). It doesn't do any
> > harm, but you may want to put them inside #ifdef HAVE_WINSOCK2_H now.
>
> Yes, will do that as well.
Nope, didn't. There is more than winsock2.h that is affected by
__MINGW32__ so I didn't feel comfortable enough to change it since I
can't test it.
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH]: Cross building and Cygwin fixes.
2002-07-10 19:52 ` Marius Vollmer
@ 2002-07-10 20:02 ` Jan Nieuwenhuizen
0 siblings, 0 replies; 11+ messages in thread
From: Jan Nieuwenhuizen @ 2002-07-10 20:02 UTC (permalink / raw)
Cc: guile-devel, Han-Wen
Marius Vollmer <mvo@zagadka.ping.de> writes:
>> > Also, I found that some #include <winsock2.h> statements are still
>> > inside #ifdef __MINGW32__ (fports.c, inet_aton.c). It doesn't do any
>> > harm, but you may want to put them inside #ifdef HAVE_WINSOCK2_H now.
>>
>> Yes, will do that as well.
>
> Nope, didn't. There is more than winsock2.h that is affected by
> __MINGW32__ so I didn't feel comfortable enough to change it since I
> can't test it.
It's not that important. Of course the other stuff inside __MINGW32__
should remain inside __MINGW32__, I just wanted to suggest putting all
winsock includes inside HAVE_WINSOCK2_H, for uniformity's sake.
Jan.
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2002-07-10 20:02 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-03 16:25 [PATCH]: Cross building and Cygwin fixes Jan Nieuwenhuizen
2002-07-07 20:35 ` Marius Vollmer
2002-07-08 9:04 ` Han-Wen Nienhuys
2002-07-08 18:12 ` Marius Vollmer
2002-07-08 9:52 ` Jan Nieuwenhuizen
2002-07-09 18:08 ` Marius Vollmer
2002-07-10 0:37 ` Jan Nieuwenhuizen
2002-07-10 19:34 ` Marius Vollmer
2002-07-10 19:52 ` Marius Vollmer
2002-07-10 20:02 ` Jan Nieuwenhuizen
-- strict thread matches above, loose matches on Subject: below --
2002-07-03 17:06 Jan Nieuwenhuizen
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).