[EDIT/UPDATE: Fix slated for OpenEXR v4.0.0 as per #2314 that requires API change, hence not doable in v3.4 context]
C++17 deprecated and C++26 removed wstring_convert; this is with commit 8de91e6, just before v3.4.9, and related to #1785 - this happens on Fedora Linux 42 fully patched, which runs GCC 15.2.1.
[34+132/310 42%| 28% 15.8/19.7 00:17] Building CXX object src/lib/OpenEXR/CMakeFiles/OpenEXR.dir/ImfMisc.cpp.o
/home/mandree/VCS-other/openexr.git/src/lib/OpenEXR/ImfMisc.cpp: In function ‘std::wstring Imf_4_0::WidenFilename(const char*)’:
/home/mandree/VCS-other/openexr.git/src/lib/OpenEXR/ImfMisc.cpp:2002:10: warning: ‘template<class _Codecvt, class _Elem, class _Wide_alloc, class _Byte_alloc> class std::__cxx11::wstring_convert’ is deprecated [-Wdeprecated-declarations]
2002 | std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t> converter;
| ^~~~~~~~~~~~~~~
In file included from /usr/include/c++/15/locale:47,
from /home/mandree/VCS-other/openexr.git/src/lib/OpenEXR/ImfMisc.cpp:27:
/usr/include/c++/15/bits/locale_conv.h:262:33: note: declared here
262 | class _GLIBCXX17_DEPRECATED wstring_convert
| ^~~~~~~~~~~~~~~
[1+310/310 100%|100% 14.7/15.2 00:00] Linking CXX executable bin/IexTest
Just like #1785 this needs a replacement outside the C++ standard.
Depending on how much time the OpenEXR developers can afford to spend, this is a loose unordered collection of relevant links I came across:
This is the relevant FreeBSD 15.0-RELEASE warning set when building 3.4.9-rc:
[131/310] Building CXX object src/lib/OpenEXR/CMakeFiles/OpenEXR.dir/ImfMisc.cpp.o
/home/mandree/VCS-other/openexr.git/src/lib/OpenEXR/ImfMisc.cpp:2002:31: warning: 'codecvt_utf8<wchar_t>' is deprecated [-Wdeprecated-declarations]
2002 | std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t> converter;
| ^
/usr/include/c++/v1/codecvt:193:28: note: 'codecvt_utf8<wchar_t>' has been explicitly marked deprecated here
193 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8 : public __codecvt_utf8<_Elem> {
| ^
/usr/include/c++/v1/__config:748:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
748 | # define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
| ^
/usr/include/c++/v1/__config:713:49: note: expanded from macro '_LIBCPP_DEPRECATED'
713 | # define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
| ^
/home/mandree/VCS-other/openexr.git/src/lib/OpenEXR/ImfMisc.cpp:2002:10: warning: 'wstring_convert<std::codecvt_utf8<wchar_t>>' is deprecated [-Wdeprecated-declarations]
2002 | std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t> converter;
| ^
/usr/include/c++/v1/locale:3145:28: note: 'wstring_convert<std::codecvt_utf8<wchar_t>>' has been explicitly marked deprecated here
3145 | class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert {
| ^
/usr/include/c++/v1/__config:748:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
748 | # define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
| ^
/usr/include/c++/v1/__config:713:49: note: expanded from macro '_LIBCPP_DEPRECATED'
713 | # define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
| ^
2 warnings generated.
[EDIT/UPDATE: Fix slated for OpenEXR v4.0.0 as per #2314 that requires API change, hence not doable in v3.4 context]
C++17 deprecated and C++26 removed wstring_convert; this is with commit 8de91e6, just before v3.4.9, and related to #1785 - this happens on Fedora Linux 42 fully patched, which runs GCC 15.2.1.
Just like #1785 this needs a replacement outside the C++ standard.
Depending on how much time the OpenEXR developers can afford to spend, this is a loose unordered collection of relevant links I came across:
Sandor Dargo states in https://www.sandordargo.com/blog/2025/03/19/cpp26-deprecate-remove-library-features and links to this paper https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2871r3.pdf
There is a UTF-8 manifesto that suggests avoiding wchar/wstring, more importantly, suggests a "nowide" library as part of boost, or standalone, for thinly wrapping the necessary Wide APIs to interface with the usual C/C++ APIs, see https://github.com/boostorg/nowide - this apparently originated in https://cppcms.com/files/nowide/html/
There is a very long read, https://thephd.dev/the-c-c++-rust-string-text-encoding-api-landscape
This is the relevant FreeBSD 15.0-RELEASE warning set when building 3.4.9-rc: