Opened 19 years ago
Closed 18 years ago
#176 closed Support Requests (None)
Compile Smart_ptr library on Forte (Sun One)
Reported by: | nobody | Owned by: | Peter Dimov |
---|---|---|---|
Milestone: | Component: | smart_ptr | |
Version: | None | Severity: | |
Keywords: | Cc: |
Description
Please support Shared_ptr : Smart_ptr on Sun Solaris platform compiling with Forte (Sun One). I am unable to link to the checked_deleter method. Thank you, aaron.campbell@siemens.com
Change History (3)
comment:2 by , 19 years ago
Logged In: YES user_id=67343 This is due to a bug in the Solaris Forte 5.4 compiler. Sun has it as bug number 4878628. It has trouble properly instantiating run-time type info for template classes. One workaround is to explictly instantiate an instance of boost::checked_deleter<YourClass> in your source code: // YourClass.cpp #include <typeinfo> class YourClass; namespace { std::type_info const & ti = typeid( boost::checked_deleter<YourClass> ); } Another workaround is to use command-line flags to change how the C++ compiler generates template instances. One is to use -instances=global, to give template instances global linkages (I haven't tested this, it might result in duplicate symbols). Another is to use the undocument flags "-Qoption CC -xcomdat", which switches the compiler to a new, unsupported linkage mode for templates. This linkage mode will be the default when SunONE studio 8 is officially released. This option does work, and makes Sun CC's handling of templates much better, but is not compatible with some third party tools such as Purify. YMMV. If none of these options is acceptable to you, I urge you to contact your Sun support representative and demand a patch for bug 4878628 for Sun CC 5.4. It does not appear that Sun is willing to fix bugs for which there are code workarounds, unless customers insist. Hope this helps, Christopher
comment:3 by , 18 years ago
Status: | assigned → closed |
---|
Note:
See TracTickets
for help on using tickets.