PDA

View Full Version : Python-LibTorrent Compile Error


br00tal
November 14th, 2006, 04:19 PM
Hello all,

I'm really excited about trying Deluge, but I can't get the libtorrent python wrapper to build. Here's the output I get when it fails:
/usr/lib/gcc/i486-slackware-linux/3.4.6/../../../../i486-slackware-linux/bin/ld: cannot find -lboost_thread
collect2: ld returned 1 exit status
error: command 'c++' failed with exit status 1
Not sure if this is a problem with Boost itself or what, but I can't seem to figure out the issue. Any help is greatly appreciated.

By the way, I am using the latest Boost.

Thanks.

zachtib
November 14th, 2006, 05:33 PM
I don't think we've ever built python-libtorrent on any version of gcc below 4.1, much less 3.x. I'm guessing its a g++ problem, do you have a copy off gcc4 installed?

br00tal
November 14th, 2006, 11:08 PM
No, but I could get one, I suppose. If that's the issue, then I guess it's an easy fix.

Quick question, though. Would it be hard to make the code GCC 3.x compatable? Lots of distros still use the 3.x tree. Just a thought.

Cheers!

zachtib
November 14th, 2006, 11:17 PM
I don't know, you'd have to ask Kripken (he should be waking up in about 2 hours, and will likely see this thread anyways) as he's the one that wrote python-libtorrent

kripkenstein
November 15th, 2006, 01:04 AM
Hello all,

I'm really excited about trying Deluge, but I can't get the libtorrent python wrapper to build. Here's the output I get when it fails:
/usr/lib/gcc/i486-slackware-linux/3.4.6/../../../../i486-slackware-linux/bin/ld: cannot find -lboost_thread
collect2: ld returned 1 exit status
error: command 'c++' failed with exit status 1
Not sure if this is a problem with Boost itself or what, but I can't seem to figure out the issue. Any help is greatly appreciated.

By the way, I am using the latest Boost.

Thanks.

It says "cannot find -lboost_thread", so perhaps the boost thread library is missing. Note that boost has several components, you may have only part of them installed. The list (which I hope is complete) appears in the INSTALL file:

Dependencies to compile (written as Ubuntu packages): python, libboost-filesystem1.33.1, libboost-date-time1.33.1, libboost-program-options1.33.1, libboost-regex1.33.1, libboost-thread1.33.1, libc6-dev, zlib1g-dev

armin76
November 15th, 2006, 06:07 AM
In Gentoo we had the same problem. In Gentoo the boost package includes all the libraries from boost. But to get this working, like libtorrent, you need boost compiled with threads support.

The current stable version of boost in Gentoo didn't include a symlink needed to compile libtorrent/python_libtorrent:
356259 0 lrwxrwxrwx 1 root root 37 Oct 24 20:16 /usr/lib/libboost_thread.so -> /usr/lib/libboost_thread-mt.so.1.33.1

br00tal
November 15th, 2006, 01:35 PM
Yup, that seems to have done the trick. Well, you now know that Deluge works on Slackware 11.0! All it was was a symlink issue. Thanks for the great app!

acconrad
March 4th, 2007, 06:30 AM
Hey I'm brand new to Ubuntu and I just installed Edgy and I want you guys to know that you do in fact need the -dev folders to install the python-libtorrent on Edgy, but even then I still get this error:


