-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[boost] Optionally use ICU #1274
Conversation
All green in build 1 (
|
recipes/boost/all/conanfile.py
Outdated
@@ -55,7 +55,8 @@ class BoostConan(ConanFile): | |||
"segmented_stacks": [True, False], | |||
"debug_level": [i for i in range(1, 14)], | |||
"pch": [True, False], | |||
"extra_b2_flags": "ANY" # custom b2 flags | |||
"extra_b2_flags": "ANY", # custom b2 flags | |||
"icu": [True, False], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are ICU and iconv mutually exclusive options?
if yes, maybe it's better to design option like locale_backend: ["ICU", "iconv", None]
this might be helpful: https://github.com/bincrafters/conan-boost_base/blob/testing/2.0.0/conanfile.py
/cc @grafikrobot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that iconv
is more like a fallback, you can choose to use icu
, but if it is not available, the package will use iconv
. It also follows the same option pattern as zlib
, zstd
,... if you activate it then more requires will be added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they are different. zlib, zstd, bzip2 backends can be used together, while iconv and ICU seems to be mutually exclusive.
recipes/boost/all/conanfile.py
Outdated
@@ -133,6 +139,8 @@ def requirements(self): | |||
self.requires("xz_utils/5.2.4") | |||
if self.options.zstd: | |||
self.requires("zstd/1.4.3") | |||
if self.options.icu: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably we have to check for without_locale
option to avoid unneeded dependency in this case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ICU applies to regex
and locale
, not sure if you can apply ICU to one without the other. I really don't know how the transitivity and dependencies among Boost libraries work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, seems to be check should be like:
if not without_locale or not without_regex:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a check. 'locale' doesn't compile without a i18n backend, but 'regex' does 🤷
Anyway, I really dislike one change in this PR: def configure(self):
if self.options.icu:
tools.check_min_cppstd(self, "11") This doesn't belong to the Boost recipe but to the ICU one. Nevertheless we know we cannot add it to ICU because C3i won't generate any package... we need to prioritize this kind of thing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move the cppstd check into ICU
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the c++11 check that belongs to the ICU library.
All green in build 2 (
|
An unexpected error happened and has been reported. Help is on its way! 🏇 |
All green in build 4 (
|
@@ -81,6 +82,7 @@ class BoostConan(ConanFile): | |||
"debug_level": 2, | |||
'pch': True, | |||
'extra_b2_flags': 'None', | |||
"i18n_backend": 'iconv', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, so recipe has no dependency on libiconv, but it still builds with iconv backend?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, in Mac/Linux probably it is quite common to have it installed, boost
finds it and uses it. If not found, and this could be a problem, boost
won't build locale
but it will succeed (there is a message in the output, nothing else).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have doubts... might be not very reliable or reproducible, then sometimes locale won't be built, but sometimes will be. maybe you can add an actual reference to libiconv recipe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SSE4 but... will you approve this PR? 😄 |
flags.append("boost.locale.iconv=on boost.locale.icu=off") | ||
else: | ||
flags.append("boost.locale.iconv=off boost.locale.icu=off") | ||
flags.append("--disable-icu --disable-iconvv") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just looking at this recipe, and noticed this. Is --disable-iconvv
a typo? Should it be --disable-iconv
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, seems so, feel free to submit PR with fix
None of these packages have ICU enabled, so they tell me nothing. On Windows, boost's build system expects ICU to have both release and debug libraries. I don't believe that this package of boost will use the package of ICU on Windows. |
@pepsiman you will have to set the option |
@danimtb Yes, but it doesn't build from sources on Windows. |
please open an issue with the build log so we are able to check, thank you |
Specify library name and version: boost/all
Add option
icu
to use ICU library (regex and locale)Closes #1270
This PR requires #1273 before, so ICU 66.1 is available.
conan-center hook activated.