
On 2/28/2015 12:34 PM, John Maddock wrote:
On 28/02/2015 13:04, Peter Dimov wrote:
John Maddock wrote:
For the record, as of Solaris Studio 12.4 there are 4 options:
* C++03 mode, default std lib - a broken Rogue Wave version, this is the default. * C++03 mode, STLport. Requires -library=stlport4 * C++03 mode, Apache std lib. Requires -library=stdcxx4 * C++11 mode, GNU libstdc++, used when -std=c++11 is passed to the compiler.
According to the documentation to which Stephen linked, there should also be
5. C++03 mode, GNU libstdc++, used when -std=c++03 is passed to the compiler.
Ah, I missed that one. And I see the -library, -std and -compat command line options are all mutually incompatible and do slightly different things... just to keep us on our toes I guess!
I'll update the PR for the toolset accordingly.
I have tried to get Solaris Studio 12.4 to compile/link in -std=c++11 mode but have never succeeded. There was a change to the top-level Boost Jamroot which had to be made, and which Steve Watanabe made in the 'develop' super-project, which was removing the lines there which hard-coded the stdlib for sun: # The standard library Sun compilers use by default has no chance # of working with Boost. Override it. <toolset>sun:<stdlib>sun-stlport Even after removing this if I compiled using -std=c++11 the compile went OK but as soon as it tried to link it was obviously not finding the standard library, even though I had libstdc++ installed under Linux. I still received linking errors of:
sun.link ../../../bin.v2/libs/vmd/test/test_after_array_elem.test/sun-cxx11-12.4/debug/address-model-64/test_after_array_elem ../../../bin.v2/libs/vmd/test/test_after_array_elem.test/sun-cxx11-12.4/debug/address-model-64/test_after_array_elem.o: In function `__SLIP.INIT_A()': (.text+0x1b5): undefined reference to `std::ios_base::Init::Init()' ../../../bin.v2/libs/vmd/test/test_after_array_elem.test/sun-cxx11-12.4/debug/address-model-64/test_after_array_elem.o: In function `__SLIP.FINAL__A': test_after_array_elem.cpp:(.text+0x28f): undefined reference to `std::ios_base::Init::~Init()' ../../../bin.v2/libs/vmd/test/test_after_array_elem.test/sun-cxx11-12.4/debug/address-model-64/test_after_array_elem.o: In function `boost::report_errors()': /home/fceldiener/vcs/modular-boost/libs/vmd/test//../../../boost/detail/lightweight_test.hpp:173: undefined reference to `std::cerr' /home/fceldiener/vcs/modular-boost/libs/vmd/test//../../../boost/detail/lightweight_test.hpp:179: undefined reference to `std::cerr' /home/fceldiener/vcs/modular-boost/libs/vmd/test//../../../boost/detail/lightweight_test.hpp:179: undefined reference to `std::ostream::operator<<(int)' ../../../bin.v2/libs/vmd/test/test_after_array_elem.test/sun-cxx11-12.4/debug/address-model-64/test_after_array_elem.o: In function `boost::detail::error_impl(char const*, char const*, int, char const*)': /home/fceldiener/vcs/modular-boost/libs/vmd/test//../../../boost/detail/lightweight_test.hpp:117: undefined reference to `std::cerr' /home/fceldiener/vcs/modular-boost/libs/vmd/test//../../../boost/detail/lightweight_test.hpp:117: undefined reference to `std::ostream::operator<<(int)' ../../../bin.v2/libs/vmd/test/test_after_array_elem.test/sun-cxx11-12.4/debug/address-model-64/test_after_array_elem.o: In function `std::ostream & std::endl<char, std::char_traits<char> >(std::ostream &)': test_after_array_elem.cpp:(.text.std::ostream & std::endl<char, std::char_traits<char> >(std::ostream &)[std::ostream & std::endl<char, std::char_traits<char> >(std::ostream &)]+0x75): undefined reference to `std::ostream::put(char)' ../../../bin.v2/libs/vmd/test/test_after_array_elem.test/sun-cxx11-12.4/debug/address-model-64/test_after_array_elem.o: In function `std::ostream & std::operator<<<std::char_traits<char> >(std::ostream &, char const*)': /opt/oracle/solarisstudio12.4/lib/compilers/CC-gcc/include/c++/4.8.2/ostream:536: undefined reference to `std::ostream & std::__ostream_insert<char, std::char_traits<char> >(std::ostream &, char const*, long)' ../../../bin.v2/libs/vmd/test/test_after_array_elem.test/sun-cxx11-12.4/debug/address-model-64/test_after_array_elem.o: In function `std::ios::setstate(std::_Ios_Iostate)': test_after_array_elem.cpp:(.text.std::ios::setstate(std::_Ios_Iostate)[std::ios::setstate(std::_Ios_Iostate)]+0x7d): undefined reference to `std::ios::clear(std::_Ios_Iostate)' ../../../bin.v2/libs/vmd/test/test_after_array_elem.test/sun-cxx11-12.4/debug/address-model-64/test_after_array_elem.o: In function `std::ostream & std::flush<char, std::char_traits<char> >(std::ostream &)': test_after_array_elem.cpp:(.text.std::ostream & std::flush<char, std::char_traits<char> >(std::ostream &)[std::ostream & std::flush<char, std::char_traits<char> >(std::ostream &)]+0x37): undefined reference to `std::ostream::flush()' ../../../bin.v2/libs/vmd/test/test_after_array_elem.test/sun-cxx11-12.4/debug/address-model-64/test_after_array_elem.o: In function `std::ctype<char> const& std::__check_facet<std::ctype<char> >(std::ctype<char> const*)': /opt/oracle/solarisstudio12.4/lib/compilers/CC-gcc/include/c++/4.8.2/bits/basic_ios.h:49: undefined reference to `std::__throw_bad_cast()' ../../../bin.v2/libs/vmd/test/test_after_array_elem.test/sun-cxx11-12.4/debug/address-model-64/test_after_array_elem.o: In function `std::ctype<char>::widen(char) const': /opt/oracle/solarisstudio12.4/lib/compilers/CC-gcc/include/c++/4.8.2/bits/locale_facets.h:869: undefined reference to `std::ctype<char>::_M_widen_init() const'
"/opt/oracle/solarisstudio12.4/bin/CC" -g -m64 -KPIC -o "../../../bin.v2/libs/vmd/test/test_after_array_elem.test/sun-cxx11-12.4/debug/address-model-64/test_after_array_elem" "../../../bin.v2/libs/vmd/test/test_after_array_elem.test/sun-cxx11-12.4/debug/address-model-64/test_after_array_elem.o" -Bdynamic -lrt -Bstatic -Bdynamic
...failed sun.link ../../../bin.v2/libs/vmd/test/test_after_array_elem.test/sun-cxx11-12.4/debug/address-model-64/test_after_array_elem...
showing it could not find the standard library shared library as far as I can make out. Has anyone got this working with Sun ( now Oracle ) C++ on Linux ? Does this need anything else from Boost in order to tell the compiler which library to link with ? I have asked on the appropriate Oracle forum but I thought I would mention it here in case anyone has got this working.