bug-gnulib
[Top][All Lists]
Advanced

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

Bug in gnulib-tools prevents bison from bootstrapping


From: Fernando Ferreira
Subject: Bug in gnulib-tools prevents bison from bootstrapping
Date: Fri, 22 Jun 2007 12:42:25 +0100
User-agent: Thunderbird 2.0.0.0 (X11/20070525)

Greetings, fellow developers!

I'm trying to compile bison from CVS, but it keeps failing at bootstrap phase. Here is what I'm doing:

   cvs -d:pserver:address@hidden:/sources/bison co bison
   cd bison/
   ./bootstrap

And here is the error message it is giving me in the (abrupt) end of the process:

   configure.ac:101: error: ` ' is already registered with AC_CONFIG_FILES.
   ../../lib/autoconf/status.m4:300: AC_CONFIG_FILES is expanded from...
   m4/gnulib-comp.m4:36: gl_INIT is expanded from...
   configure.ac:101: the top level
   autom4te: /usr/bin/m4 failed with exit status: 1
   aclocal: autom4te failed with exit status: 1

As (when I first saw it) I couldn't see who was already registered with AC_CONFIG_FILES, I took a look at m4/gnulib-comp.m4, line 36, to see what was there. The only thing that raised a suspicious on me were these four lines, 62 to 65, on the same file:

 # You need to invoke gt_JAVACOMP yourself, possibly with arguments.
 AC_CONFIG_FILES( :build-aux/ )
 # You need to invoke gt_JAVAEXEC yourself, possibly with arguments.
 AC_CONFIG_FILES( :build-aux/ )

These seemed to be the offending lines, but I would then discover, when opening the file on gedit, that the supposed whitespaces before and after ':build-aux/' were not whitespaces, but the ASCII characters 1 and 2 ('\1' and '\2', C-like notation). To discover how did them got there was my next quest.

To shorten an already long explanation, I found out that gnulib-tools, invoked by bootstrap to generate the gnulib-comp.m4 file, had a little but vital bug that inserted these extraneous characters instead of the desired behavior. The faulty lines are these, lines 2170 to 2180 on gnulib/gnulib-tool, that is downloaded from the gnulib CVS by the bootstrap script:

   if test "$auxdir" != "build-aux"; then
     sed_replace_build_aux='
       :a
       /AC_CONFIG_FILES(.*:build-aux\/.*)/{
s|AC_CONFIG_FILES(\(.*\):build-aux/\(.*\))|AC_CONFIG_FILES(\1:'"$auxdir"'/\2)|
         ba
       }'
sed_replace_build_aux=`echo "$sed_replace_build_aux" | sed -e 1d -e 's/^ *//'`
   else
     sed_replace_build_aux=
   fi


When it assigns sed_replace_build_aux with 'foo \1 bar \2', and then echoes it, instead of the desired effect of keeping it as literal '\1' and '\2' it changes it to the ASCII character 1 and 2. To solve it, it is only needed to escape the '\' properly, and everything will work all right :-)

I don't know how to submit a proper patch, but to solve it, it suffices to change

s|AC_CONFIG_FILES(\(.*\):build-aux/\(.*\))|AC_CONFIG_FILES(\1:'"$auxdir"'/\2)|
by

s|AC_CONFIG_FILES(\(.*\):build-aux/\(.*\))|AC_CONFIG_FILES(\\1:'"$auxdir"'/\\2)|

on gnulib/gnulib-tool, line 2174 to solve this one little bug.

Keep up the good work, and thanks for these great software you guys provide.

Fernando Ferreira





reply via email to

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