Menu

#7 Fails to build with GCC 10

v1.0 (example)
closed
nobody
None
5
2020-01-26
2020-01-23
No

nas-1.9.4 fails to build with GCC 10 due to a double global variable definition. An attached patch fixes it.

1 Attachments

Related

Bugs: #7

Discussion

  • Erik Auerswald

    Erik Auerswald - 2020-01-23

    Hello Petr,

    On Thu, Jan 23, 2020 at 12:52:54PM -0000, Petr Písař wrote:


    ** [bugs:#7] Fails to build with GCC 10**

    Status: open
    Group: v1.0 (example)
    Created: Thu Jan 23, 2020 12:52 PM UTC by Petr Písař
    Last Updated: Thu Jan 23, 2020 12:52 PM UTC
    Owner: nobody
    Attachments:

    nas-1.9.4 fails to build with GCC 10 due to a double global variable definition. An attached patch fixes it.

    Thanks for the patch. At first glance it seems sensible, but I won't
    have time for a closer look and testing before the weekend. Somebody else
    might have; if so, please go ahead. :-)

    Thanks,
    Erik
    --
    La perfection est atteinte non quand il ne reste rien ajouter, mais quand il
    ne reste rien à enlever.
    -- Antoine de Saint-Exupéry

     

    Related

    Bugs: #7

  • Erik Auerswald

    Erik Auerswald - 2020-01-26
    • status: open --> closed
     
  • Erik Auerswald

    Erik Auerswald - 2020-01-26

    According to the lex & yacc and flex & bison books, using extern FILE *yyin is correct. Obviously, omitting extern worked since introducing the functionality in the year 2000. It still works with GCC versions less than 10.

    I have tested the patch on Ubuntu 18.04.3 LTS with gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0. The NAS server builds and parses the configuration with and without extern.

    Note that using extern FILE *yyin can only be used with a non-reentrant scanner. The scanner used for parsing the NAS server configuration is non-reentrant.

    I have applied the patch. Closing this bug.

     

Log in to post a comment.

MongoDB Logo MongoDB