public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/104217] New: gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv
@ 2022-01-24 23:50 mckelvey at maskull dot com
  2022-01-24 23:54 ` [Bug bootstrap/104217] " pinskia at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: mckelvey at maskull dot com @ 2022-01-24 23:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104217

            Bug ID: 104217
           Summary: gcc-12-20220123 failure to build on Cygwin due to lack
                    of secure_getenv
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mckelvey at maskull dot com
  Target Milestone: ---

Created attachment 52283
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52283&action=edit
Tarball of attempted build

This bug has been around for a few snapshots so I'm reporting it now.

In file included from ../../../.././libstdc++-v3/src/c++17/fs_ops.cc:58:
../../../.././libstdc++-v3/src/c++17/../filesystem/ops-common.h: In function
‘const char* std::filesystem::get_temp_directory_from_env(std::error_code&)’:
../../../.././libstdc++-v3/src/c++17/../filesystem/ops-common.h:640:25: error:
‘::secure_getenv’ has not been declared
  640 |         auto tmpdir = ::secure_getenv(env);
                                ^~~~~~~~~~~~~
make[6]: *** [Makefile:585: fs_ops.lo] Error 1

Configured as: ./configure --enable-languages=c,c++ --enable-threads=posix

Run under up-to-date Cygwin using gcc-11-20220122.

cygcheck (cygwin) 3.3.3

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug bootstrap/104217] gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv
  2022-01-24 23:50 [Bug bootstrap/104217] New: gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv mckelvey at maskull dot com
@ 2022-01-24 23:54 ` pinskia at gcc dot gnu.org
  2022-01-24 23:55 ` mckelvey at maskull dot com
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-24 23:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104217

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Hmm, there is a check for it in configure I don't know why it is being it is
being checked as true.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug bootstrap/104217] gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv
  2022-01-24 23:50 [Bug bootstrap/104217] New: gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv mckelvey at maskull dot com
  2022-01-24 23:54 ` [Bug bootstrap/104217] " pinskia at gcc dot gnu.org
@ 2022-01-24 23:55 ` mckelvey at maskull dot com
  2022-01-24 23:55 ` pinskia at gcc dot gnu.org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mckelvey at maskull dot com @ 2022-01-24 23:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104217

--- Comment #2 from James McKelvey <mckelvey at maskull dot com> ---
Builds with gcc-11-20220122.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug bootstrap/104217] gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv
  2022-01-24 23:50 [Bug bootstrap/104217] New: gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv mckelvey at maskull dot com
  2022-01-24 23:54 ` [Bug bootstrap/104217] " pinskia at gcc dot gnu.org
  2022-01-24 23:55 ` mckelvey at maskull dot com
@ 2022-01-24 23:55 ` pinskia at gcc dot gnu.org
  2022-01-24 23:57 ` pinskia at gcc dot gnu.org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-24 23:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104217

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>checking for secure_getenv... yes

Can you attach
/home/McKelvey/gcc-12-20220123/x86_64-pc-cygwin/libstdc++-v3/config.log ?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug bootstrap/104217] gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv
  2022-01-24 23:50 [Bug bootstrap/104217] New: gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv mckelvey at maskull dot com
                   ` (2 preceding siblings ...)
  2022-01-24 23:55 ` pinskia at gcc dot gnu.org
@ 2022-01-24 23:57 ` pinskia at gcc dot gnu.org
  2022-01-25  0:01 ` mckelvey at maskull dot com
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-24 23:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104217

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Hmm:
https://sourceware.org/legacy-ml/cygwin-patches/2019-q1/msg00006.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug bootstrap/104217] gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv
  2022-01-24 23:50 [Bug bootstrap/104217] New: gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv mckelvey at maskull dot com
                   ` (3 preceding siblings ...)
  2022-01-24 23:57 ` pinskia at gcc dot gnu.org
@ 2022-01-25  0:01 ` mckelvey at maskull dot com
  2022-01-25  0:07 ` [Bug libstdc++/104217] [12 Regression] " pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mckelvey at maskull dot com @ 2022-01-25  0:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104217

--- Comment #5 from James McKelvey <mckelvey at maskull dot com> ---
Created attachment 52284
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52284&action=edit
Config log

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libstdc++/104217] [12 Regression] gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv
  2022-01-24 23:50 [Bug bootstrap/104217] New: gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv mckelvey at maskull dot com
                   ` (4 preceding siblings ...)
  2022-01-25  0:01 ` mckelvey at maskull dot com
@ 2022-01-25  0:07 ` pinskia at gcc dot gnu.org
  2022-01-25  0:11 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-25  0:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104217

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0
            Summary|gcc-12-20220123 failure to  |[12 Regression]
                   |build on Cygwin due to lack |gcc-12-20220123 failure to
                   |of secure_getenv            |build on Cygwin due to lack
                   |                            |of secure_getenv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libstdc++/104217] [12 Regression] gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv
  2022-01-24 23:50 [Bug bootstrap/104217] New: gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv mckelvey at maskull dot com
                   ` (5 preceding siblings ...)
  2022-01-25  0:07 ` [Bug libstdc++/104217] [12 Regression] " pinskia at gcc dot gnu.org
@ 2022-01-25  0:11 ` pinskia at gcc dot gnu.org
  2022-01-25  8:10 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-25  0:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104217

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
so the cygwin libraries include secure_getenv but the header file defines it
only when __GNU_VISIBLE is true. Someone who knows cygwin headers can better
help here than me really. But I think libstdc++ checks only if secure_getenv is
in the library and not the header .... Having it check the include might be
useful too.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libstdc++/104217] [12 Regression] gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv
  2022-01-24 23:50 [Bug bootstrap/104217] New: gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv mckelvey at maskull dot com
                   ` (6 preceding siblings ...)
  2022-01-25  0:11 ` pinskia at gcc dot gnu.org
