Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codecvt_utf8 deprecated in C++17 #187

Open
ret2libc opened this issue Jul 4, 2023 · 3 comments
Open

codecvt_utf8 deprecated in C++17 #187

ret2libc opened this issue Jul 4, 2023 · 3 comments

Comments

@ret2libc
Copy link
Contributor

ret2libc commented Jul 4, 2023

Trying to compile the project I get the following error:

/Users/ret2libc/projects/pe-parse/pe-parser-library/src/unicode_codecvt.cpp:33:29: error: 'codecvt_utf8<char16_t, 1114111, 0>' is deprecated [-Werror,-Wdeprecated-declarations]
  std::wstring_convert<std::codecvt_utf8<char16_t>, char16_t> convert;
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/codecvt:199:28: note: 'codecvt_utf8<char16_t, 1114111, 0>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8
                           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__config:837:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
#    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
                                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__config:810:49: note: expanded from macro '_LIBCPP_DEPRECATED'
#      define _LIBCPP_DEPRECATED __attribute__((deprecated))
                                                ^
/Users/ret2libc/projects/pe-parse/pe-parser-library/src/unicode_codecvt.cpp:33:8: error: 'wstring_convert<std::codecvt_utf8<char16_t, 1114111, 0>, char16_t>' is deprecated [-Werror,-Wdeprecated-declarations]
  std::wstring_convert<std::codecvt_utf8<char16_t>, char16_t> convert;
       ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/locale:3621:28: note: 'wstring_convert<std::codecvt_utf8<char16_t, 1114111, 0>, char16_t>' has been explicitly marked deprecated here
class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert
                           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__config:837:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
#    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
                                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__config:810:49: note: expanded from macro '_LIBCPP_DEPRECATED'
#      define _LIBCPP_DEPRECATED __attribute__((deprecated))
                                                ^
2 errors generated.
make[2]: *** [pe-parser-library/CMakeFiles/pe-parse.dir/src/unicode_codecvt.cpp.o] Error 1
make[1]: *** [pe-parser-library/CMakeFiles/pe-parse.dir/all] Error 2
make: *** [all] Error 2

I'm on a MacBook M1 Max MacOS 13.4.1.

I think #159 would fix the problem for end-users, but the problem will appear soon in CI.

@woodruffw
Copy link
Member

I think #159 would fix the problem for end-users, but the problem will appear soon in CI.

Your prediction was correct, this is now breaking the CI 🙂 -- I suppose we need to switch to libicu or similar to avoid these problems.

@clouds56
Copy link

Any workaround?

@woodruffw
Copy link
Member

Nope. I'd be happy to review a patch that replaces our current use of codecvt_utf8 with libicu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants