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] #39763: different approximation of float in Wind and
      in Linux (MinGW Notification List)
   3. [mingw] #39766: Support gratuitous GCC dependencies
      (MinGW Notification List)


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

Message: 1
Date: Fri, 15 Nov 2019 13:26:30 +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-15 13:26

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-15 13:26 Updated by: keith
 * Status Update from Open to Closed

 * Resolution Update from None to Fixed


Comment:

I applied the proposed patch, and committed it as changeset id.3c7767e. This
will be included in the next WSL release.



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

      Reporter: keith
         Owner: keith
          Type: Issues
        Status: Closed
      Priority: 7
     MileStone: (None)
     Component: WSL
      Severity: 8
    Resolution: Fixed
---------------------------------------------------------------------

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: Fri, 15 Nov 2019 14:28:53 +0000
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #39763: different approximation of
        float in Wind and in Linux
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

#39763: different approximation of float in Wind and in Linux



  Open Date: 2019-11-14 22:43
Last Update: 2019-11-15 14:28

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

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

Last Changes/Comment on this Ticket:
2019-11-15 14:28 Updated by: keith
 * Status Update from Open to Closed

 * Resolution Update from None to Invalid


Comment:

Hello Claus,

I have three comments:

  • Firstly, this is neither a bug report, nor a feature request; it is a
    support request, (for which use of this ticket system is not appropriate);
    as such it should have been directed to the mailing list, where it would
    attain better exposure, and have a greater chance of attracting a fruitful
    discussion, (which it will not achieve here).
  • Secondly, the compiler you are using is badged as a TDM release, which is
    not a genuine MinGW.org product. Indeed, the TDM distributor is not
    authorized to use the MinGW trademark, so describing the TDM product as
    "MinGW" is, technically, a trademark infringement.
  • Finally, I've compiled your code fragment, (with addition of appropriate
    header files, and wrapping it within a main function), using my genuine
    (albeit experimental) MinGW build of GCC-9.2, (built as a Linux hosted
    cross-compiler), with mingwrt-5.2.2 and w32api-5.2.2, and running under
    Wine-4.18, I cannot reproduce your issue ... I see results of 25 in both
    cases.



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

      Reporter: claus
         Owner: (None)
          Type: Issues
        Status: Closed
      Priority: 5 - Medium
     MileStone: (None)
     Component: GCC
      Severity: 5 - Medium
    Resolution: Invalid
---------------------------------------------------------------------

Ticket details:

Dear developers, when I run the following code:

int x=5; printf ("%d\n" , (int)pow(x,2)); printf ("%d\n" , (int)pow(5,2));

I get different results if working on: - Windows 7 and 10, gcc version: gcc
(tdm-1) 5.1.0 from last MinGW was the same some years ago with previous
versions: the results are 24 and 25; - Linux, many distro, many gcc versions:
the results are 25 and 25. To me, the Windows answer should be the same as the
first argument is int 5 in both cases. Could you please give a clarification. I
wasn't able to find any justification for my univ. students. Thank you in
advance

Claus


-- 
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/39763
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=39763


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

Message: 3
Date: Fri, 15 Nov 2019 19:44:40 +0000
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #39766: Support gratuitous GCC
        dependencies
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

#39766: Support gratuitous GCC dependencies



  Open Date: 2019-11-15 19:44
Last Update: 2019-11-15 19:44

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

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

Last Changes/Comment on this Ticket:
2019-11-15 19:44 Updated by: keith
 * New Ticket "Support gratuitous GCC dependencies" created



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

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

Ticket details:

MS-Windows builds of GCC-9.x gratuitously require Microsoft's non-standard
_get_errno() and _set_errno() functions, which are not supported by MSVCRT.DLL
prior to Windows-Vista. Additionally, this same GCC version introduces a
dependency on a ftruncate64() function, which, as ftruncate() is mapped to
Microsoft's _chsize(), could be mapped to Microsoft's _chsize_s(); however,
like the two non-standard errno accessors, _chsize_s() is unsupported, without
introducing dependencies on non-free Microsoft DLLs, prior to Windows-Vista.
Such gratuitous GCC dependencies are incompatible with MinGW.org's policy of
continuing legacy support for pre-Vista Windows versions.

The attached patch offers work-arounds for each of these gratuitous GCC
dependencies, extending support to pre-Vista Windows, while still linking with
MSVCRT.DLL.



-- 
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/39766
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=39766


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

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 8
*******************************************

Reply via email to