boostorg/locale

Default for iconv on Solaris?

Closed this issue · 3 comments

@artyom-beilis What is the intended semantic behind

locale/build/Jamfile.v2

Lines 212 to 214 in f44b3bb

if <boost.locale.iconv>on in $(properties)
|| ! <boost.locale.iconv> in $(properties:G)
&& ! <target-os>solaris in $(properties)

Should that mean either:

  • Never use Iconv on Solaris ?
  • Default to not using Iconv on Solaris ?

There are two variants of iconv on Solaris:

  1. One the comes with OS it is buggy
  2. There is GNU iconv it is fine

So I try to avoid using iconv on Solaris in general unless user explicitly asks for.

So the logic is following I use iconv under two conditions

  1. User explicitly asked for iconv (maybe because he wants to use GNU iconv)
  2. We are not on Solaris - we use it unless the user set iconv explicitly to off.

So ICU uconv API is preferred on Solaris.

Ok then the condition may be wrong and always disable Iconv on Solaris due to undefined operator precedence in B2.
I included parens and a comment to explain this at 58c0660#diff-322788b77c72dedcc9b4a12bf0233ceb8451b4a6baa6d851173ecd5320ac14aeR205-R208

Ohhhh, I see, didn't know that precedence is undefined.

I hope Boost will switch to CMake finally after 10 years of discussion (wishful thinking)