Runtime: macOS Big Sur: System.Globalization.Native deprecation build failure

Created on 18 Jul 2020  路  7Comments  路  Source: dotnet/runtime

While building the CLR on macOS Big Sur beta (10.16, or 11) the build fails with the following error.

In file included from /Users/kjones/Projects/runtime/src/libraries/Native/Unix/System.Globalization.Native/pal_casing.c:8:
  /Users/kjones/Projects/runtime/src/libraries/Native/Unix/System.Globalization.Native/pal_icushim_internal.h:184:1: error: 'ucol_setVariableTop' is deprecated [-Werror,-Wdeprecated-declarations]
  FOR_ALL_ICU_FUNCTIONS
  ^
  /Users/kjones/Projects/runtime/src/libraries/Native/Unix/System.Globalization.Native/pal_icushim_internal.h:179:5: note: expanded from macro 'FOR_ALL_ICU_FUNCTIONS'
      FOR_ALL_SET_VARIABLE_ICU_FUNCTIONS \
      ^
  /Users/kjones/Projects/runtime/src/libraries/Native/Unix/System.Globalization.Native/pal_icushim_internal.h:156:24: note: expanded from macro 'FOR_ALL_SET_VARIABLE_ICU_FUNCTIONS'
      PER_FUNCTION_BLOCK(ucol_setVariableTop, libicui18n)
                         ^
  /usr/local/opt/icu4c/include/unicode/ucol.h:1270:1: note: 'ucol_setVariableTop' has been explicitly marked deprecated here
  U_DEPRECATED uint32_t U_EXPORT2 
  ^
  /usr/local/opt/icu4c/include/unicode/umachine.h:115:29: note: expanded from macro 'U_DEPRECATED'
  #define U_DEPRECATED U_CAPI U_ATTRIBUTE_DEPRECATED
                              ^
  /usr/local/opt/icu4c/include/unicode/umachine.h:95:52: note: expanded from macro 'U_ATTRIBUTE_DEPRECATED'
  #    define U_ATTRIBUTE_DEPRECATED __attribute__ ((deprecated))
                                                     ^
  1 error generated.

I'm able to work around this by specifying -Wno-deprecated-declarations to the compiler for now.

area-System.Globalization os-mac-os-x os-mac-os-x-big-sur

Most helpful comment

Sounds good. I'll take care of this.

All 7 comments

Tagging subscribers to this area: @tarekgh, @safern, @krwq
Notify danmosemsft if you want to be subscribed.

@janvorli this looks similar to https://github.com/dotnet/runtime/issues/5914 and https://github.com/dotnet/coreclr/pull/5309/file. looks we need to handle this for macOS Big Sur. maybe we need to look if we can enable HAVE_SET_MAX_VARIABLE on macOSto force using ucol_setMaxVariable and we raise the min requirements of ICU to version 53 instead of 50.

CC @safern

we raise the min requirements of ICU to version 53 instead of 50.

I think that sounds reasonable unless we still support any distro that comes with > 53 by default.

Looking at the supported MacOS matrix https://docs.microsoft.com/en-us/dotnet/core/install/macos I am seeing the minimum OS version we support it macOS 10.12 "Sierra" which comes with ICU version 59. so I believe it will be safe to turn on HAVE_SET_MAX_VARIABLE for MacOS.

Sounds good. I'll take care of this.

I think that sounds reasonable unless we still support any distro that comes with > 53 by default.

@safern RHEL 7 has ICU 50.2

Thanks @janvorli -- at the end we just did this for macOS.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matty-hall picture matty-hall  路  3Comments

bencz picture bencz  路  3Comments

btecu picture btecu  路  3Comments

GitAntoinee picture GitAntoinee  路  3Comments

chunseoklee picture chunseoklee  路  3Comments