mapkoc Posted March 31, 2018 Report Share Posted March 31, 2018 I had to add using namespace icu; to source/lib/external_libraries/icu.h with icu 61 or else class Locale is not found. I hate icu, each update breaks everything Quote Link to comment Share on other sites More sharing options...
vladislavbelov Posted March 31, 2018 Report Share Posted March 31, 2018 2 hours ago, mapkoc said: I had to add using namespace icu; to source/lib/external_libraries/icu.h with icu 61 or else class Locale is not found. I hate icu, each update breaks everything Which OS? Quote Link to comment Share on other sites More sharing options...
mapkoc Posted March 31, 2018 Author Report Share Posted March 31, 2018 Archlinux + all derivatives + Void I guess the packager always has to recompile because icu always breaks it but this time they must patch that file. Maybe icu60 also breaks the compile but i might have skipped that upgrade. Quote Link to comment Share on other sites More sharing options...
elexis Posted April 2, 2018 Report Share Posted April 2, 2018 @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())); Quote Link to comment Share on other sites More sharing options...
AudaciousTUX Posted April 2, 2018 Report Share Posted April 2, 2018 8 minutes ago, 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())); Quote Link to comment Share on other sites More sharing options...
Morrd Posted April 4, 2018 Report Share Posted April 4, 2018 binaries/system/pyrogenesis: error while loading shared libraries: libicui18n.so.60: cannot open shared object file: No such file or directory 4 me as well Quote Link to comment Share on other sites More sharing options...
mapkoc Posted April 6, 2018 Author Report Share Posted April 6, 2018 morrd: you just need to recompile game because you updated to icu6.0 Quote Link to comment Share on other sites More sharing options...
mapkoc Posted April 6, 2018 Author Report Share Posted April 6, 2018 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 1 Quote Link to comment Share on other sites More sharing options...
elexis Posted April 6, 2018 Report Share Posted April 6, 2018 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 2 Quote Link to comment Share on other sites More sharing options...
Itms Posted April 6, 2018 Report Share Posted April 6, 2018 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. 1 1 Quote Link to comment Share on other sites More sharing options...
vladislavbelov Posted April 6, 2018 Report Share Posted April 6, 2018 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. Quote Link to comment Share on other sites More sharing options...
mapkoc Posted April 6, 2018 Author Report Share Posted April 6, 2018 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 1 Quote Link to comment Share on other sites More sharing options...
mapkoc Posted April 6, 2018 Author Report Share Posted April 6, 2018 ... but having to recompile game each time icu upgrades minor (5 or 10 times per 0ad release) isn't pretty but I guess that's out of your control. Quote Link to comment Share on other sites More sharing options...
elexis Posted April 6, 2018 Report Share Posted April 6, 2018 Found some more icu types and replaced them. Please can someone with icu 6.1 try to compile using this patch and see if it succeeds (without adding a "using namespace icu;" anyhwere) and if it doesn't post the compile log? locale.patch 1 Quote Link to comment Share on other sites More sharing options...
mapkoc Posted April 6, 2018 Author Report Share Posted April 6, 2018 I can't before sunday, sorry Quote Link to comment Share on other sites More sharing options...
mapkoc Posted April 8, 2018 Author Report Share Posted April 8, 2018 What was the command to apply a patch? Quote Link to comment Share on other sites More sharing options...
Guest Posted April 8, 2018 Report Share Posted April 8, 2018 (edited) 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 April 8, 2018 by Guest Better formatting. Quote Link to comment Share on other sites More sharing options...
mapkoc Posted April 8, 2018 Author Report Share Posted April 8, 2018 Thanks (-_-). From command line: it was like patch somthing < D....patch Quote Link to comment Share on other sites More sharing options...
mapkoc Posted April 8, 2018 Author Report Share Posted April 8, 2018 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 Quote Link to comment Share on other sites More sharing options...
s0600204 Posted April 10, 2018 Report Share Posted April 10, 2018 @mapkoc, the patch on phabricator has been updated, could we ask you to try it again? Quote Link to comment Share on other sites More sharing options...
elexis Posted April 10, 2018 Report Share Posted April 10, 2018 On 4/8/2018 at 8:43 AM, mapkoc said: and many more (and post all of them in case s0600204 doesn't already have icu61 to be able to fix all of occurrences) Quote Link to comment Share on other sites More sharing options...
mapkoc Posted April 10, 2018 Author Report Share Posted April 10, 2018 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 Quote Link to comment Share on other sites More sharing options...
Stan` Posted April 10, 2018 Report Share Posted April 10, 2018 @mapkoc You need to install libsodium 1 1 Quote Link to comment Share on other sites More sharing options...
Itms Posted April 10, 2018 Report Share Posted April 10, 2018 7 minutes ago, mapkoc said: At revision 21687. unrelated ../../../source/third_party/encryption/pkcs5_pbkdf2.h:26:10: fatal error: sodium.h: No such file or directory https://trac.wildfiregames.com/wiki/BuildInstructions?action=diff&version=316&old_version=315 1 Quote Link to comment Share on other sites More sharing options...
mapkoc Posted April 10, 2018 Author Report Share Posted April 10, 2018 Thanks, it compiles now, no errors, @s0600204will merge soon Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.