Bug 833476

Summary: AC_C_CONST misbehaves with GCC resulting in redefining const symbol to empty expression
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: autoconfAssignee: Pavel Raiskup <praiskup>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: karsten
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: http://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00002.html
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-14 11:13:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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