[Solved] rTorrent not working on Raspberry Pi 4

I installed the rtorrent client on my new Rpi 4 8GB, but when launching it and adding a download or when data transfer occurs, it closes in no time. This is the error output:

Caught SIGBUS, dumping stack:Rate   0.4/  0.4 KB] [Port: 49150]                            [U 0/65535] [D 0/65535] [H 0/32] [S 28/31/768] [F 2/128]
rtorrent(+0x13526) [0xa53526]
/lib/arm-linux-gnueabihf/libc.so.6(+0x25cb0) [0xf7857cb0]
/lib/arm-linux-gnueabihf/libtorrent.so.20(+0x844e4) [0xf7c0c4e4]
/lib/arm-linux-gnueabihf/libtorrent.so.20(_ZN7torrent9PollEPoll7performEv+0x85) [0xf7bb0b8e]
/lib/arm-linux-gnueabihf/libtorrent.so.20(_ZN7torrent9PollEPoll7do_pollExi+0x6f) [0xf7bb0ca4]
/lib/arm-linux-gnueabihf/libtorrent.so.20(_ZN7torrent11thread_base10event_loopEPS0_+0x127) [0xf7bd682c]
rtorrent(+0x12482) [0xa52482]
/lib/arm-linux-gnueabihf/libc.so.6(__libc_start_main+0x97) [0xf7849524]

Error: Success
Signal code '1': Invalid address alignment.
Fault address: 0x16ffbad
The fault address is not part of any chunk.

I tried another client within Kodi, Elementum, and it works fine.

How did you install it? Using apt?

Yes, I installed it with a simple apt install, with OSMC’s own repositories.
I also installed nginx, php7.3, and rutorrent. But the status of those services does not change anything.

The Debian version may be very old. It may make sense to build from source or their own APT repository if they provide one.

I am trying to compile the latest stable versions of libtorrent (0.13.8) and rtorrent (0.9.8). I don’t have much experience compiling, but I follow the instructions in the INSTALL file. I run ‘autoconf’ to build the ‘configure’ file, and I get this error:

configure.ac:4: error: possibly undefined macro: AC_CONFIG_MACRO_DIRS
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:5: error: possibly undefined macro: AM_INIT_AUTOMAKE

‘configure’ file is generated but when executing it I get this error:

./configure: line 2069: syntax error near unexpected token `scripts'
./configure: line 2069: `AC_CONFIG_MACRO_DIRS(scripts)'

It happens with libtorrent and with rtorrent. I don’t know if I installed all the packages needed to compile or should I do something else.

It was a long time since I did a own compile of tTorrent. Been using the .Deb package, but i did notice that the user running rtorrent needs two things in their home folder. .rtorrentrc and a folder named .rtorrentsession. I’m mobile right now and can’t check correct spelling/caps.

Finally got compilation, I built the ‘configure’ file with:

autoreconf --install

It was also necessary to install some packages

sudo apt-get install libncurses5-dev libncursesw5-dev libxmlrpc-c ++ 8-dev libcurl4-gnutls-dev libcrypto ++ - dev libssl-dev

But it doesn’t work either, same error:

Caught SIGBUS, dumping stack: [Rate 0.0 / 0.0 KB] [Port: 49150] [U 0/65535] [D 0/65535] [H 0/32] [S 0/2/768] [F 2/128]
rtorrent (+ 0x15388) [0xa25388]
/lib/arm-linux-gnueabihf/libc.so.6(+0x25cb0) [0xf74bccb0]
/usr/local/lib/libtorrent.so.21(+0x94f14) [0xf785cf14]
/usr/local/lib/libtorrent.so.21(_ZN7torrent9PollEPoll7performEv+0x89) [0xf781e2d2]
/usr/local/lib/libtorrent.so.21(_ZN7torrent9PollEPoll7do_pollExi+0x5b) [0xf781e474]
/usr/local/lib/libtorrent.so.21(_ZN7torrent11thread_base10event_loopEPS0_+0x13b) [0xf7810428]
rtorrent (+ 0x142d4) [0xa242d4]
/lib/arm-linux-gnueabihf/libc.so.6(__libc_start_main+0x97) [0xf74ae524]

Error: Success
Signal code '1': Invalid address alignment.
Fault address: 0x1e4e679
The fault address is not part of any chunk.

I read something about this error, both for rtorrent and some other application with aarch64 64-bit architecture:


I finally managed to compile, install and run rtorrent without problems, tested for several days.
When compiling libtorrent I used the following option:

./configure --enable-aligned

So in Rbpi4 I have installed versions of rtorrent 0.9.8 and libtorrent 0.13.8

Now I would like to know how to get the corresponding .deb packages.

I don’t understand, you want to build your own .deb package of your compile?

Or do you want to install the older .deb from debian to replace your newly compiled and probably working rtorrent & libtorrent?

Isn’t there a there a “install” target in the make file you used?, If you want to install it system wide, you should use “sudo make install”.

I already installed using ‘sudo make install’. I would like to build the .deb packages of this build, so that I can delete all the folders and files in this build.

I’ve never build a .deb package personally, but if i was building a newer version of something that has a deb package, I would look at that .deb package that is in the distro, like untar it’s content and play around to see if there was just (which I doubt), replace the files? To get an idea how it’s supposed to work, else I bet there are more then a handful tutorials on google how to build your own .deb package.