public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/94681] New: filesystem::sysmlink_status using stat instead of lstat when --disable-libstdcxx-filesystem-ts
@ 2020-04-21  8:41 valentin.david at codethink dot co.uk
  2020-04-21  8:42 ` [Bug libstdc++/94681] " redi at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: valentin.david at codethink dot co.uk @ 2020-04-21  8:41 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94681
           Summary: filesystem::sysmlink_status using stat instead of
                    lstat when --disable-libstdcxx-filesystem-ts
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: valentin.david at codethink dot co.uk
  Target Milestone: ---

Created attachment 48321
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48321&action=edit
Proposed fix

std::filesystem::sysmlink_status follows symlinks when GCC has been configured
with --disable-libstdcxx-filesystem-ts, but it works fine when it has been
configured with --enable-libstdcxx-filesystem-ts.

The reason is that libstdc++-v3/src/c++17/fs_ops.cc includes
libstdc++-v3/src/filesystem/ops-common.h which has some requirements in the
configure script that are not executed.

In libstdc++-v3/acinclude.m4, GLIBCXX_CHECK_FILESYSTEM_DEPS is guarded by test
"$enable_libstdcxx_filesystem_ts = yes". But this should be run even if
enable_libstdcxx_filesystem_ts is "no" since
libstdc++-v3/src/filesystem/ops-common.h is used when
--disable-libstdcxx-filesystem-ts is used.

Removing this "if" fixed the issue for me.

While I have not tested master, I believe the issue is still there.

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

end of thread, other threads:[~2020-09-21 23:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-21  8:41 [Bug libstdc++/94681] New: filesystem::sysmlink_status using stat instead of lstat when --disable-libstdcxx-filesystem-ts valentin.david at codethink dot co.uk
2020-04-21  8:42 ` [Bug libstdc++/94681] " redi at gcc dot gnu.org
2020-04-21  8:55 ` redi at gcc dot gnu.org
2020-08-10 12:22 ` cvs-commit at gcc dot gnu.org
2020-08-10 12:25 ` redi at gcc dot gnu.org
2020-08-10 14:37 ` clyon at gcc dot gnu.org
2020-08-10 16:04 ` redi at gcc dot gnu.org
2020-08-10 18:12 ` cvs-commit at gcc dot gnu.org
2020-09-21 23:00 ` cvs-commit at gcc dot gnu.org
2020-09-21 23:00 ` cvs-commit at gcc dot gnu.org
2020-09-21 23:14 ` cvs-commit at gcc dot gnu.org
2020-09-21 23:14 ` cvs-commit at gcc dot gnu.org
2020-09-21 23:14 ` redi at gcc dot gnu.org
2020-09-21 23:14 ` redi 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).