autoconf-patches
[Top][All Lists]
Advanced

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

Re: coreutils-4.5.9: Sun Solaris 2.8 configure failure


From: Paul Eggert
Subject: Re: coreutils-4.5.9: Sun Solaris 2.8 configure failure
Date: 06 Mar 2003 12:43:51 -0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.3

"Nelson H. F. Beebe" <address@hidden> writes:

> The build of coreutils-4.5.9 on Sun Solaris 2.8 failed at configure
> time:
> 
>       % time env CC=c89 ./configure && time make all check
>       ...
>       checking whether it is possible to resort to fread on /etc/mnttab... no
>       configure: error: could not determine how to read list of mounted 
> filesystems

I looked into this issue, and the problem is that c89 rejects '#line'
directives whose line numbers are greater than 32767.  The
coreutils-4.5.9 'configure' script contains 44223 lines, so it runs
afoul of the problem.  I think that the C standard allows this kind of
brain damage, unfortunately.

The simplest workaround is to remove this #line feature from Autoconf,
as it's not necessary for correct operation.  So I installed the
following Autoconf patch for now.  If someone can think of a better
fix, that'd be great.

2003-03-06  Paul Eggert  <address@hidden>

        Work around a problem noted by Nelson H. F. Beebe with coreutils
        4.5.9: Sun c89 (Sun WorkShop 6 update 2 C 5.3 Patch 111679-08
        2002/05/09) rejects '#line 32768 "configure"' because the line
        number overflows.
        * lib/autoconf/c.m4 (AC_LANG_SOURCE(C)): Do not generate
        #line directives.
        * lib/autoconf/lang.m4 (AC_LANG_SOURCE): Fix comment to match this.
        * doc/autoconf.texi (Generating Sources): Document this.

Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.722
diff -p -u -r1.722 autoconf.texi
--- doc/autoconf.texi   28 Feb 2003 10:46:21 -0000      1.722
+++ doc/autoconf.texi   6 Mar 2003 20:26:33 -0000
@@ -5853,8 +5853,7 @@ invocation, (ii) if not, be sure to doub
 
 @defmac AC_LANG_SOURCE (@var{source})
 @acindex LANG_SOURCE
-Expands into the @var{source}, with proper definition of the current
-location (e.g., @samp{#line 1234 "configure"} in C), and definition of
+Expands into the @var{source}, with the definition of
 all the @code{AC_DEFINE} performed so far.
 @end defmac
 
Index: lib/autoconf/c.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/c.m4,v
retrieving revision 1.174
diff -p -u -r1.174 c.m4
--- lib/autoconf/c.m4   24 Dec 2002 00:16:41 -0000      1.174
+++ lib/autoconf/c.m4   6 Mar 2003 20:26:33 -0000
@@ -118,10 +118,12 @@ m4_define([_AC_LANG_ABBREV(C++)], [cxx])
 # AC_LANG_SOURCE(C)(BODY)
 # -----------------------
 # This sometimes fails to find confdefs.h, for some reason.
-# #line $LINENO "$[0]"
+# We can't use '#line $LINENO "configure"' here, since
+# Sun c89 (Sun WorkShop 6 update 2 C 5.3 Patch 111679-08 2002/05/09)
+# rejects $LINENO greater than 32767, and some configure scripts
+# are longer than 32767 lines.
 m4_define([AC_LANG_SOURCE(C)],
-[#line $LINENO "configure"
-/* confdefs.h.  */
+[/* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
Index: lib/autoconf/lang.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/lang.m4,v
retrieving revision 1.161
diff -p -u -r1.161 lang.m4
--- lib/autoconf/lang.m4        31 Oct 2002 08:27:15 -0000      1.161
+++ lib/autoconf/lang.m4        6 Mar 2003 20:26:33 -0000
@@ -211,8 +211,7 @@ _ACEOF])
 # AC_LANG_SOURCE(BODY)
 # --------------------
 # Produce a valid source for the current language, which includes the
-# BODY, and as much as possible `confdefs.h' and the `#line' sync
-# lines.
+# BODY, and as much as possible `confdefs.h'.
 AC_DEFUN([AC_LANG_SOURCE],
 [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]