Compiling on Ubuntu 22 results in a several errors, see below. Notably:
std::auto_ptr use 'std::unique_ptr'
ISO C++17 does not allow dynamic exception specifications
These are not complicated fixes I don't think. :-)
CXX libtorrent/src/web_connection_base.o
In file included from /usr/include/boost/bind.hpp:30,
from libtorrent/src/web_connection_base.cpp:37:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
36 | BOOST_PRAGMA_MESSAGE(
| ^~~~~~~~
In file included from ./libtorrent/include/libtorrent/peer_connection.hpp:66,
from ./libtorrent/include/libtorrent/web_connection_base.hpp:60,
from libtorrent/src/web_connection_base.cpp:40:
./libtorrent/include/libtorrent/alert.hpp:116:30: warning: ‘template class std::auto_ptr’ is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
116 | virtual std::auto_ptr clone() const = 0;
| ^~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/boost/config/no_tr1/memory.hpp:21,
from /usr/include/boost/get_pointer.hpp:14,
from /usr/include/boost/bind/mem_fn.hpp:25,
from /usr/include/boost/mem_fn.hpp:22,
from /usr/include/boost/bind/bind.hpp:26,
from /usr/include/boost/bind.hpp:29,
from libtorrent/src/web_connection_base.cpp:37:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~
In file included from ./libtorrent/include/libtorrent/peer_connection.hpp:66,
from ./libtorrent/include/libtorrent/web_connection_base.hpp:60,
from libtorrent/src/web_connection_base.cpp:40:
./libtorrent/include/libtorrent/alert.hpp:136:36: warning: ‘template class std::auto_ptr’ is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
136 | const std::autoptr& alert, const Handler& handler
| ^~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/boost/config/no_tr1/memory.hpp:21,
from /usr/include/boost/get_pointer.hpp:14,
from /usr/include/boost/bind/mem_fn.hpp:25,
from /usr/include/boost/mem_fn.hpp:22,
from /usr/include/boost/bind/bind.hpp:26,
from /usr/include/boost/bind.hpp:29,
from libtorrent/src/web_connection_base.cpp:37:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~
In file included from ./libtorrent/include/libtorrent/peer_connection.hpp:66,
from ./libtorrent/include/libtorrent/web_connection_base.hpp:60,
from libtorrent/src/web_connection_base.cpp:40:
./libtorrent/include/libtorrent/alert.hpp:150:36: warning: ‘template class std::auto_ptr’ is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
150 | const std::auto_ptr&
| ^~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/boost/config/no_tr1/memory.hpp:21,
from /usr/include/boost/get_pointer.hpp:14,
from /usr/include/boost/bind/mem_fn.hpp:25,
from /usr/include/boost/mem_fn.hpp:22,
from /usr/include/boost/bind/bind.hpp:26,
from /usr/include/boost/bind.hpp:29,
from libtorrent/src/web_connection_base.cpp:37:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~
In file included from ./libtorrent/include/libtorrent/peer_connection.hpp:66,
from ./libtorrent/include/libtorrent/web_connection_base.hpp:60,
from libtorrent/src/web_connection_base.cpp:40:
./libtorrent/include/libtorrent/alert.hpp:165:41: warning: ‘template class std::auto_ptr’ is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
165 | handle_alert(const std::autoptr& alert
| ^~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/boost/config/no_tr1/memory.hpp:21,
from /usr/include/boost/get_pointer.hpp:14,
from /usr/include/boost/bind/mem_fn.hpp:25,
from /usr/include/boost/mem_fn.hpp:22,
from /usr/include/boost/bind/bind.hpp:26,
from /usr/include/boost/bind.hpp:29,
from libtorrent/src/web_connection_base.cpp:37:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class auto_ptr;
| ^~~~
In file included from ./libtorrent/include/libtorrent/storage.hpp:36,
from ./libtorrent/include/libtorrent/web_connection_base.hpp:63,
from libtorrent/src/web_connection_base.cpp:40:
./libtorrent/include/../../src/leveldb.h:20:49: error: ISO C++17 does not allow dynamic exception specifications
20 | void HandleError(const leveldb::Status &status) throw(leveldb_error);
| ^~~~~
./libtorrent/include/../../src/leveldb.h:86:72: error: ISO C++17 does not allow dynamic exception specifications
86 | template<typename K, typename V> bool Read(const K& key, V& value) throw(leveldb_error) {
| ^~~~~
./libtorrent/include/../../src/leveldb.h:109:99: error: ISO C++17 does not allow dynamic exception specifications
109 | template<typename K, typename V> bool Write(const K& key, const V& value, bool fSync = false) throw(leveldb_error) {
| ^~~~~
./libtorrent/include/../../src/leveldb.h:115:52: error: ISO C++17 does not allow dynamic exception specifications
115 | template bool Exists(const K& key) throw(leveldb_error) {
| ^~~~~
./libtorrent/include/../../src/leveldb.h:132:71: error: ISO C++17 does not allow dynamic exception specifications
132 | template bool Erase(const K& key, bool fSync = false) throw(leveldb_error) {
| ^~~~~
./libtorrent/include/../../src/leveldb.h:138:63: error: ISO C++17 does not allow dynamic exception specifications
138 | bool WriteBatch(CLevelDBBatch &batch, bool fSync = false) throw(leveldb_error);
| ^~~~~
./libtorrent/include/../../src/leveldb.h:145:17: error: ISO C++17 does not allow dynamic exception specifications
145 | bool Sync() throw(leveldberror) {
| ^~~~~
In file included from ./libtorrent/include/libtorrent/aux/session_impl.hpp:83,
from ./libtorrent/include/libtorrent/torrent.hpp:75,
from ./libtorrent/include/libtorrent/web_connection_base.hpp:67,
from libtorrent/src/web_connection_base.cpp:40:
./libtorrent/include/libtorrent/alert_manager.hpp:60:22: warning: ‘template class std::auto_ptr’ is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
60 | std::auto_ptr get();
| ^~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/boost/config/no_tr1/memory.hpp:21,
from /usr/include/boost/get_pointer.hpp:14,
from /usr/include/boost/bind/mem_fn.hpp:25,
from /usr/include/boost/mem_fn.hpp:22,
from /usr/include/boost/bind/bind.hpp:26,
from /usr/include/boost/bind.hpp:29,
from libtorrent/src/web_connection_base.cpp:37:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class autoptr;
| ^~~~
In file included from ./libtorrent/include/libtorrent/aux/session_impl.hpp:83,
from ./libtorrent/include/libtorrent/torrent.hpp:75,
from ./libtorrent/include/libtorrent/web_connection_base.hpp:67,
from libtorrent/src/web_connection_base.cpp:40:
./libtorrent/include/libtorrent/alert_manager.hpp:89:70: warning: ‘template class std::auto_ptr’ is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
89 | void set_dispatch_function(boost::function<void(std::auto_ptr)> const&);
| ^~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/boost/config/no_tr1/memory.hpp:21,
from /usr/include/boost/get_pointer.hpp:14,
from /usr/include/boost/bind/mem_fn.hpp:25,
from /usr/include/boost/mem_fn.hpp:22,
from /usr/include/boost/bind/bind.hpp:26,
from /usr/include/boost/bind.hpp:29,
from libtorrent/src/web_connection_base.cpp:37:
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
57 | template class autoptr;
| ^~~~
In file included from ./libtorrent/include/libtorrent/aux/session_impl.hpp:83,
from ./libtorrent/include/libtorrent/torrent.hpp:75,
from ./libtorrent/include/libtorrent/web_connection_base.hpp:67,
from libtorrent/src/web_connection_base.cpp:40:
./libtorrent/include/libtorrent/alert_manager.hpp:96:37: warning: ‘template class std::auto_ptr’ is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
96 | void post_impl(std::autoptr& alert, mutex::scoped_lock& l);
| ^~~~
In file included from /usr/include/c++/11/memory:76,
from /usr/include/boost/config/no_tr1/memory.hpp:21,
from /usr/include/boost/get_pointer.hpp:14,
from /usr/include/boost/bind/mem_fn.hpp:25,
from /usr/include/boost/mem_fn.hpp:22,
from /usr/include/boost/bind/bind.hpp:26,
from /usr/include/boost/bind.hpp:29,
from libtorrent/src/web_connection_base.cpp:37:
...snip....
/usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here
make: *** [Makefile:1541: libtorrent/src/web_connection_base.o] Error 1
Compiling on Ubuntu 22 results in a several errors, see below. Notably:
These are not complicated fixes I don't think. :-)
CXX libtorrent/src/web_connection_base.o In file included from /usr/include/boost/bind.hpp:30, from libtorrent/src/web_connection_base.cpp:37: /usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’ 36 | BOOST_PRAGMA_MESSAGE( | ^ class std::auto_ptr’ is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
116 | virtual std::auto_ptr clone() const = 0;
| ^ class auto_ptr;
| ^ class std::auto_ptr’ is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
136 | const std::autoptr& alert , const Handler& handler
| ^ class auto_ptr;
| ^ class std::auto_ptr’ is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
150 | const std::auto_ptr&
| ^ class auto_ptr;
| ^ class std::auto_ptr’ is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
165 | handle_alert(const std::autoptr& alert
| ^ class auto_ptr;
| ^ bool Exists(const K& key) throw(leveldb_error) {
| ^~~~~
./libtorrent/include/../../src/leveldb.h:132:71: error: ISO C++17 does not allow dynamic exception specifications
132 | template bool Erase(const K& key, bool fSync = false) throw(leveldb_error) {
| ^~~~~
./libtorrent/include/../../src/leveldb.h:138:63: error: ISO C++17 does not allow dynamic exception specifications
138 | bool WriteBatch(CLevelDBBatch &batch, bool fSync = false) throw(leveldb_error);
| ^~~~~
./libtorrent/include/../../src/leveldb.h:145:17: error: ISO C++17 does not allow dynamic exception specifications
145 | bool Sync() throw(leveldberror) {
| ^~~~~
In file included from ./libtorrent/include/libtorrent/aux/session_impl.hpp:83,
from ./libtorrent/include/libtorrent/torrent.hpp:75,
from ./libtorrent/include/libtorrent/web_connection_base.hpp:67,
from libtorrent/src/web_connection_base.cpp:40:
./libtorrent/include/libtorrent/alert_manager.hpp:60:22: warning: ‘template class std::auto_ptr’ is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
60 | std::auto_ptr get();
| ^ class autoptr;
| ^ class std::auto_ptr’ is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
89 | void set_dispatch_function(boost::function<void(std::auto_ptr)> const&);
| ^ class autoptr;
| ^ class std::auto_ptr’ is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
96 | void post_impl(std::autoptr& alert , mutex::scoped_lock& l);
| ^
~~~~~~~ In file included from ./libtorrent/include/libtorrent/peer_connection.hpp:66, from ./libtorrent/include/libtorrent/web_connection_base.hpp:60, from libtorrent/src/web_connection_base.cpp:40: ./libtorrent/include/libtorrent/alert.hpp:116:30: warning: ‘template~~~ In file included from /usr/include/c++/11/memory:76, from /usr/include/boost/config/no_tr1/memory.hpp:21, from /usr/include/boost/get_pointer.hpp:14, from /usr/include/boost/bind/mem_fn.hpp:25, from /usr/include/boost/mem_fn.hpp:22, from /usr/include/boost/bind/bind.hpp:26, from /usr/include/boost/bind.hpp:29, from libtorrent/src/web_connection_base.cpp:37: /usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here 57 | template~~~ In file included from ./libtorrent/include/libtorrent/peer_connection.hpp:66, from ./libtorrent/include/libtorrent/web_connection_base.hpp:60, from libtorrent/src/web_connection_base.cpp:40: ./libtorrent/include/libtorrent/alert.hpp:136:36: warning: ‘template~~~ In file included from /usr/include/c++/11/memory:76, from /usr/include/boost/config/no_tr1/memory.hpp:21, from /usr/include/boost/get_pointer.hpp:14, from /usr/include/boost/bind/mem_fn.hpp:25, from /usr/include/boost/mem_fn.hpp:22, from /usr/include/boost/bind/bind.hpp:26, from /usr/include/boost/bind.hpp:29, from libtorrent/src/web_connection_base.cpp:37: /usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here 57 | template~~~ In file included from ./libtorrent/include/libtorrent/peer_connection.hpp:66, from ./libtorrent/include/libtorrent/web_connection_base.hpp:60, from libtorrent/src/web_connection_base.cpp:40: ./libtorrent/include/libtorrent/alert.hpp:150:36: warning: ‘template~~~ In file included from /usr/include/c++/11/memory:76, from /usr/include/boost/config/no_tr1/memory.hpp:21, from /usr/include/boost/get_pointer.hpp:14, from /usr/include/boost/bind/mem_fn.hpp:25, from /usr/include/boost/mem_fn.hpp:22, from /usr/include/boost/bind/bind.hpp:26, from /usr/include/boost/bind.hpp:29, from libtorrent/src/web_connection_base.cpp:37: /usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here 57 | template~~~ In file included from ./libtorrent/include/libtorrent/peer_connection.hpp:66, from ./libtorrent/include/libtorrent/web_connection_base.hpp:60, from libtorrent/src/web_connection_base.cpp:40: ./libtorrent/include/libtorrent/alert.hpp:165:41: warning: ‘template~~~ In file included from /usr/include/c++/11/memory:76, from /usr/include/boost/config/no_tr1/memory.hpp:21, from /usr/include/boost/get_pointer.hpp:14, from /usr/include/boost/bind/mem_fn.hpp:25, from /usr/include/boost/mem_fn.hpp:22, from /usr/include/boost/bind/bind.hpp:26, from /usr/include/boost/bind.hpp:29, from libtorrent/src/web_connection_base.cpp:37: /usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here 57 | template~~~ In file included from ./libtorrent/include/libtorrent/storage.hpp:36, from ./libtorrent/include/libtorrent/web_connection_base.hpp:63, from libtorrent/src/web_connection_base.cpp:40: ./libtorrent/include/../../src/leveldb.h:20:49: error: ISO C++17 does not allow dynamic exception specifications 20 | void HandleError(const leveldb::Status &status) throw(leveldb_error); | ^~~~~ ./libtorrent/include/../../src/leveldb.h:86:72: error: ISO C++17 does not allow dynamic exception specifications 86 | template<typename K, typename V> bool Read(const K& key, V& value) throw(leveldb_error) { | ^~~~~ ./libtorrent/include/../../src/leveldb.h:109:99: error: ISO C++17 does not allow dynamic exception specifications 109 | template<typename K, typename V> bool Write(const K& key, const V& value, bool fSync = false) throw(leveldb_error) { | ^~~~~ ./libtorrent/include/../../src/leveldb.h:115:52: error: ISO C++17 does not allow dynamic exception specifications 115 | template~~~ In file included from /usr/include/c++/11/memory:76, from /usr/include/boost/config/no_tr1/memory.hpp:21, from /usr/include/boost/get_pointer.hpp:14, from /usr/include/boost/bind/mem_fn.hpp:25, from /usr/include/boost/mem_fn.hpp:22, from /usr/include/boost/bind/bind.hpp:26, from /usr/include/boost/bind.hpp:29, from libtorrent/src/web_connection_base.cpp:37: /usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here 57 | template~~~ In file included from ./libtorrent/include/libtorrent/aux/session_impl.hpp:83, from ./libtorrent/include/libtorrent/torrent.hpp:75, from ./libtorrent/include/libtorrent/web_connection_base.hpp:67, from libtorrent/src/web_connection_base.cpp:40: ./libtorrent/include/libtorrent/alert_manager.hpp:89:70: warning: ‘template~~~ In file included from /usr/include/c++/11/memory:76, from /usr/include/boost/config/no_tr1/memory.hpp:21, from /usr/include/boost/get_pointer.hpp:14, from /usr/include/boost/bind/mem_fn.hpp:25, from /usr/include/boost/mem_fn.hpp:22, from /usr/include/boost/bind/bind.hpp:26, from /usr/include/boost/bind.hpp:29, from libtorrent/src/web_connection_base.cpp:37: /usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here 57 | template~~~ In file included from ./libtorrent/include/libtorrent/aux/session_impl.hpp:83, from ./libtorrent/include/libtorrent/torrent.hpp:75, from ./libtorrent/include/libtorrent/web_connection_base.hpp:67, from libtorrent/src/web_connection_base.cpp:40: ./libtorrent/include/libtorrent/alert_manager.hpp:96:37: warning: ‘template~~~ In file included from /usr/include/c++/11/memory:76, from /usr/include/boost/config/no_tr1/memory.hpp:21, from /usr/include/boost/get_pointer.hpp:14, from /usr/include/boost/bind/mem_fn.hpp:25, from /usr/include/boost/mem_fn.hpp:22, from /usr/include/boost/bind/bind.hpp:26, from /usr/include/boost/bind.hpp:29, from libtorrent/src/web_connection_base.cpp:37: ...snip.... /usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here make: *** [Makefile:1541: libtorrent/src/web_connection_base.o] Error 1