Jump to content

[Resolved] icu 61


mapkoc
 Share

Recommended Posts

On 4/2/2018 at 10:35 AM, elexis said:

@AudaciousTUX is also experiencing the issue, but adding the line mentioned above by itself doesn't fix it:

../../../source/i18n/L10n.cpp:517:24: error: expected type-specifier before ?Locale?
Locale* locale = new Locale(Locale::createCanonical(localeCode.c_str()));
 

It should, that's the error before importing the namespace. His error is unrelated to 0ad

  • Like 1
Link to comment
Share on other sites

On 3/31/2018 at 7:17 PM, mapkoc said:

I guess the packager always has to recompile because icu always breaks it
but this time they must patch that file.

Uhm, but svn isn't packaged by them and we want users to be able to build with all current icu versions, nay?

Given that adding the "using namespace icu;" line to icu.h doesn't compile on my end with icu 55.0, I think we' might have to use the "icu::" namespace explicitly everywhere. Apparently there's some alternative  https://codereview.chromium.org/171012/show.

This patch changes Locale to icu::Locale and compiles here, but I guess there are more types that need the same change, like DateFormat. Can someone test?

@bb_ didn't you use arch too? Also leaving a ping for @Itms

locale.patch

  • Like 2
Link to comment
Share on other sites

Considering how commonplace the name "Locale" is, being forced to specify the namespace is certainly a good thing, even though it breaks stuff.

We usually don't write "using namespace foo;", especially in headers, so I think the better fix is what elexis proposes.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

3 hours ago, Itms said:

Considering how commonplace the name "Locale" is, being forced to specify the namespace is certainly a good thing, even though it breaks stuff.

We usually don't write "using namespace foo;", especially in headers, so I think the better fix is what elexis proposes.

I agree, we definitely have to avoid "using namespace ..." (except very rare cases). Especially we have modern IDEs to autocomplete it. The "icu::" would be better, even for the patch reading.

Link to comment
Share on other sites

The package maintainer for the distro downloads the release candidate, not svn.

https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/0ad

He already fixes this with the following compiler flag

  # http://site.icu-project.org/download/61#TOC-Migration-Issues
  CXXFLAGS+=' -DU_USING_ICU_NAMESPACE=1'

I guess for svn you can change all locales for icu::locale or  maybe you can use conditional includes

#if icu ver(major or minor) > xx

...

#endif

I don't know the syntax

  • Like 1
Link to comment
Share on other sites

If you are using arcanist, you can use “arc patch D1234”. You could also download the raw diff and use the patch tool to apply.

Edited by Guest
Better formatting.
Link to comment
Share on other sites

ok, found it

patch -p0 < D1436.diff

@elexis: It doesn't work
../../../source/i18n/L10n.h:314:28: error: ‘Locale’ does not name a type; did yo

../../../source/i18n/L10n.cpp:92:28: error: no matching function for call to ‘L10n::ValidateLocale(const icu_61::Locale&) const’

../../../source/i18n/L10n.h:314:7: note:   no known conversion for argument 1 from ‘const icu_61::Locale’ to ‘const int&’

../../../source/i18n/L10n.cpp:101:72: error: no matching function for call to ‘L10n::ValidateLocale(icu_61::Locale) const’

../../../source/i18n/L10n.cpp:99:6: note:   no known conversion for argument 1 from ‘icu_61::Locale’ to ‘const string& {aka const std::__cxx11::basic_string<cha

../../../source/i18n/L10n.cpp:107:6: error: prototype for ‘bool L10n::ValidateLocale(const icu_61::Locale&) const’ does not match any in class ‘L10n’
 bool L10n::ValidateLocale(const icu::Locale& locale) const

../../../source/i18n/L10n.cpp:258:3: error: ‘CheckedArrayByteSink’ was not declared in this scope

../../../source/i18n/L10n.cpp:259:33: error: ‘sink’ was not declared in this scope

../../../source/i18n/L10n.cpp:389:8: error: ‘TimeZone’ does not name a type; did you mean ‘timezone’?

../../../source/i18n/L10n.cpp:392:2: error: ‘Calendar’ was not declared in this scope

../../../source/i18n/L10n.cpp:408:2: error: ‘NumberFormat’ was not declared in this scope

../../../source/i18n/L10n.cpp:545:85: error: ‘DateFormat’ does not name a type; did you mean ‘UDateFormat’?

and many more

Link to comment
Share on other sites

33 minutes ago, elexis said:

(and post all of them in case s0600204 doesn't already have icu61 to be able to fix all of occurrences)

At revision 21687.

unrelated

../../../source/third_party/encryption/pkcs5_pbkdf2.h:26:10: fatal error: sodium.h: No such file or directory

 

Link to comment
Share on other sites

  • s0600204 changed the title to [Resolved] icu 61

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...