@ 2022-01-25  8:10 ` rguenth at gcc dot gnu.org
  2022-01-25 10:00 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-25  8:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104217

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
what Andrew said - either libstdc++ should provide a prototype or check for
one.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libstdc++/104217] [12 Regression] gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv
  2022-01-24 23:50 [Bug bootstrap/104217] New: gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv mckelvey at maskull dot com
                   ` (7 preceding siblings ...)
  2022-01-25  8:10 ` rguenth at gcc dot gnu.org
@ 2022-01-25 10:00 ` redi at gcc dot gnu.org
  2022-01-25 10:02 ` redi at gcc dot gnu.org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: redi at gcc dot gnu.org @ 2022-01-25 10:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104217

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It does check for it

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libstdc++/104217] [12 Regression] gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv
  2022-01-24 23:50 [Bug bootstrap/104217] New: gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv mckelvey at maskull dot com
                   ` (8 preceding siblings ...)
  2022-01-25 10:00 ` redi at gcc dot gnu.org
@ 2022-01-25 10:02 ` redi at gcc dot gnu.org
  2022-01-25 21:09 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: redi at gcc dot gnu.org @ 2022-01-25 10:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104217

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-01-25
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Oh, I see... Autoconf doesn't work as it should. Sigh.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libstdc++/104217] [12 Regression] gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv
  2022-01-24 23:50 [Bug bootstrap/104217] New: gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv mckelvey at maskull dot com
                   ` (9 preceding siblings ...)
  2022-01-25 10:02 ` redi at gcc dot gnu.org
@ 2022-01-25 21:09 ` cvs-commit at gcc dot gnu.org
  2022-02-22 17:40 ` redi at gcc dot gnu.org
  2022-05-09 21:44 ` cvs-commit at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-25 21:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104217

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:e20486d508afdf22790a271e90ca76d8df5fa7a5

commit r12-6867-ge20486d508afdf22790a271e90ca76d8df5fa7a5
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Jan 25 10:11:36 2022 +0000

    libstdc++: Define _GNU_SOURCE for secure_getenv on Cygwin [PR104217]

    For GNU/Linux G++ defines _GNU_SOURCE automatically, but not for Cygwin.
    This means secure_getenv is not declared by Cygwin's <stdlib.h>, even
    though autoconf detected it is present in the library. Define it in the
    source files that want to use secure_getenv.

    libstdc++-v3/ChangeLog:

            PR libstdc++/104217
            * src/c++17/fs_ops.cc (_GNU_SOURCE): Define.
            * src/filesystem/dir.cc (_GNU_SOURCE): Define.
            * src/filesystem/ops.cc (_GNU_SOURCE): Define.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libstdc++/104217] [12 Regression] gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv
  2022-01-24 23:50 [Bug bootstrap/104217] New: gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv mckelvey at maskull dot com
                   ` (10 preceding siblings ...)
  2022-01-25 21:09 ` cvs-commit at gcc dot gnu.org
@ 2022-02-22 17:40 ` redi at gcc dot gnu.org
  2022-05-09 21:44 ` cvs-commit at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: redi at gcc dot gnu.org @ 2022-02-22 17:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104217

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This should be fixed, please reopen if not.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug libstdc++/104217] [12 Regression] gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv
  2022-01-24 23:50 [Bug bootstrap/104217] New: gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv mckelvey at maskull dot com
                   ` (11 preceding siblings ...)
  2022-02-22 17:40 ` redi at gcc dot gnu.org
@ 2022-05-09 21:44 ` cvs-commit at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-09 21:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104217

--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:8562fbaae9d0c06316188c4749a2171071b6b926

commit r11-9971-g8562fbaae9d0c06316188c4749a2171071b6b926
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Jan 25 10:11:36 2022 +0000

    libstdc++: Define _GNU_SOURCE for secure_getenv on Cygwin [PR104217]

    For GNU/Linux G++ defines _GNU_SOURCE automatically, but not for Cygwin.
    This means secure_getenv is not declared by Cygwin's <stdlib.h>, even
    though autoconf detected it is present in the library. Define it in the
    source files that want to use secure_getenv.

    libstdc++-v3/ChangeLog:

            PR libstdc++/104217
            * src/c++17/fs_ops.cc (_GNU_SOURCE): Define.
            * src/filesystem/dir.cc (_GNU_SOURCE): Define.
            * src/filesystem/ops.cc (_GNU_SOURCE): Define.

    (cherry picked from commit e20486d508afdf22790a271e90ca76d8df5fa7a5)

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-05-09 21:44 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24 23:50 [Bug bootstrap/104217] New: gcc-12-20220123 failure to build on Cygwin due to lack of secure_getenv mckelvey at maskull dot com
2022-01-24 23:54 ` [Bug bootstrap/104217] " pinskia at gcc dot gnu.org
2022-01-24 23:55 ` mckelvey at maskull dot com
2022-01-24 23:55 ` pinskia at gcc dot gnu.org
2022-01-24 23:57 ` pinskia at gcc dot gnu.org
2022-01-25  0:01 ` mckelvey at maskull dot com
2022-01-25  0:07 ` [Bug libstdc++/104217] [12 Regression] " pinskia at gcc dot gnu.org
2022-01-25  0:11 ` pinskia at gcc dot gnu.org
2022-01-25  8:10 ` rguenth at gcc dot gnu.org
2022-01-25 10:00 ` redi at gcc dot gnu.org
2022-01-25 10:02 ` redi at gcc dot gnu.org
2022-01-25 21:09 ` cvs-commit at gcc dot gnu.org
2022-02-22 17:40 ` redi at gcc dot gnu.org
2022-05-09 21:44 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).