-
Bug
-
Resolution: Done-Errata
-
Minor
-
rhel-9.4
-
gcc-toolset-13-gcc-13.2.1-6.3.el9
-
None
-
Low
-
rhel-sst-pt-gcc
-
ssg_platform_tools
-
21
-
23
-
1
-
False
-
-
None
-
Red Hat Enterprise Linux
-
None
-
Pass
-
None
-
-
All
-
None
What were you trying to do that didn't work?
The C++ function get_tzdb_list() does not return the expected result.
Please provide the package NVR for which bug is seen:
gcc-toolset-13-gcc-13.1.1-4.3.el8
How reproducible:
Always
Steps to reproduce
$ scl enable gcc-toolset-13 bash $ cat test_tzdb_list.cpp #include <iostream> #include <string> #include <string_view> #include <chrono>using namespace std; using namespace std::literals; using namespace std::chrono;int main() { for(const auto& l: get_tzdb_list()) { for(const auto& ll: l.zones) { cout << ll.name() << endl; } } } $ g++ --std=c++23 -o test_tzdb_list test_tzdb_list.cpp $ ./test_tzdb_list
Expected results
$ ./test_tzdb_list Africa/Abidjan Africa/Algiers Africa/Bissau Africa/Cairo Africa/Casablanca ... Pacific/Tahiti Pacific/Tarawa Pacific/Tongatapu WET
Actual results
$ ./test_tzdb_list Etc/GMT Etc/UTC
Additional information
The problem happens because the implementation looks for the timezone data
at /opt/rh/gcc-toolset-13/root/usr/share/zoneinfo, instead of at the system
path, /usr/share/zoneinfo. It can be circumvented by creating a symbolic link:
# ln -sr /usr/share/zoneinfo /opt/rh/gcc-toolset-13/root/usr/share/
- clones
-
RHEL-20522 get_tzdb_list() looks for zoneinfo data at the wrong path
- Closed
- links to
-
RHBA-2023:124712 gcc-toolset-13-gcc bug fix and enhancement update