Need help from someone with boost fu + RELENG_6

Chuck Swiger cswiger at mac.com
Tue Jan 19 01:11:55 UTC 2010


Hi, Doug--

On Jan 18, 2010, at 1:17 PM, Doug Barton wrote:
> However I apparently inherited some build problems on 6-stable that I
> don't understand, and since I don't have a 6-stable system available I
> cannot test fixes for. The problems appear to be boost-related, both
> more or less look like this:
> 
> In file included from /usr/local/include/boost/thread/future.hpp:12,
>                 from /usr/local/include/boost/thread.hpp:24,
>                 from ../include/libtorrent/storage.hpp:45,
>                 from ../include/libtorrent/peer_connection.hpp:63,
>                 from peer_connection.cpp:41:
> /usr/local/include/boost/exception_ptr.hpp:43: error: looser throw
> specifier for `virtual boost::exception_ptr::~exception_ptr()'
> /usr/local/include/boost/exception/detail/exception_ptr_base.hpp:27:
> error:   overriding `virtual
> boost::exception_detail::exception_ptr_base::~exception_ptr_base() throw ()'
[ ... ]

Whether this constitutes a legitimate problem or something that the compiler should figure out seems to be arguable-- evidently this sort of error is highly dependent upon the compiler version.  The following changes seems to allow net-p2p/rblibtorrent to build successfully under 6-STABLE:

--- /usr/local/include/boost/exception/detail/exception_ptr_base.hpp~	2010-01-18 18:20:52.000000000 -0500
+++ /usr/local/include/boost/exception/detail/exception_ptr_base.hpp	2010-01-18 19:03:46.000000000 -0500
@@ -23,7 +23,7 @@
                         protected:
 
                         virtual
-                        ~exception_ptr_base() throw()
+                        ~exception_ptr_base()
                             {
                             }
                         };

--- libtorrent-0.13/src/storage.cpp~	2010-01-18 17:11:00.000000000 -0500
+++ libtorrent-0.13/src/storage.cpp	2010-01-18 19:19:05.000000000 -0500
@@ -378,7 +378,7 @@
 
 		size_type read_impl(char* buf, int slot, int offset, int size, bool fill_zero);
 
-		~storage()
+		~storage() throw ()
 		{ m_files.release(this); }
 
 		boost::intrusive_ptr<torrent_info const> m_info;

Eww.  It's entirely possible that adding a USE_GCC=4.2+ line to Boost or these ports might provide a cleaner solution.  Or consult someone who knows C++ better than I...

Regards,
-- 
-Chuck



More information about the freebsd-ports mailing list