Bug 833476 - AC_C_CONST misbehaves with GCC resulting in redefining const symbol to empty expression
AC_C_CONST misbehaves with GCC resulting in redefining const symbol to empty ...
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: autoconf (Show other bugs)
16
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Pavel Raiskup
Fedora Extras Quality Assurance
http://lists.gnu.org/archive/html/bug...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-19 10:34 EDT by Petr Pisar
Modified: 2013-01-14 06:13 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-14 06:13:06 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Pisar 2012-06-19 10:34:32 EDT
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 03:44:13 EST
(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 05:43:37 EST
(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 06:13:06 EST
(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.