id summary reporter owner description type status milestone component version severity resolution keywords cc 13300 boost stacktrace broken on solaris dkimura@… joseph.gauterin "Solaris `dladdr` doesn’t match function signature of most platforms nor the signature expected in boost stacktrace sources. Solaris: `int dladdr(void* addr, Dl_info* info);`[[br]] Darwin: `int dladdr(const void* addr, Dl_info* info);` This caused the following build errors on Solaris SPARC and Solaris X86. {{{ location_from_symbol.hpp, line 31: Error: Cannot cast away const or volatile. location_from_symbol.hpp, line 31: Error: Formal argument 1 of type void* in call to dladdr(void*, dl_info*) is being passed const void*. frame_unwind.ipp, line 87: Error: Cannot cast away const or volatile. frame_unwind.ipp, line 87: Error: Formal argument 1 of type void* in call to dladdr(void*, dl_info*) is being passed const void*const. }}} Following diff seems to fix this issue: {{{ diff -ru a/boost/stacktrace/detail/frame_unwind.ipp b/boost/stacktrace/detail/frame_unwind.ipp --- a/boost/stacktrace/detail/frame_unwind.ipp Sat Aug 19 16:49:49 2017 +++ b/boost/stacktrace/detail/frame_unwind.ipp Fri Sep 15 20:12:08 2017 @@ -84,7 +84,7 @@ std::string frame::name() const { #if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__) ::Dl_info dli; +#if defined(__sun) + const bool dl_ok = !!::dladdr(const_cast(addr_), &dli); +#else const bool dl_ok = !!::dladdr(addr_, &dli); +#endif if (dl_ok && dli.dli_sname) { return boost::core::demangle(dli.dli_sname); } diff -ru a/boost/stacktrace/detail/location_from_symbol.hpp b/boost/stacktrace/detail/location_from_symbol.hpp --- a/boost/stacktrace/detail/location_from_symbol.hpp Sat Aug 19 16:49:49 2017 +++ b/boost/stacktrace/detail/location_from_symbol.hpp Fri Sep 15 20:12:51 2017 @@ -28,7 +28,7 @@ explicit location_from_symbol(const void* addr) BOOST_NOEXCEPT : dli_() { +#if defined(__sun) + if (!::dladdr(const_cast(addr), &dli_)) { +#else if (!::dladdr(addr, &dli_)) { +#endif dli_.dli_fname = 0; } } }}}" Bugs closed To Be Determined swap Boost 1.65.0 Problem obsolete