Error compiling Boost.Python library on Solaris

Hello all! I have a compilation error with Boost 1.34.0, Sun Workshop 11 compiler. Compiling Python library, I get "libs/python/src/object/class.cpp", line 458: Error: Overloading ambiguity between "boost::python::api::getattr<boost::python::scope, char[11], boost::python::str>(const boost::python::scope&, const char(&)[11], const boost::python::str&)" and "boost::python::api::getattr(const boost::python::api::object&, const char*, const boost::python::api::object&)". The code in question is object module_prefix() { return object( PyObject_IsInstance(scope().ptr(), upcast<PyObject>(&PyModule_Type)) ? object(scope().attr("__name__")) : api::getattr(scope(), "__module__", str()) <<===== ); } Of course, casting the string constant to (const char*) solves the problem, even though I realize it's not a boost-like solution. The rest of 1.34 compiles perfectly for me (thanks are in order - excellent job!). The exact version of the compiler is $ CC -V CC: Sun C++ 5.8 Patch 121017-07 2006/11/02 Sincerely, Arkadiy Belousov ----------------------------------------- ******************************************************************* * This e-mail is intended only for the addressee named above. As this e-mail may contain confidential or privileged information, if you are not the named addressee, you are not authorized to retain, read, copy or disseminate this message or any part of it. ******************************************************************* *

Would you be so kind as to show the exact bjam command you used? I've been trying to build 1.33.1 in my spare time for over a month now and can only get about 96% of the targets to build. Hopefully we'll be getting 1.34.0 soon, but it has to be approved through our admin/security people. In the meantime I would still like to get the current version to build since I'm a virgin Boost user and would like to play around with it to familiarize myself with some of the classes and libraries. The compiler version we are using is... $ CC -V CC: Sun C++ 5.8 Patch 121017-10 2007/02/21 -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Belousov, Arkadiy, GCM Sent: Thursday, May 31, 2007 3:17 PM To: boost-users@lists.boost.org Subject: [Boost-users] Error compiling Boost.Python library on Solaris Hello all! I have a compilation error with Boost 1.34.0, Sun Workshop 11 compiler. Compiling Python library, I get "libs/python/src/object/class.cpp", line 458: Error: Overloading ambiguity between "boost::python::api::getattr<boost::python::scope, char[11], boost::python::str>(const boost::python::scope&, const char(&)[11], const boost::python::str&)" and "boost::python::api::getattr(const boost::python::api::object&, const char*, const boost::python::api::object&)". The code in question is object module_prefix() { return object( PyObject_IsInstance(scope().ptr(), upcast<PyObject>(&PyModule_Type)) ? object(scope().attr("__name__")) : api::getattr(scope(), "__module__", str()) <<===== ); } Of course, casting the string constant to (const char*) solves the problem, even though I realize it's not a boost-like solution. The rest of 1.34 compiles perfectly for me (thanks are in order - excellent job!). The exact version of the compiler is $ CC -V CC: Sun C++ 5.8 Patch 121017-07 2006/11/02 Sincerely, Arkadiy Belousov ----------------------------------------- ******************************************************************* * This e-mail is intended only for the addressee named above. As this e-mail may contain confidential or privileged information, if you are not the named addressee, you are not authorized to retain, read, copy or disseminate this message or any part of it. ******************************************************************* * _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Belousov, Arkadiy, GCM
-
Kruk, Mark S