m4-1.4.x fails to build git Autoconf for some x (was: branch-1_4 cannot build Autoconf 2.59 any more)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 24, 2008 at 07:10:24AM -0600, Eric Blake wrote:
> 
> I'll try looking into the MinGW failure, but I'm not sure how long it
> will take me to reproduce it (I don't normally build in MinGW;

Here's some more data.  I installed MinGW's m4-1.4.7 which works fine.
It has this diff over vanilla GNU m4-1.4.7.  The MSYS builds are special
(dunno if you knew) and you are _not_ supposed to introduce the
config.{guess,sub} changes into packages outside of mingw.org, 
but the freeze.c change might be worth looking at, see below.

FWIW, with the freeze.c change alone, Autoconf still failed to build
however.  The failure is due to "freezing produced output", notably
lines consisting of little more than CR, and I have not yet seen a
simple way to avoid it; just killing \r in autom4te.in leads to

| autom4te_perllibdir='../../autoconf'/lib
| AUTOM4TE_CFG='../lib/autom4te.cfg'         ../bin/autom4te -B '..'/lib
| -B '../../autoconf'/lib         --language=M4sh
| ../../autoconf/tests/wrapper.as -o wrapper.in
| C:\msys\1.0\home\ralf\local\bin\m4.exe: premature end of frozen file
| autom4te: /home/ralf/local/bin/m4.exe failed with exit status: 1

Maybe this still helps.  I don't know who wrote the patch, likely Earnie
or Keith, but you'll be able to find that out either on mingw.org or one
of its mailing lists.

Anyway, using MinGW's m4-1.4.7, Autoconf builds fine, and the testsuite
shows no errors.  I will thus not look into this issue any further, it
likely being no Autoconf regression.

Note however that it is a significant hassle to get msysgit installed in
order to get Autoconf bootstrapped from git sources so that it doesn't
report a --version of UNKNOWN.

Cheers,
Ralf

diff -ru m4-1.4.7/config.guess m4-1.4.7-MSYS-src/config.guess
--- m4-1.4.7/config.guess	Mon Sep 25 12:08:01 2006
+++ m4-1.4.7-MSYS-src/config.guess	Tue Oct 31 05:31:00 2006
@@ -777,6 +777,9 @@
 		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 	esac
 	exit ;;
+    i*:MSYS*:*)
+       echo ${UNAME_MACHINE}-pc-msys
+       exit ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
 	exit ;;
diff -ru m4-1.4.7/config.sub m4-1.4.7-MSYS-src/config.sub
--- m4-1.4.7/config.sub	Mon Sep 25 12:08:01 2006
+++ m4-1.4.7-MSYS-src/config.sub	Tue Oct 31 05:31:00 2006
@@ -679,6 +679,10 @@
 		basic_machine=ns32k-utek
 		os=-sysv
 		;;
+	msys)
+		basic_machine=i686-pc
+		os=-msys
+		;;
 	mingw32)
 		basic_machine=i386-pc
 		os=-mingw32
@@ -1208,7 +1212,7 @@
 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -msys* \
 	      | -chorusos* | -chorusrdb* \
 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
 	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
Only in m4-1.4.7-MSYS-src: m4-1.4.7-MSYS-build.sh
diff -ru m4-1.4.7/src/freeze.c m4-1.4.7-MSYS-src/src/freeze.c
--- m4-1.4.7/src/freeze.c	Sun Sep 24 04:28:04 2006
+++ m4-1.4.7-MSYS-src/src/freeze.c	Tue Oct 31 05:31:00 2006
@@ -222,6 +222,18 @@
     }                                                           \
   while (character == '\n')
 
+#ifdef __MSYS__
+# define SKIP_CARRIAGE_RETURNS					\
+  do								\
+    {								\
+      while (character == '\r')					\
+	GET_CHARACTER;						\
+    }								\
+  while (0)
+#else /* ! __MSYS__ */
+# define SKIP_CARRIAGE_RETURNS do { } while (0)
+#endif /* ! __MSYS__ */
+
   file = path_search (name, NULL);
   if (file == NULL)
     M4ERROR ((EXIT_FAILURE, errno, "cannot open %s", name));
@@ -243,6 +255,7 @@
   else if (number[0] < 1)
     M4ERROR ((EXIT_FAILURE, 0,
               "ill-formed frozen file, version directive expected"));
+  SKIP_CARRIAGE_RETURNS;
   VALIDATE ('\n');
 
   GET_DIRECTIVE;
@@ -274,6 +287,7 @@
           VALIDATE (',');
           GET_CHARACTER;
           GET_NUMBER (number[1]);
+	  SKIP_CARRIAGE_RETURNS;
           VALIDATE ('\n');
 
           if (operation != 'D')
@@ -310,6 +324,7 @@
 
           string[1][number[1]] = '\0';
           GET_CHARACTER;
+	  SKIP_CARRIAGE_RETURNS;
           VALIDATE ('\n');
 
           /* Act according to operation letter.  */
@@ -376,4 +391,5 @@
 #undef GET_DIRECTIVE
 #undef GET_NUMBER
 #undef VALIDATE
+#undef SKIP_CARRIAGE_RETURNS
 }


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux