Subject: [Boost-bugs] [Boost C++ Libraries] #6359: Intel Composer XE 2011 (12.0) fails to build Boost.Regex with ICU support
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-01-04 23:22:37
#6359: Intel Composer XE 2011 (12.0) fails to build Boost.Regex with ICU support
------------------------------------------------+---------------------------
Reporter: Brian Bassett <bbassett@â¦> | Owner: johnmaddock
Type: Bugs | Status: new
Milestone: To Be Determined | Component: regex
Version: Boost 1.48.0 | Severity: Regression
Keywords: intel-win-12.0 |
------------------------------------------------+---------------------------
=== Environment ===
* Intel C++ Composer XE 2011 Update 8 for Windows (version
2011.8.278/12.1.2.278)
* Boost 1.48.0
* ICU 4.8.1.1 (using binaries downloaded from http://download.icu-
project.org/files/icu4c/4.8.1.1/icu4c-4_8_1_1-Win32-msvc10.zip)
=== Reproduce Steps ===
1. Apply the attached patch (icubld.patch) in order to correctly have
Boost.Build use the correct names for the ICU DLLs with the Intel toolset.
2. Unpack the Win32 ICU binary distribution to a temporary directory
(i.e., `C:\tmp\icu`).
3. Start a command prompt with the Intel Composer XE 2011 environment
(i.e., Start Menu -> All Programs -> Intel Parallel Studio XE 2011 ->
Command Prompt -> Parallel Studio XE with Intel Compiler XE v12.1 Update 2
-> IA-32 Visual Studio 2010 mode)
4. Change directory into the Boost source tree and run:
{{{
b2 --build-type=complete toolset=intel-12.0 address-model=32
-sICU_PATH=C:\tmp\icu stage
}}}
5. Observe that building `libs/regex/src/icu.cpp` fails with the following
error:
{{{
.\boost/type_traits/is_convertible.hpp(264): error: a reference of type
"const boost::icu_regex_traits::char_type={UChar32={int32_t={signed int}}}
*&" (not const-qualified) cannot be initialized with a value of type
"ptrdiff_t={int} *"
BOOST_STATIC_CONSTANT(bool, value =
^
detected during:
instantiation of class
"boost::detail::is_convertible_basic_impl<From, To> [with
From=ptrdiff_t={int} *&, To=const
boost::icu_regex_traits::char_type={UChar32={int32_t={signed int}}} *&]"
at line 296
instantiation of class
"boost::detail::is_convertible_impl<From, To> [with From=ptrdiff_t={int}
*, To=const boost::icu_regex_traits::char_type={UChar32={int32_t={signed
int}}} *&]" at line 372
instantiation of class
"boost::detail::is_convertible_impl_dispatch<From, To> [with
From=ptrdiff_t={int} *, To=const
boost::icu_regex_traits::char_type={UChar32={int32_t={signed int}}} *&]"
at line 419
instantiation of class "boost::is_convertible<From, To> [with
From=ptrdiff_t={int} *, To=const
boost::icu_regex_traits::char_type={UChar32={int32_t={signed int}}} *&]"
at line 183 of ".\boost/regex/v4/regex_format.hpp"
instantiation of "int
boost::re_detail::basic_regex_formatter<OutputIterator, Results, traits,
ForwardIter>::toi(ForwardIter &, ForwardIter, int) [with
OutputIterator=boost::utf16_output_iterator<boost::re_detail::unicode_string_out_iterator>,
Results=boost::match_results<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>,
std::allocator<boost::sub_match<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>>>>,
traits=boost::regex_traits_wrapper<boost::icu_regex_traits>,
ForwardIter=ptrdiff_t={int} *]" at line 543 of
".\boost/regex/v4/regex_format.hpp"
instantiation of "void
boost::re_detail::basic_regex_formatter<OutputIterator, Results, traits,
ForwardIter>::format_escape() [with
OutputIterator=boost::utf16_output_iterator<boost::re_detail::unicode_string_out_iterator>,
Results=boost::match_results<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>,
std::allocator<boost::sub_match<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>>>>,
traits=boost::regex_traits_wrapper<boost::icu_regex_traits>,
ForwardIter=ptrdiff_t={int} *]" at line 229 of
".\boost/regex/v4/regex_format.hpp"
instantiation of "void
boost::re_detail::basic_regex_formatter<OutputIterator, Results, traits,
ForwardIter>::format_all() [with
OutputIterator=boost::utf16_output_iterator<boost::re_detail::unicode_string_out_iterator>,
Results=boost::match_results<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>,
std::allocator<boost::sub_match<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>>>>,
traits=boost::regex_traits_wrapper<boost::icu_regex_traits>,
ForwardIter=ptrdiff_t={int} *]" at line 207 of
".\boost/regex/v4/regex_format.hpp"
instantiation of "OutputIterator
boost::re_detail::basic_regex_formatter<OutputIterator, Results, traits,
ForwardIter>::format(ForwardIter, ForwardIter,
boost::regex_constants::match_flag_type={boost::regex_constants::match_flags={boost::regex_constants::_match_flags}})
[with
OutputIterator=boost::utf16_output_iterator<boost::re_detail::unicode_string_out_iterator>,
Results=boost::match_results<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>,
std::allocator<boost::sub_match<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>>>>,
traits=boost::regex_traits_wrapper<boost::icu_regex_traits>,
ForwardIter=ptrdiff_t={int} *]" at line 838 of
".\boost/regex/v4/regex_format.hpp"
instantiation of "OutputIterator
boost::re_detail::regex_format_imp(OutputIterator, const
boost::match_results<Iterator, Alloc> &, ForwardIter, ForwardIter,
boost::regex_constants::match_flag_type={boost::regex_constants::match_flags={boost::regex_constants::_match_flags}},
const traits &) [with
OutputIterator=boost::utf16_output_iterator<boost::re_detail::unicode_string_out_iterator>,
Iterator=boost::u16_to_u32_iterator<const UChar={__wchar_t} *, unsigned
int>,
Alloc=std::allocator<boost::sub_match<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>>>, ForwardIter=ptrdiff_t={int} *,
traits=boost::regex_traits_wrapper<boost::icu_regex_traits>]" at line 851
of ".\boost/regex/icu.hpp"
instantiation of "OutputIterator
boost::re_detail::do_regex_replace(OutputIterator, const std::pair<I1, I1>
&, const boost::u32regex &, const std::pair<I2, I2> &,
boost::regex_constants::match_flag_type={boost::regex_constants::match_flags={boost::regex_constants::_match_flags}})
[with
OutputIterator=boost::utf16_output_iterator<boost::re_detail::unicode_string_out_iterator>,
I1=boost::u16_to_u32_iterator<const UChar={__wchar_t} *, unsigned int>,
I2=boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>]" at line 1013 of
".\boost/regex/icu.hpp"
.\boost/regex/v4/regex_format.hpp(179): error: a reference of type "const
boost::icu_regex_traits::char_type={UChar32={int32_t={signed int}}} *&"
(not const-qualified) cannot be initialized with a value of type
"ptrdiff_t={int} *"
return m_traits.toi(i, j, base);
^
detected during:
instantiation of "int
boost::re_detail::basic_regex_formatter<OutputIterator, Results, traits,
ForwardIter>::toi(ForwardIter &, ForwardIter, int, const boost::mpl::true_
&) [with
OutputIterator=boost::utf16_output_iterator<boost::re_detail::unicode_string_out_iterator>,
Results=boost::match_results<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>,
std::allocator<boost::sub_match<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>>>>,
traits=boost::regex_traits_wrapper<boost::icu_regex_traits>,
ForwardIter=ptrdiff_t={int} *]" at line 184
instantiation of "int
boost::re_detail::basic_regex_formatter<OutputIterator, Results, traits,
ForwardIter>::toi(ForwardIter &, ForwardIter, int) [with
OutputIterator=boost::utf16_output_iterator<boost::re_detail::unicode_string_out_iterator>,
Results=boost::match_results<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>,
std::allocator<boost::sub_match<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>>>>,
traits=boost::regex_traits_wrapper<boost::icu_regex_traits>,
ForwardIter=ptrdiff_t={int} *]" at line 543
instantiation of "void
boost::re_detail::basic_regex_formatter<OutputIterator, Results, traits,
ForwardIter>::format_escape() [with
OutputIterator=boost::utf16_output_iterator<boost::re_detail::unicode_string_out_iterator>,
Results=boost::match_results<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>,
std::allocator<boost::sub_match<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>>>>,
traits=boost::regex_traits_wrapper<boost::icu_regex_traits>,
ForwardIter=ptrdiff_t={int} *]" at line 229
instantiation of "void
boost::re_detail::basic_regex_formatter<OutputIterator, Results, traits,
ForwardIter>::format_all() [with
OutputIterator=boost::utf16_output_iterator<boost::re_detail::unicode_string_out_iterator>,
Results=boost::match_results<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>,
std::allocator<boost::sub_match<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>>>>,
traits=boost::regex_traits_wrapper<boost::icu_regex_traits>,
ForwardIter=ptrdiff_t={int} *]" at line 207
instantiation of "OutputIterator
boost::re_detail::basic_regex_formatter<OutputIterator, Results, traits,
ForwardIter>::format(ForwardIter, ForwardIter,
boost::regex_constants::match_flag_type={boost::regex_constants::match_flags={boost::regex_constants::_match_flags}})
[with
OutputIterator=boost::utf16_output_iterator<boost::re_detail::unicode_string_out_iterator>,
Results=boost::match_results<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>,
std::allocator<boost::sub_match<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>>>>,
traits=boost::regex_traits_wrapper<boost::icu_regex_traits>,
ForwardIter=ptrdiff_t={int} *]" at line 838
instantiation of "OutputIterator
boost::re_detail::regex_format_imp(OutputIterator, const
boost::match_results<Iterator, Alloc> &, ForwardIter, ForwardIter,
boost::regex_constants::match_flag_type={boost::regex_constants::match_flags={boost::regex_constants::_match_flags}},
const traits &) [with
OutputIterator=boost::utf16_output_iterator<boost::re_detail::unicode_string_out_iterator>,
Iterator=boost::u16_to_u32_iterator<const UChar={__wchar_t} *, unsigned
int>,
Alloc=std::allocator<boost::sub_match<boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>>>, ForwardIter=ptrdiff_t={int} *,
traits=boost::regex_traits_wrapper<boost::icu_regex_traits>]" at line 851
of ".\boost/regex/icu.hpp"
instantiation of "OutputIterator
boost::re_detail::do_regex_replace(OutputIterator, const std::pair<I1, I1>
&, const boost::u32regex &, const std::pair<I2, I2> &,
boost::regex_constants::match_flag_type={boost::regex_constants::match_flags={boost::regex_constants::_match_flags}})
[with
OutputIterator=boost::utf16_output_iterator<boost::re_detail::unicode_string_out_iterator>,
I1=boost::u16_to_u32_iterator<const UChar={__wchar_t} *, unsigned int>,
I2=boost::u16_to_u32_iterator<const
UChar={__wchar_t} *, unsigned int>]" at line 1013 of
".\boost/regex/icu.hpp"
compilation aborted for libs\regex\build\..\src\icu.cpp (code 2)
}}}
Note that I've ommitted the remarks and warnings output by icl for
clarity.
=== Additional Comments ===
Note that I've had no problems building this file on Linux using the same
version of Intel's Linux compiler (2011.8.273), nor with earlier versions
(11.1) of Intel's Windows compiler. This compiler (intel-win-12.0) is the
only one I can trigger this compilation error. As such, I suspect this is
actually a compiler bug with Intel. If it turns out to be such, please
let me know and I can follow up with Intel directly.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6359> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:08 UTC