From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8EA89384B0C1; Tue, 21 Apr 2020 08:41:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8EA89384B0C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587458470; bh=sznYScBtzYyMvMnJTzfBT7KwMeoOgQdVoSzO75uCjDE=; h=From:To:Subject:Date:From; b=vkDV1nvYYzGS6YhCl/QXOlHiHFD5XZ4reSknqOgkaapl42HRrrgA4ApDkjWLT4N/X IXPR3DJNnk2kPhYhP+HXXgLWwOr6V8E/n42/QfS7/GQLB9CMl+aW2ciluTx+oGBtTb fejqFkR2EamgmNZRMet7cvGDEo5VLXR9E4vySuMQ= From: "valentin.david at codethink dot co.uk" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/94681] New: filesystem::sysmlink_status using stat instead of lstat when --disable-libstdcxx-filesystem-ts Date: Tue, 21 Apr 2020 08:41:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 9.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: valentin.david at codethink dot co.uk X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 08:41:10 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94681 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=3D48321&action=3Dedit Proposed fix std::filesystem::sysmlink_status follows symlinks when GCC has been configu= red 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 t= est "$enable_libstdcxx_filesystem_ts =3D 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.=