GNU bug report logs - #18075
AM_INIT_AUTOMAKE followed by comment

Previous Next

Package: automake;

Reported by: Scott Pakin <pakin <at> lanl.gov>

Date: Mon, 21 Jul 2014 23:11:01 UTC

Severity: normal

Tags: patch

Merged with 16841

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18075 in the body.
You can then email your comments to 18075 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#18075; Package automake. (Mon, 21 Jul 2014 23:11:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Scott Pakin <pakin <at> lanl.gov>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Mon, 21 Jul 2014 23:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Scott Pakin <pakin <at> lanl.gov>
To: bug-automake <at> gnu.org
Subject: AM_INIT_AUTOMAKE followed by comment
Date: Mon, 21 Jul 2014 15:39:13 -0600
[Message part 1 (text/plain, inline)]
The definition of AM_INIT_AUTOMAKE does not end in a newline
character, which can cause tricky-to-track errors if the call is
followed by an M4 comment.  I believe this is new behavior because an
old set of Autotools configuration files that used to work failed when
I recently re-ran automake.

I'm running Ubuntu Trusty Tahr (14.04 LTS) with the following Automake
and Autoconf versions:

    $ automake --version | head -1
    automake (GNU automake) 1.14.1
    $ autoconf --version | head -1
    autoconf (GNU Autoconf) 2.69

I've attached a minimal reproducer, a configure.ac file with only the
following contents:

    AC_INIT([badness], [1.0], [pakin <at> lanl.gov], [badness])
    AM_INIT_AUTOMAKE([1.14])dnl This comment causes configure to break.
    AC_CONFIG_FILES([Makefile])
    AC_OUTPUT

Here's how to produce the error:

    $ touch Makefile.am
    $ aclocal
    $ automake --add-missing --foreign
    configure.ac:2: installing './install-sh'
    configure.ac:2: installing './missing'
    $ autoconf
    $ ./configure
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    ./configure: line 3493: syntax error: unexpected end of file

The error is caused by line 2313, which contains

    fiac_config_files="$ac_config_files Makefile"

instead of

    fi
    ac_config_files="$ac_config_files Makefile"

That is, bash is in fact complaining about a missing "fi".

Removing the comment from configure.ac or moving it onto a line of its
own works around the problem, but I think it would be nicer if init.m4
replaced the final "fi])" (right after the "Your 'rm' program is bad"
message) with

    fi
    ])

Hopefully, that'll save someone else the effort of associating an "end
of file" error with a comment appearing in the wrong place.

Thanks for your time,
-- Scott

[configure.ac (text/plain, attachment)]

Information forwarded to bug-automake <at> gnu.org:
bug#18075; Package automake. (Fri, 19 Dec 2014 11:32:02 GMT) Full text and rfc822 format available.

Message #8 received at 18075 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Scott Pakin <pakin <at> lanl.gov>, 18075 <at> debbugs.gnu.org, 
 16841 <at> debbugs.gnu.org, 
 GNU bug tracker automated control server <control <at> debbugs.gnu.org>
Subject: Re: bug#18075: AM_INIT_AUTOMAKE followed by comment
Date: Fri, 19 Dec 2014 12:31:47 +0100
forcemerge 16841 18075
stop

Reference: http://debbugs.gnu.org/18075

Hi Scott. Thanks for the report, and sorry for the awful delay.

I've already solved this issue as part of http://debbugs.gnu.org/16841
The fix will appear in the next Automake version (hopefully to be
released before the end of December).

Regards,
  Stefano




Forcibly Merged 16841 18075. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 19 Dec 2014 11:32:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 16 Jan 2015 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 117 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.