Bug 833476 - AC_C_CONST misbehaves with GCC resulting in redefining const symbol to empty expression
Summary: AC_C_CONST misbehaves with GCC resulting in redefining const symbol to empty ...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: autoconf
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Pavel Raiskup
QA Contact: Fedora Extras Quality Assurance
URL: http://lists.gnu.org/archive/html/bug...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-19 14:34 UTC by Petr Pisar
Modified: 2013-01-14 11:13 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-14 11:13:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Pisar 2012-06-19 14:34:32 UTC
radvd-1.9 calls AC_C_CONST from configure.ac. The macro results GCC does not support const qualifier properly and redefines it to empty symbol removing all const qualifiers from the code effectively; config.h:

/* Define to empty if `const' does not conform to ANSI C. */
#define const /**/

The bug has been already discussed on autoconf mailing list (http://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00002.html) but no fix has gotten yet into any release.

Tested with autoconf-2.68-2.fc15.noarch, gcc-4.6.3-2.fc16.x86_64.

Comment 1 Pavel Raiskup 2013-01-14 08:44:13 UTC
(In reply to comment #0)
> radvd-1.9 calls AC_C_CONST from configure.ac. The macro results GCC does not
> support const qualifier properly and redefines it to empty symbol removing
> all const qualifiers from the code effectively; config.h:
>
> /* Define to empty if `const' does not conform to ANSI C. */
> #define const /**/

Hi Petr, could you please give me more info how to reproduce this issue?

> The bug has been already discussed on autoconf mailing list
> (http://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00002.html) but
> no fix has gotten yet into any release.

Based on mentioned thread, this should be related to '-Werror' CFLAG.

I tried to download:

    radvd-1.9.2.tar.gz (5bc39b7bec0d73ffa443634c340e75b54867766c)

.. and no problem there, even with:

    CFLAGS="-Werror -O2 -g" ./configure

> Tested with autoconf-2.68-2.fc15.noarch, gcc-4.6.3-2.fc16.x86_64.

Same here:

    $ rpm -q autoconf gcc
    autoconf-2.68-2.fc15.noarch
    gcc-4.6.3-2.fc16.x86_64

Comment 2 Petr Pisar 2013-01-14 10:43:37 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > radvd-1.9 calls AC_C_CONST from configure.ac. The macro results GCC does not
> > support const qualifier properly and redefines it to empty symbol removing
> > all const qualifiers from the code effectively; config.h:
> >
> > /* Define to empty if `const' does not conform to ANSI C. */
> > #define const /**/
> 
> Hi Petr, could you please give me more info how to reproduce this issue?
>
I cannot reproduce it now either. I don't know what has changed.
 
> > The bug has been already discussed on autoconf mailing list
> > (http://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00002.html) but
> > no fix has gotten yet into any release.
> 
> Based on mentioned thread, this should be related to '-Werror' CFLAG.
> 
> I tried to download:
> 
>     radvd-1.9.2.tar.gz (5bc39b7bec0d73ffa443634c340e75b54867766c)
> 
> .. and no problem there, even with:
>
Because radvd removed calling AC_C_CONST in 1.9.2 based on my report about this bug. Try older version. E.g. 1.9.

Comment 3 Pavel Raiskup 2013-01-14 11:13:06 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > (In reply to comment #0)
> > > radvd-1.9 calls AC_C_CONST from configure.ac. The macro results GCC does not
> > > support const qualifier properly and redefines it to empty symbol removing
> > > all const qualifiers from the code effectively; config.h:
> > >
> > > /* Define to empty if `const' does not conform to ANSI C. */
> > > #define const /**/
> > 
> > Hi Petr, could you please give me more info how to reproduce this issue?
> >
> I cannot reproduce it now either. I don't know what has changed.
>  
> > > The bug has been already discussed on autoconf mailing list
> > > (http://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00002.html) but
> > > no fix has gotten yet into any release.
> > 
> > Based on mentioned thread, this should be related to '-Werror' CFLAG.
> > 
> > I tried to download:
> > 
> >     radvd-1.9.2.tar.gz (5bc39b7bec0d73ffa443634c340e75b54867766c)
> > 
> > .. and no problem there, even with:
> >
> Because radvd removed calling AC_C_CONST in 1.9.2 based on my report about
> this bug. Try older version. E.g. 1.9.

Yes, I tried it already before (no symptoms) — I should note it here, sorry.

I checked:
    http://www.litech.org/radvd/dist/radvd-1.9.tar.gz
and
    http://www.litech.org/radvd/dist/radvd-1.9.2.tar.gz

As we both are not able to reproduce it, I tend to closing this as WORKSFORME.

Anybody - feel free to reopen this bug once you hit this problem again.

Thanks for the report,
Pavel


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