Sorry to hear you've got your system borked
The error in log states no setuptools package - maybe it's named python3-setuptools on ubuntu, but not sure and not time to look it up now.
I have not much experience building libtorrent on linux honestly, since my distro is very good at offering the latest release quickly as binary package, and so the little I messed with it once, did though work and I made a script for it, made from inspiration online, as a project I was persuing to build static libtorrent without dependency of boost or anything, so self-contained and just needing glibc and python, but I commented the openssl part out til later(and removed $LIBTORRENT_CRYPTO from libtorrent build options, which enables openssl linking when used), as to save some time and just check if worked first, which it did(though newer gcc's uses very much ram reportedly, and my 4GB wasen't enough building this, even building in TTY without Xorg open in my very minimal non-DE system, with practically nothing running in background(using just 109Mib RAM - psmem.py states 80Mib used), and I needed make temporary swap file of few gigs, which i've never needed before when building stuff, though not done that often and usually smaller projects:
Code: Select all
custom_flags_set() {
CXXFLAGS="-std=c++14 -fPIC"
CPPFLAGS="-I$include_dir"
LDFLAGS="-L$lib_dir"
}
install_dir="${HOME}/Downloads/libtorrent-python"
rm -rf $install_dir
mkdir $install_dir
cd $install_dir
mkdir openssl && curl https://www.openssl.org/source/openssl-1.1.1j.tar.gz | bsdtar xf - -C openssl --strip-components 1
mkdir boost && curl -L https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.tar.gz | bsdtar xf - -C boost --strip-components 1
git clone https://github.com/arvidn/libtorrent -b RC_1_2
include_dir="$install_dir/include"
lib_dir="$install_dir/lib"
LD_LIBRARY_PATH="-L$lib_dir"
PKG_CONFIG_PATH="-L$lib_dir/pkgconfig"
LIBTORRENT_CRYPTO="crypto=openssl openssl-lib=$install_dir/openssl openssl-include=$install_dir/openssl/include"
echo -e "using gcc : : : <cxxflags>-std=c++14 ; using python : 3.9 : /usr/bin/python3.9 : /usr/include/python3.9 : /usr/lib/python3.9 ;" > "$HOME/user-config.jam"
#custom_flags_set
#cd $install_dir/openssl
#./config --prefix="$install_dir" threads no-shared no-dso no-comp CXXFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS"
#make -j"$(nproc)"
custom_flags_set
cd "$install_dir/boost"
"$install_dir/boost/bootstrap.sh" CXXFLAGS="-std=c++14 -fPIC"
"$install_dir/boost/b2" headers
custom_flags_set
BOOST_ROOT="$install_dir/boost"
BOOST_INCLUDEDIR="$install_dir/boost"
BOOST_BUILD_PATH="$install_dir/boost"
patches_github_url="https://raw.githubusercontent.com/userdocs/python-libtorrent-binding/master/patches/RC_1_2/Jamfile"
curl "$patches_github_url" -o "$install_dir/libtorrent/bindings/python/Jamfile"
cd "$install_dir/libtorrent/bindings/python"
"$install_dir/boost/b2" -j"$(nproc)" address-model=64 fpic=on variant=release threading=multi libtorrent-link=static boost-link=static cxxflags="$CXXFLAGS" cflags="$CPPFLAGS" linkflags="$LDFLAGS"
[[ -f "$install_dir/libtorrent/bindings/python/libtorrent.so" ]] && cp "$install_dir/libtorrent/bindings/python/libtorrent.so" "$install_dir/libtorrent.so"
However, I found in a search earlier that I previously had written this issue was fixed in v1.2.10, and wasen't neither before v1.2.9, so possibly look into downgrading instead, e.g. I see there's 1.2.5(and 1.1.13 if going longer back), I believe was 20.10 or something, when looked it up previously today, but I don't know how affects everything i.e. if linked and depending on other stuff now updated etc - sorry not an ubuntu-guy myself.
There's also some PPAs for libtorrent I believe but what version delievers I have no idea.
Again, sorry for triggering your broken system, wasen't my intention surely. Hope you can figure out a solution and sorry for not having more precise solution for you. Good luck.
Edit: I don't know if will work adding a debain package, but there latest from sid is 1.2.9-3, where they included the move_storage fix, so this issue resolved:
https://packages.debian.org/sid/python3-libtorrent
Code: Select all
* Added patch from upstream to make python move_storage() match C++ signature
The link for ubuntu package of libtorrent 1.2.5 previously mentioned from ubuntu 20.10:
https://packages.ubuntu.com/groovy/python3-libtorrent
Edit2: PPA for libtorrent RC_1_2 builds, latest 1.2.12 for ubuntu 20.10:
https://launchpad.net/~libtorrent.org/+ ... /1.2-daily