Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
std::filesystem::_Dir_base::advance(bool, std::error_code&) not defined
Version-Release number of selected component (if applicable):
How reproducible:
constantly reproducible.
Steps to Reproduce:
$ cat FindStdFilesystem_test.cc
#if __has_include(<filesystem>)
#include <filesystem>
namespace fs = std::filesystem;
#elif __has_include(<experimental/filesystem>)
#include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
#else
#error std::filesystem not available!
#endif
int main() {
fs::create_directory("sandbox");
fs::remove_all("sandbox");
}
$ scl enable gcc-toolset-9 bash
$ g++ -std=c++17 FindStdFilesystem_test.cc
/bin/ld: a.out: hidden symbol `_ZNSt10filesystem9_Dir_base7advanceEbRSt10error_code' isn't defined
/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
Actual results:
the code using std::filesystem fails to link.
Expected results:
the code using std::filesystem links.
Additional info:
$ c++filt _ZNSt10filesystem9_Dir_base7advanceEbRSt10error_code
std::filesystem::_Dir_base::advance(bool, std::error_code&)
$ nm -C /opt/rh/gcc-toolset-9/root/usr/lib/gcc/aarch64-redhat-linux/9/libstdc++_nonshared.a | grep _Dir_base
U std::filesystem::_Dir_base::advance(bool, std::error_code&)
0000000000000000 W std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&)
0000000000000000 W std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&)
0000000000000000 n std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&)
U std::filesystem::_Dir_base::advance(bool, std::error_code&)
0000000000000000 W std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&)
0000000000000000 W std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&)
0000000000000000 n std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&)
$ dnf list installed gcc-toolset-9-gcc-c++
Installed Packages gcc-toolset-9-gcc-c++.aarch64 9.2.1-2.3.el8 @AppStream
please note, our building host is running CentOS8, and is using GTS from AppStream. but i think this issue also applies to RHEL8.
this issue is only observed on aarch64. on amd64, i have:
$ nm -C /opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/libstdc++_nonshared.a | grep _Dir_base
0000000000000000 W std::filesystem::_Dir_base::advance(bool, std::error_code&)
0000000000000000 W std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&)
0000000000000000 W std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&)
0000000000000000 n std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&)
0000000000000000 W std::filesystem::_Dir_base::advance(bool, std::error_code&)
0000000000000000 W std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&)
0000000000000000 W std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&)
0000000000000000 n std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&)
$ dnf list installed gcc-toolset-9-gcc-c++
Installed Packages gcc-toolset-9-gcc-c++.x86_64 9.2.1-2.3.el8 @rhel-8-for-x86_64-appstream-rpms
There indeed is a problem with that symbol in GTS 9:
308: 0000000000000000 0 NOTYPE GLOBAL HIDDEN UND _ZNSt10filesystem9_Dir_base7advanceEbRSt10error_code
all of these issues were fixed in GTS 10. I suppose you can't switch to gcc-toolset-10-gcc?
(In reply to Kefu Chai from comment #4)
> hi Marek,
>
> thank you for your prompt reply!
>
> regarding C++17 support on GCC-9, I was mostly referencing
>
> - https://gcc.gnu.org/projects/cxx-status.html#cxx17
> - https://gcc.gnu.org/gcc-9/changes.html#libstdcxx
>
> but yeah, since we have GCC-10, there is no good reason to stick with GCC-9!
> I will try to contact our lab administrator to see if we can switch to RHEL8
> for using GTS-10. as, FWIW, CentOS8's GTS-10 is currently broken. see
> https://bugs.centos.org/view.php?id=17860.
>
> I am closing this ticket as "won't fix".
Thanks for understanding! Note that we don't really consider C++17 to be stable in GCC 9,
but it is considered stable in GCC 10. So switching to GCC 10 definitely makes sense from
this point of view.
Description of problem: std::filesystem::_Dir_base::advance(bool, std::error_code&) not defined Version-Release number of selected component (if applicable): How reproducible: constantly reproducible. Steps to Reproduce: $ cat FindStdFilesystem_test.cc #if __has_include(<filesystem>) #include <filesystem> namespace fs = std::filesystem; #elif __has_include(<experimental/filesystem>) #include <experimental/filesystem> namespace fs = std::experimental::filesystem; #else #error std::filesystem not available! #endif int main() { fs::create_directory("sandbox"); fs::remove_all("sandbox"); } $ scl enable gcc-toolset-9 bash $ g++ -std=c++17 FindStdFilesystem_test.cc /bin/ld: a.out: hidden symbol `_ZNSt10filesystem9_Dir_base7advanceEbRSt10error_code' isn't defined /bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status Actual results: the code using std::filesystem fails to link. Expected results: the code using std::filesystem links. Additional info: $ c++filt _ZNSt10filesystem9_Dir_base7advanceEbRSt10error_code std::filesystem::_Dir_base::advance(bool, std::error_code&) $ nm -C /opt/rh/gcc-toolset-9/root/usr/lib/gcc/aarch64-redhat-linux/9/libstdc++_nonshared.a | grep _Dir_base U std::filesystem::_Dir_base::advance(bool, std::error_code&) 0000000000000000 W std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&) 0000000000000000 W std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&) 0000000000000000 n std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&) U std::filesystem::_Dir_base::advance(bool, std::error_code&) 0000000000000000 W std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&) 0000000000000000 W std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&) 0000000000000000 n std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&) $ dnf list installed gcc-toolset-9-gcc-c++ Installed Packages gcc-toolset-9-gcc-c++.aarch64 9.2.1-2.3.el8 @AppStream please note, our building host is running CentOS8, and is using GTS from AppStream. but i think this issue also applies to RHEL8. this issue is only observed on aarch64. on amd64, i have: $ nm -C /opt/rh/gcc-toolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/libstdc++_nonshared.a | grep _Dir_base 0000000000000000 W std::filesystem::_Dir_base::advance(bool, std::error_code&) 0000000000000000 W std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&) 0000000000000000 W std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&) 0000000000000000 n std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&) 0000000000000000 W std::filesystem::_Dir_base::advance(bool, std::error_code&) 0000000000000000 W std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&) 0000000000000000 W std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&) 0000000000000000 n std::filesystem::_Dir_base::_Dir_base(char const*, bool, std::error_code&) $ dnf list installed gcc-toolset-9-gcc-c++ Installed Packages gcc-toolset-9-gcc-c++.x86_64 9.2.1-2.3.el8 @rhel-8-for-x86_64-appstream-rpms