Error: Short Read on Raspberry Pi Torrent Box

General support for problems installing or using Deluge
DanielDC88
Member
Member
Posts: 25
Joined: Fri Jul 24, 2015 9:56 pm

Re: Error: Short Read on Raspberry Pi Torrent Box

Post by DanielDC88 »

Okay, in that case I will continue to try with the guide of doing so on the deluge website. I am still having problems when doing the follwing command:

Code: Select all

./configure --enable-python-binding

The output is as follows:

Code: Select all

checking whether make supports nested variables... yes

Building libtorrent-rasterbar 1.0.6

Checking for a C/C++ compiler to use:
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking whether gcc and cc understand -c and -o together... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether g++ understands -c and -o together... yes

Checking system type:
checking build system type... armv6l-unknown-linux-gnueabihf
checking host system type... armv6l-unknown-linux-gnueabihf
checking target system type... armv6l-unknown-linux-gnueabihf

Initializing Automake:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking dependency style of g++... gcc3

Initializing Libtool:
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert armv6l-unknown-linux-gnueabihf file names to armv6l-unknown-linux-gnueabihf format... func_convert_file_noop
checking how to convert armv6l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate

Checking for posix thread support:
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -lpthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking whether to check for GCC pthread/shared inconsistencies... yes
checking whether -lpthread fixes that... yes
Checking for visibility support:
checking for __attribute__((visibility("hidden")))... found
yes

