Send MinGW-Notify mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.osdn.me/mailman/listinfo/mingw-notify
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of MinGW-Notify digest..."


Please do not reply to this notification; the sender address is unable to 
accept incoming e-mail.  If you wish to unsubscribe you can do so at 
https://lists.osdn.me/mailman/listinfo/mingw-notify.



Today's Topics:

   1. [mingw] #39757: Compilation with GNU-C++ creates multiple
      definitions of vsnprintf() (MinGW Notification List)
   2. [mingw] #39757: Compilation with GNU-C++ creates multiple
      definitions of vsnprintf() (MinGW Notification List)
   3. [SCM] mingw-org-wsl (mingw) branch, 5.2-trunk, updated.
      3c7767ef789712844a47d4e5360a65f542753694 (MinGW Notification List)


----------------------------------------------------------------------

Message: 1
Date: Wed, 13 Nov 2019 14:00:46 +0000
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #39757: Compilation with GNU-C++
        creates multiple definitions of vsnprintf()
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

#39757: Compilation with GNU-C++ creates multiple definitions of vsnprintf()



  Open Date: 2019-11-13 14:00
Last Update: 2019-11-13 14:00

URL for this Ticket:
    https://osdn.net//projects/mingw/ticket/39757
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=39757

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2019-11-13 14:00 Updated by: keith
 * New Ticket "Compilation with GNU-C++ creates multiple definitions of 
vsnprintf
()" created



---------------------------------------------------------------------
Ticket Status:

      Reporter: keith
         Owner: (None)
          Type: Issues
        Status: Open
      Priority: 5 - Medium
     MileStone: (None)
     Component: WSL
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

As reported in this pair of e-mail threads:

  • https://osdn.net/projects/mingw/lists/archive/users/2019-August/000333.htmlhttps://osdn.net/projects/mingw/lists/archive/users/2019-August/000335.html

compilation of any C++ translation unit which refers, either directly or
indirectly, to vsnprintf(), will result in link failure, due to multiple public
definitions of this symbol. The issue is clearly illustrated by the following
code, (abstracted from the latter e-mail report):

 1.  #include <stdio.h>
 2.  #include <stdarg.h>
 3.  
 4.  void debug_log(const char *fmt, ...) {
 5.      va_list args;
 6.      va_start(args, fmt);
 7.      char buf[1+vsnprintf(NULL, 0, fmt, args)];
 8.      vsnprintf(buf, sizeof buf, fmt, args);
 9.      va_end(args);
10.  }
11.  
12.  main() {
13.      printf("mingw-link\n");
14.  }

compilation of which yields:

$ g++ -o mingw-link.exe main.cpp
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe:
  
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../libmingwex.a(vsnprintf.o):(.text+0x0):
 multiple definition of `vsnprintf';
main.cpp:(.text$vsnprintf[_vsnprintf]+0x0): first defined here
collect2.exe: error: ld returned 1 exit status



-- 
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN

Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/mingw/ticket/39757
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=39757


------------------------------

Message: 2
Date: Wed, 13 Nov 2019 14:20:10 +0000
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #39757: Compilation with GNU-C++
        creates multiple definitions of vsnprintf()
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

#39757: Compilation with GNU-C++ creates multiple definitions of vsnprintf()



  Open Date: 2019-11-13 14:00
Last Update: 2019-11-13 14:20

URL for this Ticket:
    https://osdn.net//projects/mingw/ticket/39757
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=39757

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2019-11-13 14:20 Updated by: keith
 * Owner Update from (None) to keith

 * Severity Update from 5 - Medium to 8

 * Priority Update from 5 - Medium to 7


Comment:

This is a critical regression, introduced in mingwrt-5.2.2; it arises from
changes in <stdio.h>, to resolve issue #39224, which cause g++ to emit multiple
publicly visible instances of vsnprintf(), each of which refers to an extern
implementation of __mingw_vsnprintf(), and conflicts with its publicly visible
vsprintf() alias, within the translation unit in which __mingw_vsnprintf()
itself is implemented.



---------------------------------------------------------------------
Ticket Status:

      Reporter: keith
         Owner: keith
          Type: Issues
        Status: Open [Owner assigned]
      Priority: 7
     MileStone: (None)
     Component: WSL
      Severity: 8
    Resolution: None
---------------------------------------------------------------------

Ticket details:

As reported in this pair of e-mail threads:

  • https://osdn.net/projects/mingw/lists/archive/users/2019-August/000333.htmlhttps://osdn.net/projects/mingw/lists/archive/users/2019-August/000335.html

compilation of any C++ translation unit which refers, either directly or
indirectly, to vsnprintf(), will result in link failure, due to multiple public
definitions of this symbol. The issue is clearly illustrated by the following
code, (abstracted from the latter e-mail report):

 1.  #include <stdio.h>
 2.  #include <stdarg.h>
 3.  
 4.  void debug_log(const char *fmt, ...) {
 5.      va_list args;
 6.      va_start(args, fmt);
 7.      char buf[1+vsnprintf(NULL, 0, fmt, args)];
 8.      vsnprintf(buf, sizeof buf, fmt, args);
 9.      va_end(args);
10.  }
11.  
12.  main() {
13.      printf("mingw-link\n");
14.  }

compilation of which yields:

$ g++ -o mingw-link.exe main.cpp
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe:
  
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../libmingwex.a(vsnprintf.o):(.text+0x0):
 multiple definition of `vsnprintf';
main.cpp:(.text$vsnprintf[_vsnprintf]+0x0): first defined here
collect2.exe: error: ld returned 1 exit status



-- 
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN

Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/mingw/ticket/39757
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=39757


------------------------------

Message: 3
Date: Thu, 14 Nov 2019 03:38:12 +0900
From: MinGW Notification List <[email protected]>
To: [email protected]
Subject: [MinGW-Notify] [SCM] mingw-org-wsl (mingw) branch, 5.2-trunk,
        updated. 3c7767ef789712844a47d4e5360a65f542753694
Message-ID: <[email protected]>

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to "mingw-org-wsl" repository
containing the "mingw" project.

The branch, 5.2-trunk has been updated
       via  3c7767ef789712844a47d4e5360a65f542753694 (commit)
      from  867d8d514f7343c07016dd5711f67023f397e0a4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3c7767ef789712844a47d4e5360a65f542753694
Author: Keith Marshall <[email protected]>
Date:   Sat Oct 26 10:33:12 2019 +0100

    Fix MinGW-Issue #39757; avoid multiple vsnprintf() definitions.

-----------------------------------------------------------------------

Summary of changes:
 mingwrt/ChangeLog       |  8 ++++++++
 mingwrt/include/stdio.h | 22 +++++++++++-----------
 2 files changed, 19 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
mingw-org-wsl (mingw)



------------------------------

Subject: Digest Footer

_______________________________________________
MinGW-Notify mailing list
[email protected]
https://lists.osdn.me/mailman/listinfo/mingw-notify


------------------------------

End of MinGW-Notify Digest, Vol 26, Issue 6
*******************************************

Reply via email to