Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jan 2010 17:11:53 -0800
From:      Chuck Swiger <cswiger@mac.com>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        freebsd-ports@FreeBSD.org
Subject:   Re: Need help from someone with boost fu + RELENG_6
Message-ID:  <C94450B8-E96D-46D0-94F5-5C89DF537DB3@mac.com>
In-Reply-To: <4B54CFEF.3050006@FreeBSD.org>
References:  <4B54CFEF.3050006@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C94450B8-E96D-46D0-94F5-5C89DF537DB3>