deluged 2 not starting after upgrade from 1.3 - module not found libtorrent

General support for problems installing or using Deluge
Post Reply
Hansi
New User
New User
Posts: 8
Joined: Sun Nov 19, 2017 8:20 am

deluged 2 not starting after upgrade from 1.3 - module not found libtorrent

Post by Hansi »

Hi,
I was running Deluge 1.3 on a Raspberry Pi 3 with Raspian based on stretch and connected with the webclient. Yesterday I did two full upgrades to Raspian based on Bullseye and now I have - as I wanted - Deluge 2. Unfortunately the daemon does not start anymore. My aim is to remote connect to the daemon in the local networrk using the normal deluge client on my laptop.

Here is the error and I have no idea what it means. I very much appreciate your help.

Code: Select all

pi@kraspberry ~> deluged
pi@raspberry ~> Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/_libtorrent.py", line 23, in <module>
    import deluge.libtorrent as lt
ModuleNotFoundError: No module named 'deluge.libtorrent'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/deluged", line 33, in <module>
    sys.exit(load_entry_point('deluge==2.0.3', 'console_scripts', 'deluged')())
  File "/usr/lib/python3/dist-packages/deluge/core/daemon_entry.py", line 90, in start_daemon
    from deluge.core.daemon import is_daemon_running
  File "/usr/lib/python3/dist-packages/deluge/core/daemon.py", line 22, in <module>
    from deluge.core.core import Core
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 28, in <module>
    from deluge._libtorrent import LT_VERSION, lt
  File "/usr/lib/python3/dist-packages/deluge/_libtorrent.py", line 25, in <module>
    import libtorrent as lt
ImportError: /usr/lib/arm-linux-gnueabihf/libtorrent-rasterbar.so.10: undefined symbol: __atomic_fetch_add_8

mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: deluged 2 not starting after upgrade from 1.3 - module not found libtorrent

Post by mhertz »

Sorry, I have no fix/workaround except if you're willing to rebuild yourself then adding '-latomic' seemingly is solution as missing otherwise on arm32. I've not looked much into this and don't have no arm setup to test, so don't know if downgrading libtorrent-rasterbar to a previous version of 1.2.x or 1.1x would help. There's no newer version published in Debian SID I checked, and here's latest bug report of this issue to monitor for progress, and which also features other link to libtorrent bug-ticket discussing various workaround during manual rebuilding, e.g the -latomic switch addition, or change from gcc to clang etc: https://bugs.debian.org/cgi-bin/bugrepo ... bug=992575

Sorry again for not posting anything to actually help you(well, except if wanting rebuild, as said), but just thought to post anyways so you atleast know what the issue is about and where to monitor for progress on this.

If you decide to look into rebuilding yourself, then if getting failures during, then possibly is because of needing a swapfile added, as my system with 4gb and over 3gb free wasent enough to build libtorrent without adding such temporary swapfile. Didn't happen in win10 VM with only 2GB defined for VM, so seemingly is some gcc thing VS msvc.

Good luck.
Hansi
New User
New User
Posts: 8
Joined: Sun Nov 19, 2017 8:20 am

Re: deluged 2 not starting after upgrade from 1.3 - module not found libtorrent

Post by Hansi »

Thank you very much for your answer. Although I did not follow your path of suggestion I am now have a working Deluge 2 running. I just flashed a SD Card with Ubuntu 20.04 which has Deluge 2 included and now I am adding the torrents manually.
bolshoi
Member
Member
Posts: 13
Joined: Sun Oct 25, 2020 5:42 am

Re: deluged 2 not starting after upgrade from 1.3 - module not found libtorrent

Post by bolshoi »

I have the same issue on macOS. I'll try your suggestion with building under -latomic.
Do I have to compile deluge under -latomic or libtorrent, or both?

Cheers!
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: deluged 2 not starting after upgrade from 1.3 - module not found libtorrent

Post by mhertz »

Only libtorrent, though mind you, I don't know for sure this was issue, but was reported likely, but one also mentioned additionally patching was needed, but anyway there where committed I see a fix for some atomic checking on non-msvc platforms 19 dec 2020 in RC_1_2 branch, which then would be included in libtorrent 1.2.12, so if can find this or later 1.2.x release, or manually try build it, and see if works without the mentioned workarounds. Here's a few links for building/installing which refers to, or include, macos:

Brew, but for latest libtorrent 2.0.4 which isn't supported in deluge yet, so next link is about switching to older version, scroll through first few older posts and down to TLDR): https://formulae.brew.sh/formula/libtorrent-rasterbar
https://stackoverflow.com/questions/398 ... of-formula

Official build instructions including macos:
https://libtorrent.org/building.html

Good luck.
bolshoi
Member
Member
Posts: 13
Joined: Sun Oct 25, 2020 5:42 am

Re: deluged 2 not starting after upgrade from 1.3 - module not found libtorrent

Post by bolshoi »

Thank you for the details mhertz!

I ended up downgrading libtorrent back to 1.2.10 and deluge is working normally again!

For anyone else running into this, this is how I downgraded libtorrent-rasterbar via homebrew on macOS:

Code: Select all

brew tap-new bolshoi/local-libtorrent-rasterbar
brew extract --version=1.2.10 libtorrent-rasterbar bolshoi/local-libtorrent-rasterbar
brew install libtorrent-rasterbar@1.2.10
brew unlink libtorrent-rasterbar
brew link --overwrite libtorrent-rasterbar@1.2.10
Will update it back again when/if this issue is resolved.

Cheers!
Post Reply