Building Boost 1.34.1 on Solaris 10/SPARC

According to http://blogs.sun.com/sga/entry/boost_mini_howto "upcoming Boost 1.34 works with Sun C++ well out of the box" - can anyone confirm this? I'm trying to upgrade from Boost 1.33.1 to Boost 1.34.1 on Solaris 10/SPARC but ran into problems with both CC (Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25) and g++ 3.4.6. With "./bjam --toolset=sun stage" I see this error (among others): sun.compile.c++ bin.v2/libs/wave/build/sun/debug/threading-multi/instantiate_cpp_exprgrammar.o "./boost/wave/util/flex_string.hpp", line 529: Error: Formal argument 2 of type void* in call to std::allocator<char>::allocate(unsigned, void*) is being passed const char*. "./boost/wave/util/flex_string.hpp", line 558: Where: While instantiating "boost::wave::util::AllocatorStringStorage<char, std::allocator<char>>::Alloc(unsigned, const void*)". "./boost/wave/util/flex_string.hpp", line 558: Where: Instantiated from static boost::wave::grammars::expression_grammar_gen<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char>>, char*>>>>>::evaluate(const std::list<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char>>, char*>>>>, boost::fast_pool_allocator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char>>, char*>>>>, boost::default_user_allocator_new_delete, boost::details::pool::null_mutex, 32>>::const_iterator&, const std::list<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char>>, char*>>>>, boost::fast_pool_allocator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char>>, char*>>>>, boost::default_user_allocator_new_delete, boost::details::pool::null_mutex, 32>>::const_iterator&, const boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char>>, char*>>>&, bool, boost::wave::grammars::value_error&). "libs/wave/src/instantiate_cpp_exprgrammar.cpp", line 39: Where: Instantiated from non-template code. 1 Error(s) detected. With "./bjam --toolset=gcc stage" I see that error (again among others): gcc.link.dll bin.v2/libs/thread/build/gcc-3.4.6/debug/threading-multi/libboost_thread-gcc34-mt-d-1_34_1.so.1.34.1 /usr/ccs/bin/ld: illegal option -- start-group /usr/ccs/bin/ld: illegal option -- end-group ... collect2: ld returned 1 exit status As the Boost Mini HOWTO mentions that Boost 1.34 should work out of the box I wonder if I'm the only one having a problem on Solaris? As the Getting Started document mentions that "only very recent versions are known to work well with Boost" - is Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25 maybe not recent enough? :) Boris

Hello Boris, On 10/3/07, Boris <boriss@web.de> wrote:
According to http://blogs.sun.com/sga/entry/boost_mini_howto "upcoming Boost 1.34 works with Sun C++ well out of the box" - can anyone confirm this? I'm trying to upgrade from Boost 1.33.1 to Boost 1.34.1 on Solaris 10/SPARC but ran into problems with both CC (Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25) and g++ 3.4.6.
With "./bjam --toolset=sun stage" I see this error (among others):
I think you need to compile with STLPort instead of Sun's default STL implementation for boost. Check out Simon's newer postings regarding boost on Solaris http://blogs.sun.com/sga/category/Boost . I was able to compile boost 1.34.1 on Solaris 10 (sparc) using Sun C++ 5.9 as well as gcc 3.4.6. 1. For Sun C++ 5.9: I can't remember if I had to change any jam configs but here are the bjam command-line options I've used: /path/to/boost-build/bin/bjam --build-dir=/path/to/build.suncc12 \ --stagedir=/path/to/stage.suncc12 \ toolset=sun stdlib=sun-stlport -j2 -d2 stage 2. For gcc 3.4.6: You need to create a user-config.jam file with the following settings (adjust the compiler flags to your arch, $BOOST_SRC_ROOT is the directory were the extracted boost source resides): cat > $BOOST_SRC_ROOT/user-config.jam <<EOF using gcc : 3.4.6 : /usr/local/bin/g++ : <cflags>"-mcpu=v9 -m64" <cxxflags>"-mcpu=v9 -m64" <linkflags>"-mcpu=v9 -m64" <linker-type>sun ; EOF And then build with: /path/to/boost-build/bin/bjam --build-dir=/path/to/build.gcc \ --stagedir=/path/to/stage.gcc \ --user-config=$BOOST_SRC_ROOT/user-config.jam \ toolset=gcc -d2 -j2 stage Good luck. Regards, Sebastian

On Wed, 03 Oct 2007 17:34:59 +0300, Sebastian Hauer <sebastian.hauer@gmail.com> wrote:
[...]I think you need to compile with STLPort instead of Sun's default STL implementation for boost. Check out Simon's newer postings regarding boost on Solaris http://blogs.sun.com/sga/category/Boost .
I was able to compile boost 1.34.1 on Solaris 10 (sparc) using Sun C++ 5.9 as well as gcc 3.4.6.
1. For Sun C++ 5.9: I can't remember if I had to change any jam configs but here are the bjam command-line options I've used:
/path/to/boost-build/bin/bjam --build-dir=/path/to/build.suncc12 \ --stagedir=/path/to/stage.suncc12 \ toolset=sun stdlib=sun-stlport -j2 -d2 stage
Thanks for your help! I could build Boost 1.34.1 successfully - stdlib=sun-stlport did the trick. After reading a comparison between libCstd and libstlport at http://developers.sun.com/solaris/articles/cmp_stlport_libCstd.html it might be a good idea for Boost to automatically choose stlport when Boost is built on Solaris? Boris

Boris wrote:
Thanks for your help! I could build Boost 1.34.1 successfully - stdlib=sun-stlport did the trick. After reading a comparison between libCstd and libstlport at http://developers.sun.com/solaris/articles/cmp_stlport_libCstd.html it might be a good idea for Boost to automatically choose stlport when Boost is built on Solaris?
Yes, but the better sulution is for sun to do it in their compiler. They can let users select the old library as an option if they need the backword compatibillity. As it seems to me Sun has no plans to get that library fixed, so why keep it as default? -- Bjørn

On Thu, 04 Oct 2007 07:41:44 +0300, Bjørn Roald <bjorn@4roald.org> wrote:
Boris wrote:
Thanks for your help! I could build Boost 1.34.1 successfully - stdlib=sun-stlport did the trick. After reading a comparison between libCstd and libstlport at http://developers.sun.com/solaris/articles/cmp_stlport_libCstd.html it might be a good idea for Boost to automatically choose stlport when Boost is built on Solaris?
Yes, but the better sulution is for sun to do it in their compiler. They can let users select the old library as an option if they need the backword compatibillity. As it seems to me Sun has no plans to get that library fixed, so why keep it as default?
If there are no plans for Sun to fix their old library no Boost user on Solaris will be able to build Boost out of the box as you always have to select stlport explicitly? That doesn't mean I don't sympathize with your idea of switching the default library on Solaris - but I don't think that it's going to happen as backward compatibility seems to be really important to them. Boris
participants (3)
-
Bjørn Roald
-
Boris
-
Sebastian Hauer