Checking for boost libraries:
checking for boostlib >= 1.36... configure: We could not detect the boost libraries (version 1.36 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option.  If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.
checking whether the Boost::System library is available... no
configure: error: Boost.System library not found. Try using --with-boost-system=lib
Adding '--with-boost-system=lib' to the command as the error suggests does not fix the problem. So the next piece of the puzzle is getting this boost thing I guess. Do you know what it is? The Libtorrent documentation has instructions on how to get it, but I do not understand them.

As I mentioned before, would it be possible to adapt this tutorial to get the latest version of Libtorrent?

Thanks.
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Error: Short Read on Raspberry Pi Torrent Box

Post by Cas »

This is the definitive way to build libtorrent on debian/ubuntu/raspbian: http://dev.deluge-torrent.org/wiki/Buil ... untuDebian

Did you do this:

Code: Select all

sudo apt-get install build-essential checkinstall libboost-system-dev libboost-python-dev libssl-dev libgeoip-dev
If you have done that and you really need to specify the boost path then you need to find where libboost_system.a is installed, usually (/usr/lib) so the arg would be `--with-boost-system=/usr/lib`. This can help find the file:

Code: Select all

sudo updatedb
locate libboost_system
Considering you managed to start the build before I am rather surprised you are having issues at configure stage.
DanielDC88
Member
Member
Posts: 25
Joined: Fri Jul 24, 2015 9:56 pm

Re: Error: Short Read on Raspberry Pi Torrent Box

Post by DanielDC88 »

Yes, I have done that. I also did the following from here:

Code: Select all

sudo apt-get install scons build-essential libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-thread-dev libboost-all-dev 
That allowed the configure script to run without issue. I have now logged directly onto the Pi and ran make, but it is continuously saying "Warning: swp{b} use is deprecated for armv6 and armv7" so I am not confident it will successfully. It is making progress though. I will post the outcome when it finishes.
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Error: Short Read on Raspberry Pi Torrent Box

Post by Cas »

That install line is terrible. scons would not be needed at all here, and all the rest are included anyway by using libboost-all-dev. Maybe there is a libboost dependency specifically on the RPi that I am not aware of as I configured and built libtorrent on debian wheezy myself without any issue.

Warnings can be ignored for the most part.
DanielDC88
Member
Member
Posts: 25
Joined: Fri Jul 24, 2015 9:56 pm

Re: Error: Short Read on Raspberry Pi Torrent Box

Post by DanielDC88 »

It may be terrible but it works. It's still compiling.
DanielDC88
Member
Member
Posts: 25
Joined: Fri Jul 24, 2015 9:56 pm

Re: Error: Short Read on Raspberry Pi Torrent Box

Post by DanielDC88 »

It appears to have finished compiling, so now I can install Deluge. What way do you reccomend I do this?
DanielDC88
Member
Member
Posts: 25
Joined: Fri Jul 24, 2015 9:56 pm

Re: Error: Short Read on Raspberry Pi Torrent Box

Post by DanielDC88 »

Image
Spews out the following whenever it's ran, which it doesn't automatically do on startup as I told it to. Is any of this going to be a problem?

Code: Select all

[ERROR   ] 13:01:33 component:118 [Failure instance: Traceback: <type 'exceptions.RuntimeError'>: Address family not supported by protocol
/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/main.py:230:start_daemon
/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/core/daemon.py:161:__init__
/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/component.py:296:start
/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/component.py:124:_component_start
--- <exception caught here> ---
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:134:maybeDeferred
/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/core/preferencesmanager.py:162:start
/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/config.py:312:register_set_function
/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/core/preferencesmanager.py:258:_on_set_listen_interface
/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/core/preferencesmanager.py:276:_on_set_random_port
]
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/main.py", line 230, in start_daemon
    Daemon(options, args)
  File "/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/core/daemon.py", line 161, in __init__
    component.start("PreferencesManager")
  File "/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/component.py", line 296, in start
    deferreds.append(self.components[name]._component_start())
  File "/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/component.py", line 124, in _component_start
    d = maybeDeferred(self.start)
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 134, in maybeDeferred
    result = f(*args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/core/preferencesmanager.py", line 162, in start
    self._on_set_listen_interface)
  File "/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/config.py", line 312, in register_set_function
    function(key, self.__config[key])
  File "/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/core/preferencesmanager.py", line 258, in _on_set_listen_interface
    self._on_set_random_port("random_port", self.config["random_port"])
  File "/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/core/preferencesmanager.py", line 276, in _on_set_random_port
    self.session.listen_on(listen_ports[0], listen_ports[1], str(self.config["listen_interface"]).strip())
exceptions.RuntimeError: Address family not supported by protocol
[ERROR   ] 13:01:33 component:118 [Failure instance: Traceback: <type 'exceptions.RuntimeError'>: Address family not supported by protocol
/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/main.py:230:start_daemon
/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/core/daemon.py:169:__init__
/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/component.py:296:start
/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/component.py:124:_component_start
--- <exception caught here> ---
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:134:maybeDeferred
/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/core/preferencesmanager.py:162:start
/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/config.py:312:register_set_function
/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/core/preferencesmanager.py:258:_on_set_listen_interface
/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/core/preferencesmanager.py:276:_on_set_random_port
]
It isn't using the folders I've assigned it either. I put a file in the watch folder and it didn't add. Added a torrent that was previously downloaded and 'force recheck' did nothing. I think it's a permissions error because when I tried doing 'move storage' to the default directory, I got the following:

Code: Select all

[ERROR   ] 13:35:49 rpcserver:304 Exception calling RPC request: [Errno 13] Permission denied: '/storage'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/core/rpcserver.py", line 299, in dispatch
    ret = self.factory.methods[method](*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/core/core.py", line 402, in move_storage
    if not self.torrentmanager[torrent_id].move_storage(dest):
  File "/usr/local/lib/python2.7/dist-packages/deluge-1.3.11-py2.7.egg/deluge/core/torrent.py", line 846, in move_storage
    os.makedirs(dest)
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/storage'
I tried changing the permissions with sudo chmod 777 storage/Pi but permission was denied. I can create folders from the command line in the folders. The location is a mounted NAS I added using this guide. This is how I had it working before, and never had these issues.
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Error: Short Read on Raspberry Pi Torrent Box

Post by Cas »

The first error is not serious but just very odd can you provide your core.conf please as I don't know how it can occur. Edit: On analysing the error this might be a result of IPv6 not being enabled, I have opened a libtorrent issue. Do you mind testing if enabling IPv6 solves it.

The second issue is clearly a permission problem and if it is mounted NAS then you need to alter the permission on the NAS or change the mount settings on RPi.
DanielDC88
Member
Member
Posts: 25
Joined: Fri Jul 24, 2015 9:56 pm

Re: Error: Short Read on Raspberry Pi Torrent Box

Post by DanielDC88 »

Enabling IPV6 stopped the errors on startup.

The issues with permissions just don't make sense. I can create, edit and delete files in the directories on the NAS from the command line, but Deluge cannot. Checking on my Windows machine, the Linux user (the Pi) appears to have full access and I went and reconfigured the users on the NAS to make sure of this. Could this be an issue with Deluge or Libtorrent? Can you think of anything I might have missed?
Shryp
Moderator
Moderator
Posts: 521
Joined: Mon Apr 20, 2015 10:20 pm

Re: Error: Short Read on Raspberry Pi Torrent Box

Post by Shryp »

I have no real answers for you. Any change your deluge and command line terminal are running as different users or groups?
Locked