Bug 449245 - latest autoconf breaks same-line comments in config files
Summary: latest autoconf breaks same-line comments in config files
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: autoconf
Version: rawhide
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FTBFS
TreeView+ depends on / blocked
 
Reported: 2008-05-31 21:22 UTC by Tom Lane
Modified: 2013-07-03 03:18 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-06-24 13:57:47 UTC
Type: ---


Attachments (Terms of Use)

Description Tom Lane 2008-05-31 21:22:53 UTC
Description of problem:
Given a line in a config.h.in file that looks like
#undef SOME_SYMBOL /* some comment */
the new autoconf version transforms this to
/* #undef SOME_SYMBOL /* some comment */ */
which of course causes the C compiler to spit up.

Version-Release number of selected component (if applicable):
autoconf-2.62-1.fc10

How reproducible:
100%

Steps to Reproduce:
1. try to rebuild libjpeg in rawhide

Additional info:
Input of this form has worked properly since at least autoconf 2.13, so I claim this is a regression.
It's broken libjpeg and doubtless a few other packages too.

Comment 1 Karsten Hopp 2008-06-02 11:19:30 UTC
This might have worked wth older versions by pure luck, but upstream is aware of
problems with that and discourages putting comments on the same line as
preprocessor macros:


from the autoconf info file:
4.9.1 Configuration Header Templates
...
   The use of old form templates, with `#define' instead of `#undef' is
strongly discouraged.  Similarly with old templates with comments on
the same line as the `#undef'.  Anyway, putting comments in
preprocessor macros has never been a good idea.




Comment 2 Tom Lane 2008-06-02 15:05:30 UTC
It says that it's "discouraged", which is the same wording that's been there for awhile.  If this change is 
intentional, why doesn't it say "we intentionally broke this in 2.62"?

In the particular case I'm dealing with, the symbol in question is not one of the ones that autoconf has 
been told to substitute, so I don't think it should be touching the line in the first place.  Prior releases 
didn't ...

Comment 4 Karsten Hopp 2008-06-04 22:43:17 UTC
reopening as suggested by the upstream developers in the discussion about this
issue: http://lists.gnu.org/archive/html/bug-autoconf/2008-06/msg00004.html

Comment 5 Stepan Kasal 2008-06-06 10:55:48 UTC
A few nits in reply to comment #2:
> It says that it's "discouraged", [...]

The word "discouraged" is used for #define lines in the template, which have
been in use for a while indeed (late 1990's ?).
But comments on #undef template lines were never allowed.
See http://www.gnu.org/software/autoconf/manual/html_node/Header-Templates.html

> the symbol in question is not one of the ones that autoconf has been told to
substitute, so I don't think it should be touching the line in the first place.
 Prior releases didn't...

This is pure coincidence; the remaining #undef lines in the template were always
commented out.
But recent releases of autconf did not recognize this line, because of the
comment.  OTOH, autoconf 2.13 did comment them out.
See http://lists.gnu.org/archive/html/bug-autoconf/2008-06/msg00007.html

See how that thread will evolve for the upstream descussion.  You are right that
the (syntactically wrong) "nested comment" is unfortunate, and you are right
that the documentation (yes, the node linked above) needs improvement.  Thanks
for the bug report.

Comment 6 Karsten Hopp 2008-06-24 13:57:47 UTC
autoconf-2.62-3.fc10 with a fix for this issue will be in rawhide soon.


Note You need to log in before you can comment on or make changes to this bug.