sun CC with date_time compile error

Hello, i have lots of code using boost(1.33.1). It is a really great API. However, now I have to compile my code on a Solaris SPARC. I must use the Sun Compiler CC: Sun C++ 5.8 Patch 121017-10 2007/02/21. Using this compiler my code cannot be compiled. So, I've tested one of the date_time example(Simple Timezone) provided by your website: http://www.boost.org/doc/html/date_time/examples.html#date_time.examples .simple_time_zone I get the following error: "/export/home/venninj/opt/boost/1.33.1/include/boost-1_33_1/boost/date_t ime/posix_time/posix_time_io.hpp", line 189: Error: Could not find a match for std::has_facet<std::Facet>(std::locale) needed in boost::posix_time::operator<<<char, std::char_traits<char>>(std::ostream &, const boost::posix_time::time_duration&). "/export/home/venninj/opt/boost/1.33.1/include/boost-1_33_1/boost/date_t ime/posix_time/posix_time_io.hpp", line 190: Error: Could not find a match for std::use_facet<std::Facet>(std::locale) needed in boost::posix_time::operator<<<char, std::char_traits<char>>(std::ostream &, const boost::posix_time::time_duration&). "/export/home/venninj/opt/boost/1.33.1/include/boost-1_33_1/boost/date_t ime/posix_time/posix_time_io.hpp", line 190: Error: Could not find a match for std::use_facet<std::Facet>(std::locale) needed in boost::posix_time::operator<<<char, std::char_traits<char>>(std::ostream &, const boost::posix_time::time_duration&). "/export/home/venninj/opt/boost/1.33.1/include/boost-1_33_1/boost/date_t ime/posix_time/posix_time_io.hpp", line 50: Error: Could not find a match for std::has_facet<std::Facet>(std::locale) needed in boost::posix_time::operator<<<char, std::char_traits<char>>(std::ostream &, const boost::posix_time::ptime&). "/export/home/venninj/opt/boost/1.33.1/include/boost-1_33_1/boost/date_t ime/posix_time/posix_time_io.hpp", line 51: Error: Could not find a match for std::use_facet<std::Facet>(std::locale) needed in boost::posix_time::operator<<<char, std::char_traits<char>>(std::ostream &, const boost::posix_time::ptime&). "/export/home/venninj/opt/boost/1.33.1/include/boost-1_33_1/boost/date_t ime/posix_time/posix_time_io.hpp", line 51: Error: Could not find a match for std::use_facet<std::Facet>(std::locale) needed in boost::posix_time::operator<<<char, std::char_traits<char>>(std::ostream &, const boost::posix_time::ptime&). Do you know how theses errors can be fixed? Thank you, Joel Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. Societe Generale Asset Management et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. Decouvrez l'offre et les services de Societe Generale Asset Management sur le site www.sgam.fr ******** This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither Societe Generale Asset Management nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. Find out more about Societe Generale Asset Management's proposal on www.sgam.com

VENNIN Joel wrote:
Hello, i have lots of code using boost(1.33.1). It is a really great API. However, now I have to compile my code on a Solaris SPARC. I must use the Sun Compiler CC: Sun C++ 5.8 Patch 121017-10 2007/02/21.
Using this compiler my code cannot be compiled. So, I've tested one of the date_time example(Simple Timezone) provided by your website: http://www.boost.org/doc/html/date_time/examples.html#date_time.examples .simple_time_zone
I get the following error:
....snip...
Do you know how theses errors can be fixed?
I think it's pretty much hopeless with that compiler. You really need to upgrade to 5.10 which passes all the test: http://engineering.meta-comm.com/boost-regression/CVS-RC_1_34_0/developer/da... Of course your other option is to use gcc on Solaris. If you can't change compilers, I think you're in trouble...sorry. Jeff

Jeff Garland wrote:
VENNIN Joel wrote:
Hello, i have lots of code using boost(1.33.1). It is a really great API. However, now I have to compile my code on a Solaris SPARC. I must use the Sun Compiler CC: Sun C++ 5.8 Patch 121017-10 2007/02/21.
Oh dang...ignore my last email -- got my compiler results crossed. The OSL4-V2 test uses Sun Studio 11 (Sun C++ 5.8 Patch 121017-03 2006/07/19) which is an earlier version. This version basically compiles all the tests. It fails some of the regressions, but that mostly has to do with 'standard formatting' issues. Thus, I'd say, things should at least compile. Of course, this is testing the 1.34 release candidate, so it's possible that there's some change made along the way to help the Solaris compiler -- there's nothing in the release notes, but someone else could have made an update in config or something ,and it's been too long since 1.33 to be 100% sure something else isn't required. Just looking at the error, though, this might be simpler problem. Add in this header after local_time.hpp: #include "boost/date_time/local_time/local_time_io.hpp" If that doesn't work then we might have to look at the 1.34 RC differences. Jeff
participants (2)
-
Jeff Garland
-
VENNIN Joel