In file included from /usr/include/boost/multi_index/detail/node_type.hpp:23,
from /usr/include/boost/multi_index/detail/index_base.hpp:21,
from /usr/include/boost/multi_index/detail/base_type.hpp:21,
from /usr/include/boost/multi_index_container.hpp:32,
from storage.cpp:52:
/usr/include/boost/multi_index/detail/index_node_base.hpp:19:42: error: boost/serialization/access.hpp: No such file or directory
In file included from /usr/include/boost/multi_index/detail/index_base.hpp:27,
from /usr/include/boost/multi_index/detail/base_type.hpp:21,
from /usr/include/boost/multi_index_container.hpp:32,
from storage.cpp:52:
/usr/include/boost/multi_index/detail/index_loader.hpp:21:39: error: boost/serialization/nvp.hpp: No such file or directory
In file included from /usr/include/boost/multi_index_container.hpp:46,
from storage.cpp:52:
/usr/include/boost/multi_index/detail/archive_constructed.hpp:20:49: error: boost/serialization/serialization.hpp: No such file or directory
In file included from storage.cpp:52:
/usr/include/boost/multi_index_container.hpp:48:48: error: boost/serialization/split_member.hpp: No such file or directory
/usr/include/boost/multi_index/detail/index_node_base.hpp:45: error: ‘boost::serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_node_base.hpp:45: error: friend declaration does not name a class or function
/usr/include/boost/multi_index/detail/index_loader.hpp: In member function ‘void boost::multi_index::detail::index_loader<Node, FinalNode, Allocator>::add(Node*, Archive&, unsigned int)’:
/usr/include/boost/multi_index/detail/index_loader.hpp:49: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_loader.hpp: In member function ‘void boost::multi_index::detail::index_loader<Node, FinalNode, Allocator>::add_track(Node*, Archive&, unsigned int)’:
/usr/include/boost/multi_index/detail/index_loader.hpp:56: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_loader.hpp: In member function ‘FinalNode* boost::multi_index::detail::index_loader<Node, FinalNode, Allocator>::unchecked_load_node(Archive&) const’:
/usr/include/boost/multi_index/detail/index_loader.hpp:104: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_loader.hpp: In member function ‘FinalNode* boost::multi_index::detail::index_loader<Node, FinalNode, Allocator>::load_node(Archive&) const’:
/usr/include/boost/multi_index/detail/index_loader.hpp:112: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_saver.hpp: In member function ‘void boost::multi_index::detail::index_saver<Node, Allocator>::add(Node*, Archive&, unsigned int)’:
/usr/include/boost/multi_index/detail/index_saver.hpp:46: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_saver.hpp: In member function ‘void boost::multi_index::detail::index_saver<Node, Allocator>::add_track(Node*, Archive&, unsigned int)’:
/usr/include/boost/multi_index/detail/index_saver.hpp:53: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_saver.hpp: In static member function ‘static void boost::multi_index::detail::index_saver<Node, Allocator>::save_node(Node*, Archive&)’:
/usr/include/boost/multi_index/detail/index_saver.hpp:123: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/archive_constructed.hpp: In constructor ‘boost::multi_index::detail::archive_construc ted<T>::archive_constructed(Archive&, unsigned int)’:
/usr/include/boost/multi_index/detail/archive_constructed.hpp:36: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/archive_constructed.hpp: In constructor ‘boost::multi_index::detail::archive_construc ted<T>::archive_constructed(const char*, Archive&, unsigned int)’:
/usr/include/boost/multi_index/detail/archive_constructed.hpp:50: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/archive_constructed.hpp:52: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index_container.hpp: At global scope:
/usr/include/boost/multi_index_container.hpp:536: error: ‘boost::serialization’ has not been declared
/usr/include/boost/multi_index_container.hpp:536: error: friend declaration does not name a class or function
/usr/include/boost/multi_index_container.hpp:540: error: expected ‘;’ before ‘typedef’
/usr/include/boost/multi_index_container.hpp: In member function ‘void boost::multi_index::multi_index_container<Value, IndexSpecifierList, Allocator>::save(Archive&, unsigned int) const’:
/usr/include/boost/multi_index_container.hpp:547: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index_container.hpp:548: error: ‘index_saver_type’ was not declared in this scope
/usr/include/boost/multi_index_container.hpp:548: error: expected `;' before ‘sm’
/usr/include/boost/multi_index_container.hpp:551: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index_container.hpp:552: error: ‘sm’ was not declared in this scope
/usr/include/boost/multi_index_container.hpp:554: error: ‘sm’ was not declared in this scope
/usr/include/boost/multi_index_container.hpp: In member function ‘void boost::multi_index::multi_index_container<Value, IndexSpecifierList, Allocator>::load(Archive&, unsigned int)’:
/usr/include/boost/multi_index_container.hpp:567: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_iterator.hpp: At global scope:
/usr/include/boost/multi_index/detail/index_iterator.hpp:145: error: ‘boost::serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_iterator.hpp:145: error: friend declaration does not name a class or function
/usr/include/boost/multi_index/detail/index_iterator.hpp:149: error: expected ‘;’ before ‘typedef’
/usr/include/boost/multi_index/detail/index_iterator.hpp: In member function ‘void boost::multi_index::detail::index_iterator<Node>::save(Archive&, unsigned int) const’:
/usr/include/boost/multi_index/detail/index_iterator.hpp:155: error: ‘node_base_type’ was not declared in this scope
/usr/include/boost/multi_index/detail/index_iterator.hpp:155: error: ‘bnode’ was not declared in this scope
/usr/include/boost/multi_index/detail/index_iterator.hpp:156: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_iterator.hpp: In member function ‘void boost::multi_index::detail::index_iterator<Node>::load(Archive&, unsigned int)’:
/usr/include/boost/multi_index/detail/index_iterator.hpp:162: error: ‘node_base_type’ was not declared in this scope
/usr/include/boost/multi_index/detail/index_iterator.hpp:162: error: ‘bnode’ was not declared in this scope
/usr/include/boost/multi_index/detail/index_iterator.hpp:163: error: ‘serialization’ has not been declared
./include/libtorrent/asio/ip/address_v6.hpp: In member function ‘asio::ip::address_v4 asio::ip::address_v6::to_v4() const’:
./include/libtorrent/asio/ip/address_v6.hpp:172: warning: missing braces around initializer for ‘unsigned char [4]’
./include/libtorrent/asio/ip/address_v6.hpp: In static member function ‘static asio::ip::address_v6 asio::ip::address_v6::v4_mapped(const asio::ip::address_v4&)’:
./include/libtorrent/asio/ip/address_v6.hpp:329: warning: missing braces around initializer for ‘unsigned char [16]’
./include/libtorrent/asio/ip/address_v6.hpp: In static member function ‘static asio::ip::address_v6 asio::ip::address_v6::v4_compatible(const asio::ip::address_v4&)’:
./include/libtorrent/asio/ip/address_v6.hpp:338: warning: missing braces around initializer for ‘unsigned char [16]’
error: command 'gcc' failed with exit status 1


any ideas?

Choad
March 4th, 2007, 09:22 AM
sudo apt-get install libboost-*

zachtib
March 4th, 2007, 12:01 PM
Hey I'm brand new to Ubuntu and I just installed Edgy and I want you guys to know that you do in fact need the -dev folders to install the python-libtorrent on Edgy, but even then I still get this error:


In file included from /usr/include/boost/multi_index/detail/node_type.hpp:23,
from /usr/include/boost/multi_index/detail/index_base.hpp:21,
from /usr/include/boost/multi_index/detail/base_type.hpp:21,
from /usr/include/boost/multi_index_container.hpp:32,
from storage.cpp:52:
/usr/include/boost/multi_index/detail/index_node_base.hpp:19:42: error: boost/serialization/access.hpp: No such file or directory
In file included from /usr/include/boost/multi_index/detail/index_base.hpp:27,
from /usr/include/boost/multi_index/detail/base_type.hpp:21,
from /usr/include/boost/multi_index_container.hpp:32,
from storage.cpp:52:
/usr/include/boost/multi_index/detail/index_loader.hpp:21:39: error: boost/serialization/nvp.hpp: No such file or directory
In file included from /usr/include/boost/multi_index_container.hpp:46,
from storage.cpp:52:
/usr/include/boost/multi_index/detail/archive_constructed.hpp:20:49: error: boost/serialization/serialization.hpp: No such file or directory
In file included from storage.cpp:52:
/usr/include/boost/multi_index_container.hpp:48:48: error: boost/serialization/split_member.hpp: No such file or directory
/usr/include/boost/multi_index/detail/index_node_base.hpp:45: error: ‘boost::serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_node_base.hpp:45: error: friend declaration does not name a class or function
/usr/include/boost/multi_index/detail/index_loader.hpp: In member function ‘void boost::multi_index::detail::index_loader<Node, FinalNode, Allocator>::add(Node*, Archive&, unsigned int)’:
/usr/include/boost/multi_index/detail/index_loader.hpp:49: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_loader.hpp: In member function ‘void boost::multi_index::detail::index_loader<Node, FinalNode, Allocator>::add_track(Node*, Archive&, unsigned int)’:
/usr/include/boost/multi_index/detail/index_loader.hpp:56: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_loader.hpp: In member function ‘FinalNode* boost::multi_index::detail::index_loader<Node, FinalNode, Allocator>::unchecked_load_node(Archive&) const’:
/usr/include/boost/multi_index/detail/index_loader.hpp:104: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_loader.hpp: In member function ‘FinalNode* boost::multi_index::detail::index_loader<Node, FinalNode, Allocator>::load_node(Archive&) const’:
/usr/include/boost/multi_index/detail/index_loader.hpp:112: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_saver.hpp: In member function ‘void boost::multi_index::detail::index_saver<Node, Allocator>::add(Node*, Archive&, unsigned int)’:
/usr/include/boost/multi_index/detail/index_saver.hpp:46: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_saver.hpp: In member function ‘void boost::multi_index::detail::index_saver<Node, Allocator>::add_track(Node*, Archive&, unsigned int)’:
/usr/include/boost/multi_index/detail/index_saver.hpp:53: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_saver.hpp: In static member function ‘static void boost::multi_index::detail::index_saver<Node, Allocator>::save_node(Node*, Archive&)’:
/usr/include/boost/multi_index/detail/index_saver.hpp:123: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/archive_constructed.hpp: In constructor ‘boost::multi_index::detail::archive_constructed<T>::archive_constructed(Archive&, unsigned int)’:
/usr/include/boost/multi_index/detail/archive_constructed.hpp:36: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/archive_constructed.hpp: In constructor ‘boost::multi_index::detail::archive_constructed<T>::archive_constructed(const char*, Archive&, unsigned int)’:
/usr/include/boost/multi_index/detail/archive_constructed.hpp:50: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/archive_constructed.hpp:52: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index_container.hpp: At global scope:
/usr/include/boost/multi_index_container.hpp:536: error: ‘boost::serialization’ has not been declared
/usr/include/boost/multi_index_container.hpp:536: error: friend declaration does not name a class or function
/usr/include/boost/multi_index_container.hpp:540: error: expected ‘;’ before ‘typedef’
/usr/include/boost/multi_index_container.hpp: In member function ‘void boost::multi_index::multi_index_container<Value, IndexSpecifierList, Allocator>::save(Archive&, unsigned int) const’:
/usr/include/boost/multi_index_container.hpp:547: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index_container.hpp:548: error: ‘index_saver_type’ was not declared in this scope
/usr/include/boost/multi_index_container.hpp:548: error: expected `;' before ‘sm’
/usr/include/boost/multi_index_container.hpp:551: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index_container.hpp:552: error: ‘sm’ was not declared in this scope
/usr/include/boost/multi_index_container.hpp:554: error: ‘sm’ was not declared in this scope
/usr/include/boost/multi_index_container.hpp: In member function ‘void boost::multi_index::multi_index_container<Value, IndexSpecifierList, Allocator>::load(Archive&, unsigned int)’:
/usr/include/boost/multi_index_container.hpp:567: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_iterator.hpp: At global scope:
/usr/include/boost/multi_index/detail/index_iterator.hpp:145: error: ‘boost::serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_iterator.hpp:145: error: friend declaration does not name a class or function
/usr/include/boost/multi_index/detail/index_iterator.hpp:149: error: expected ‘;’ before ‘typedef’
/usr/include/boost/multi_index/detail/index_iterator.hpp: In member function ‘void boost::multi_index::detail::index_iterator<Node>::save(Archive&, unsigned int) const’:
/usr/include/boost/multi_index/detail/index_iterator.hpp:155: error: ‘node_base_type’ was not declared in this scope
/usr/include/boost/multi_index/detail/index_iterator.hpp:155: error: ‘bnode’ was not declared in this scope
/usr/include/boost/multi_index/detail/index_iterator.hpp:156: error: ‘serialization’ has not been declared
/usr/include/boost/multi_index/detail/index_iterator.hpp: In member function ‘void boost::multi_index::detail::index_iterator<Node>::load(Archive&, unsigned int)’:
/usr/include/boost/multi_index/detail/index_iterator.hpp:162: error: ‘node_base_type’ was not declared in this scope
/usr/include/boost/multi_index/detail/index_iterator.hpp:162: error: ‘bnode’ was not declared in this scope
/usr/include/boost/multi_index/detail/index_iterator.hpp:163: error: ‘serialization’ has not been declared
./include/libtorrent/asio/ip/address_v6.hpp: In member function ‘asio::ip::address_v4 asio::ip::address_v6::to_v4() const’:
./include/libtorrent/asio/ip/address_v6.hpp:172: warning: missing braces around initializer for ‘unsigned char [4]’
./include/libtorrent/asio/ip/address_v6.hpp: In static member function ‘static asio::ip::address_v6 asio::ip::address_v6::v4_mapped(const asio::ip::address_v4&)’:
./include/libtorrent/asio/ip/address_v6.hpp:329: warning: missing braces around initializer for ‘unsigned char [16]’
./include/libtorrent/asio/ip/address_v6.hpp: In static member function ‘static asio::ip::address_v6 asio::ip::address_v6::v4_compatible(const asio::ip::address_v4&)’:
./include/libtorrent/asio/ip/address_v6.hpp:338: warning: missing braces around initializer for ‘unsigned char [16]’
error: command 'gcc' failed with exit status 1


any ideas?

you need boost libs, but you might as well install deluge-torrent from the edgy backports repo

acconrad
March 5th, 2007, 03:04 AM
i do have all of the boost libs (and their -dev counterparts) specified in the INSTALL file...where is this backports repo?