id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 6851,64bit build error on Solaris with gcc 4.4.5 and ICU,alasdairrr@…,Artyom Beilis,"Hi, When doing a 64bit build of boost on Solaris with gcc 4.4.5, we're getting the following error: {{{ ""g++"" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthreads -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_LOCALE_NO_POSIX_BACKEND=1 -DBOOST_LOCALE_NO_WINAPI_BACKEND=1 -DBOOST_LOCALE_WITH_ICU=1 -DBOOST_THREAD_NO_LIB=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_LIB=1 -DNDEBUG -I""."" -c -o ""bin.v2/libs/locale/build/gcc-4.4.5/release/address-model-64/link-static/threading-multi/icu/formatter.o"" ""libs/locale/src/icu/formatter.cpp"" libs/locale/src/icu/formatter.cpp: In member function 'virtual std::basic_string<_CharT, std::char_traits<_CharT>, std::allocator<_CharT> > boost::locale::impl_icu::number_format::format(boost::int64_t, size_t&) const': libs/locale/src/icu/formatter.cpp:61: error: call of overloaded 'format(boost::int64_t&, icu_49::UnicodeString&)' is ambiguous /ec/include/unicode/numfmt.h:317: note: candidates are: icu_49::UnicodeString& icu_49::NumberFormat::format(double, icu_49::UnicodeString&) const /ec/include/unicode/numfmt.h:330: note: icu_49::UnicodeString& icu_49::NumberFormat::format(int32_t, icu_49::UnicodeString&) const /ec/include/unicode/numfmt.h:343: note: icu_49::UnicodeString& icu_49::NumberFormat::format(int64_t, icu_49::UnicodeString&) const }}} This is doing a 64bit build with ICU version v49.1.1 (although the same issue happens with 4.8.1.1). There are multiple definitions of of the formatter:format method, as can be seen here: http://svn.boost.org/svn/boost/trunk/libs/locale/src/icu/formatter.cpp This is the 32bit function definition with the call to icu_fmt: {{{ virtual string_type format(int32_t value,size_t &code_points) const icu_fmt_->format(::int32_t(value),tmp); }}} However the 64bit one doesn't make a cast: {{{ virtual string_type format(int64_t value,size_t &code_points) const icu_fmt_->format(value,tmp); }}} Fixing this with the following patch fixes the build: {{{ diff -ruN boost_1_49_0.orig/libs/locale/src/icu/formatter.cpp boost_1_49_0/libs/locale/src/icu/formatter.cpp --- boost_1_49_0.orig/libs/locale/src/icu/formatter.cpp 2011-07-12 14:57:36.000000000 +0100 +++ boost_1_49_0/libs/locale/src/icu/formatter.cpp 2012-05-01 14:27:54.000000000 +0100 @@ -58,7 +58,7 @@ virtual string_type format(int64_t value,size_t &code_points) const { icu::UnicodeString tmp; - icu_fmt_->format(value,tmp); + icu_fmt_->format(::int64_t(value),tmp); code_points=tmp.countChar32(); return cvt_.std(tmp); } }}}",Bugs,closed,To Be Determined,locale,Boost 1.49.0,Problem,fixed,,