Boost C++ Libraries: Ticket #2244: build error in regex icu on AIX 5.3 with IBM Visual Age 9 https://svn.boost.org/trac10/ticket/2244 <p> I get the following compile error when compiling the regex library with the Visual Age 9 compiler on AIX 5.3:<br /> </p> <pre class="wiki">acpp.compile.c++ /home/mhufer/xgen-externals/boost/AIX-5.3/boost/bin.v2/libs/regex/build/vacpp/release/address-model-32/link-static/optimization-space/threading-multi/icu.o "./boost/regex/icu.hpp", line 359.17: 1540-0403 (S) "boost::make_u32regex(const UChar *, boost::regex_constants::syntax_option_type)" is already defined. "./boost/regex/icu.hpp", line 353.17: 1540-0425 (I) "make_u32regex" is defined on line 353 of "./boost/regex/icu.hpp". "./boost/regex/icu.hpp", line 459.13: 1540-0403 (S) "boost::u32regex_match(const wchar_t *, match_results&lt;const wchar_t *,std::allocator&lt;boost::sub_match&lt;const wchar_t *&gt; &gt; &gt; &amp;, const u32regex &amp;, match_flag_type)" is already defined. "./boost/regex/icu.hpp", line 451.13: 1540-0425 (I) "u32regex_match" is defined on line 451 of "./boost/regex/icu.hpp". "./boost/regex/icu.hpp", line 523.13: 1540-0403 (S) "boost::u32regex_match(const wchar_t *, const u32regex &amp;, match_flag_type)" is already defined. "./boost/regex/icu.hpp", line 515.13: 1540-0425 (I) "u32regex_match" is defined on line 515 of "./boost/regex/icu.hpp". "./boost/regex/icu.hpp", line 644.13: 1540-0403 (S) "boost::u32regex_search(const wchar_t *, match_results&lt;const wchar_t *,std::allocator&lt;boost::sub_match&lt;const wchar_t *&gt; &gt; &gt; &amp;, const u32regex &amp;, match_flag_type)" is already defined. "./boost/regex/icu.hpp", line 636.13: 1540-0425 (I) "u32regex_search" is defined on line 636 of "./boost/regex/icu.hpp". "./boost/regex/icu.hpp", line 705.13: 1540-0403 (S) "boost::u32regex_search(const wchar_t *, const u32regex &amp;, match_flag_type)" is already defined. "./boost/regex/icu.hpp", line 697.13: 1540-0425 (I) "u32regex_search" is defined on line 697 of "./boost/regex/icu.hpp". "./boost/regex/v4/u32regex_iterator.hpp", line 170.40: 1540-0403 (S) "boost::make_u32regex_iterator(const UChar *, const u32regex &amp;, regex_constants::match_flag_type)" is already defined. "./boost/regex/v4/u32regex_iterator.hpp", line 164.42: 1540-0425 (I) "make_u32regex_iterator" is defined on line 164 of "./boost/regex/v4/u32regex_iterator.hpp". "./boost/regex/v4/u32regex_token_iterator.hpp", line 286.46: 1540-0403 (S) "boost::make_u32regex_token_iterator(const UChar *, const u32regex &amp;, int, regex_constants::match_flag_type)" is already defined. "./boost/regex/v4/u32regex_token_iterator.hpp", line 280.48: 1540-0425 (I) "make_u32regex_token_iterator" is defined on line 280 of "./boost/regex/v4/u32regex_token_iterator.hpp". "./boost/regex/v4/u32regex_token_iterator.hpp", line 318.46: 1540-0403 (S) "template &lt;std::size_t N&gt; boost::make_u32regex_token_iterator(const UChar *, const u32regex &amp;, const int (&amp;)[N], regex_constants::match_flag_type)" is already defined. "./boost/regex/v4/u32regex_token_iterator.hpp", line 311.48: 1540-0425 (I) "make_u32regex_token_iterator" is defined on line 311 of "./boost/regex/v4/u32regex_token_iterator.hpp". "./boost/regex/v4/u32regex_token_iterator.hpp", line 348.46: 1540-0403 (S) "boost::make_u32regex_token_iterator(const UChar *, const u32regex &amp;, const vector&lt;int,std::allocator&lt;int&gt; &gt; &amp;, regex_constants::match_flag_type)" is already defined. "./boost/regex/v4/u32regex_token_iterator.hpp", line 342.48: 1540-0425 (I) "make_u32regex_token_iterator" is defined on line 342 of "./boost/regex/v4/u32regex_token_iterator.hpp". xlC_r -c -DBOOST_ALL_NO_LIB=1 -DBOOST_HAS_ICU=1 -DNDEBUG -qcpluscmt -O2 -qcompact -qfuncsect -qeh -qrtti -I"." -I"/home/mhufer/xgen-externals/install/AIX-5.3/icu-3.8.1/include" -o "/home/mhufer/xgen-externals/boost/AIX-5.3/boost/bin.v2/libs/regex/build/vacpp/release/address-model-32/link-static/optimization-space/threading-multi/icu.o" "libs/regex/src/../src/icu.cpp" ...failed vacpp.compile.c++ /home/mhufer/xgen-externals/boost/AIX-5.3/boost/bin.v2/libs/regex/build/vacpp/release/address-model-32/link-static/optimization-space/threading-multi/icu.o... </pre><p> It seems that for this compiler either BOOST_NO_WREGEX or U_WCHAR_IS_UTF16 must be defined in the regex/config.hpp. I opted for the latter and added the following lines in boost/config.hpp: </p> <pre class="wiki">#ifdef __IBMCPP__ # define U_WCHAR_IS_UTF16 #endif </pre><p> Note: I only use the V9 compiler and don't know whether defining this is necessary with older versions of the Visual Age compiler. So a "#if (<span class="underline">IBMCPP</span> &gt;= 900 )" might actually be better... </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2244 Trac 1.4.3 John Maddock Sat, 23 Aug 2008 11:44:25 GMT status changed https://svn.boost.org/trac10/ticket/2244#comment:1 https://svn.boost.org/trac10/ticket/2244#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Tentatively I hope I have this fixed: it's a question of picking up on ICU's configuration macros correctly, can you try applying this changeset: <a class="ext-link" href="http://svn.boost.org/trac/boost/changeset/48312/trunk"><span class="icon">​</span>http://svn.boost.org/trac/boost/changeset/48312/trunk</a> and let me know if it fixes things? </p> <p> Thanks, John Maddock. </p> Ticket John Maddock Fri, 29 Aug 2008 10:14:46 GMT cc set https://svn.boost.org/trac10/ticket/2244#comment:2 https://svn.boost.org/trac10/ticket/2244#comment:2 <ul> <li><strong>cc</strong> <span class="trac-author">michael.hufer@…</span> added </li> </ul> Ticket John Maddock Mon, 22 Dec 2008 12:12:43 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2244#comment:3 https://svn.boost.org/trac10/ticket/2244#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> No reply, so assume fixed. </p> Ticket