Boost C++ Libraries: Ticket #828: Problem compiling regex with icu support on solaris https://svn.boost.org/trac10/ticket/828 <pre class="wiki">Hi, I'm trying to compile boost 1.33.1 with icu support on Solaris, with SUNpro compiler. The file ico.cpp doesn't compile. The compilation line is: I define ICU_PATH, and eventually the command line: % CC -c -O2 -mt -I../../../ -o sunpro/libboost_regex_mt/icu.o ../src/icu.cpp -DBOOST_HAS_ICU=1 -I$ICU_PATH/include "../../..//boost/iterator/iterator_facade.hpp", line 838: Error: Could not find a match for boost::iterator_core_access::equal&lt;boost::iterator_core_access::Facade1, boost::iterator_core_access::Facade2&gt;(const boost::u32_to_u16_iterator&lt;const int*, unsigned short&gt;, const boost::u32_to_u16_iterator&lt;const int*, unsigned short&gt;, boost::is_convertible&lt;boost::u32_to_u16_iterator&lt;const int*, unsigned short&gt;, boost::u32_to_u16_iterator&lt;const int*, unsigned short&gt;&gt;). It works with no problem with gcc (on Linux and on Solaris). Thanks, Moddy. ( moddyt@itemfield.com) </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/828 Trac 1.4.3 John Maddock Wed, 07 Feb 2007 11:52:19 GMT <link>https://svn.boost.org/trac10/ticket/828#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/828#comment:1</guid> <description> <pre class="wiki">Logged In: YES user_id=14804 Originator: NO Which sunpro version are you using? The ICU support depends upon Boost.Iterator: these tests are currently passing with Sunpro-5.8, but I suspect issues with earlier Sunpro versions. John. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>sf-robot</dc:creator> <pubDate>Thu, 22 Feb 2007 03:20:07 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/828#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/828#comment:2</guid> <description> <pre class="wiki">Logged In: YES user_id=1312539 Originator: NO This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>nobody</dc:creator> <pubDate>Mon, 26 Feb 2007 11:22:46 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/828#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/828#comment:3</guid> <description> <pre class="wiki">Logged In: NO I was using 5.5, so I moved to 5.8. I get different errors now: % CC -V CC: Sun C++ 5.8 Patch 121018-05 2006/08/30 % CC -c -O2 -I../../../ -I$ICU_PATH/include -DBOOST_HAS_ICU -o sunpro/libboost_regex/icu.o ../src/icu.cpp "../../..//boost/regex/v4/iterator_traits.hpp", line 34: Error: boost::re_detail::T is not a namespace or class name. "../../..//boost/regex/v4/match_results.hpp", line 52: Where: While specializing "boost::re_detail::regex_iterator_traits&lt;const unsigned short*&gt;". "../../..//boost/regex/v4/match_results.hpp", line 52: Where: Specialized in boost::match_results&lt;const unsigned short*, std::allocator&lt;boost::sub_match&lt;const unsigned short*&gt;&gt;&gt;. "../../..//boost/regex/icu.hpp", line 521: Where: Specialized in non-template code. "../../..//boost/regex/v4/iterator_traits.hpp", line 34: Error: No parameters provided for template. "../../..//boost/regex/v4/match_results.hpp", line 52: Where: While specializing "boost::re_detail::regex_iterator_traits&lt;const unsigned short*&gt;". "../../..//boost/regex/v4/match_results.hpp", line 52: Where: Specialized in boost::match_results&lt;const unsigned short*, std::allocator&lt;boost::sub_match&lt;const unsigned short*&gt;&gt;&gt;. "../../..//boost/regex/icu.hpp", line 521: Where: Specialized in non-template code. "../../..//boost/regex/v4/iterator_traits.hpp", line 35: Error: boost::re_detail::T is not a namespace or class name. "../../..//boost/regex/v4/match_results.hpp", line 52: Where: While specializing "boost::re_detail::regex_iterator_traits&lt;const unsigned short*&gt;". "../../..//boost/regex/v4/match_results.hpp", line 52: Where: Specialized in boost::match_results&lt;const unsigned short*, std::allocator&lt;boost::sub_match&lt;const unsigned short*&gt;&gt;&gt;. "../../..//boost/regex/icu.hpp", line 521: Where: Specialized in non-template code. "../../..//boost/regex/v4/iterator_traits.hpp", line 35: Error: value_type is not defined. "../../..//boost/regex/v4/match_results.hpp", line 52: Where: While specializing "boost::re_detail::regex_iterator_traits&lt;const unsigned short*&gt;". "../../..//boost/regex/v4/match_results.hpp", line 52: Where: Specialized in boost::match_results&lt;const unsigned short*, std::allocator&lt;boost::sub_match&lt;const unsigned short*&gt;&gt;&gt;. "../../..//boost/regex/icu.hpp", line 521: Where: Specialized in non-template code. "../../..//boost/regex/v4/iterator_traits.hpp", line 37: Error: boost::re_detail::T is not a namespace or class name. "../../..//boost/regex/v4/match_results.hpp", line 52: Where: While specializing "boost::re_detail::regex_iterator_traits&lt;const unsigned short*&gt;". "../../..//boost/regex/v4/match_results.hpp", line 52: Where: Specialized in boost::match_results&lt;const unsigned short*, std::allocator&lt;boost::sub_match&lt;const unsigned short*&gt;&gt;&gt;. "../../..//boost/regex/icu.hpp", line 521: Where: Specialized in non-template code. "../../..//boost/regex/v4/iterator_traits.hpp", line 37: Error: difference_type is not defined. "../../..//boost/regex/v4/match_results.hpp", line 52: Where: While specializing "boost::re_detail::regex_iterator_traits&lt;const unsigned short*&gt;". "../../..//boost/regex/v4/match_results.hpp", line 52: Where: Specialized in boost::match_results&lt;const unsigned short*, std::allocator&lt;boost::sub_match&lt;const unsigned short*&gt;&gt;&gt;. "../../..//boost/regex/icu.hpp", line 521: Where: Specialized in non-template code. "../../..//boost/regex/v4/iterator_traits.hpp", line 38: Error: boost::re_detail::T is not a namespace or class name. "../../..//boost/regex/v4/match_results.hpp", line 52: Where: While specializing "boost::re_detail::regex_iterator_traits&lt;const unsigned short*&gt;". "../../..//boost/regex/v4/match_results.hpp", line 52: Where: Specialized in boost::match_results&lt;const unsigned short*, std::allocator&lt;boost::sub_match&lt;const unsigned short*&gt;&gt;&gt;. "../../..//boost/regex/icu.hpp", line 521: Where: Specialized in non-template code. "../../..//boost/regex/v4/iterator_traits.hpp", line 38: Error: pointer is not defined. "../../..//boost/regex/v4/match_results.hpp", line 52: Where: While specializing "boost::re_detail::regex_iterator_traits&lt;const unsigned short*&gt;". "../../..//boost/regex/v4/match_results.hpp", line 52: Where: Specialized in boost::match_results&lt;const unsigned short*, std::allocator&lt;boost::sub_match&lt;const unsigned short*&gt;&gt;&gt;. "../../..//boost/regex/icu.hpp", line 521: Where: Specialized in non-template code. "../../..//boost/regex/v4/iterator_traits.hpp", line 39: Error: boost::re_detail::T is not a namespace or class name. "../../..//boost/regex/v4/match_results.hpp", line 52: Where: While specializing "boost::re_detail::regex_iterator_traits&lt;const unsigned short*&gt;". "../../..//boost/regex/v4/match_results.hpp", line 52: Where: Specialized in boost::match_results&lt;const unsigned short*, std::allocator&lt;boost::sub_match&lt;const unsigned short*&gt;&gt;&gt;. "../../..//boost/regex/icu.hpp", line 521: Where: Specialized in non-template code. "../../..//boost/regex/v4/iterator_traits.hpp", line 39: Error: reference is not defined. "../../..//boost/regex/v4/match_results.hpp", line 52: Where: While specializing "boost::re_detail::regex_iterator_traits&lt;const unsigned short*&gt;". "../../..//boost/regex/v4/match_results.hpp", line 52: Where: Specialized in boost::match_results&lt;const unsigned short*, std::allocator&lt;boost::sub_match&lt;const unsigned short*&gt;&gt;&gt;. "../../..//boost/regex/icu.hpp", line 521: Where: Specialized in non-template code. "../../..//boost/regex/v4/iterator_traits.hpp", line 34: Error: Redefining boost::iterator_category&lt;boost::Iterator&gt; after use in boost::re_detail::regex_iterator_traits&lt;const unsigned short*&gt;. "../../..//boost/regex/v4/match_results.hpp", line 52: Where: While specializing "boost::re_detail::regex_iterator_traits&lt;const unsigned short*&gt;". "../../..//boost/regex/v4/match_results.hpp", line 52: Where: Specialized in boost::match_results&lt;const unsigned short*, std::allocator&lt;boost::sub_match&lt;const unsigned short*&gt;&gt;&gt;. "../../..//boost/regex/icu.hpp", line 521: Where: Specialized in non-template code. 11 Error(s) detected. Thanks, Moddy. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Mon, 26 Feb 2007 17:26:31 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/828#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/828#comment:4</guid> <description> <pre class="wiki">Logged In: YES user_id=14804 Originator: NO OK, I think we're moving slowly forward :-) Can you comment out the #if logic in: #ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T template&lt;&gt; struct regex_iterator_traits&lt;unsigned short*&gt; : pointer_iterator_traits&lt;unsigned short&gt;{}; template&lt;&gt; struct regex_iterator_traits&lt;const unsigned short*&gt; : const_pointer_iterator_traits&lt;unsigned short&gt;{}; #endif So that those specializations are *always* defined and see what happens? I'm a little confused why that preprocessor branch is taken in the first place though: you might try building with the -library=stlport4 option to see if that improves things. You may also find that you need to update Boost.Config to match the latest compiler: try following the configuration instructions here: http://www.boost.org/libs/config/config.htm#config_script and see if that improves things. HTH, John. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>nobody</dc:creator> <pubDate>Tue, 27 Feb 2007 09:22:45 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/828#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/828#comment:5</guid> <description> <pre class="wiki">Logged In: NO I added these lines to icu.hpp, and it seems to solve the problem. I hope it was the right thing to do. namespace boost{ namespace re_detail{ //added by Itemfield template &lt;&gt; struct regex_iterator_traits &lt;UChar*&gt; : pointer_iterator_traits&lt;UChar&gt; {}; template &lt;&gt; struct regex_iterator_traits &lt;const UChar* &gt; : const_pointer_iterator_traits&lt;UChar&gt; {}; } } Thanks, Moddy. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Tue, 27 Feb 2007 09:27:32 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/828#comment:6 https://svn.boost.org/trac10/ticket/828#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> <pre class="wiki">Logged In: YES user_id=14804 Originator: NO Yes, that'll do the trick fine. I look into fixing this in cvs. John. </pre> Ticket