Page 1 of 5

Updating Libtorrent because of Error: short read

Posted: Mon Oct 17, 2016 4:51 pm
by raspdealer
Hi there,

I'm trying to update update libtorrent following deluge official guide: http://dev.deluge-torrent.org/wiki/Building/libtorrent
But I can't go through the step 3... it takes ages and finished with:

Code: Select all

pi@deluge ~/libtorrent-rasterbar-1.0.10 $ make -j 4
Making all in include/libtorrent
make[1]: Entering directory '/home/pi/libtorrent-rasterbar-1.0.10/include/libtorrent'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/pi/libtorrent-rasterbar-1.0.10/include/libtorrent'
Making all in src
make[1]: Entering directory '/home/pi/libtorrent-rasterbar-1.0.10/src'
  CXX      http_connection.lo
  CXX      http_parser.lo
  CXX      http_stream.lo
  CXX      http_seed_connection.lo
g++: internal compiler error: Processus arrêté (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
Makefile:889: recipe for target 'http_seed_connection.lo' failed
make[1]: *** [http_seed_connection.lo] Error 1
make[1]: *** Attente des tâches non terminées....
g++: internal compiler error: Processus arrêté (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
Makefile:889: recipe for target 'http_connection.lo' failed
make[1]: *** [http_connection.lo] Error 1
/tmp/cc10mfOX.s: Messages de l'assembleur:
/tmp/cc10mfOX.s:614: Avertissement: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cc10mfOX.s:643: Avertissement: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cc10mfOX.s:680: Avertissement: swp{b} use is deprecated for ARMvshoul6 and ARMv7
/tmp/cc10mfOX.s:850: Avertissement: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cc10mfOX.s:877: Avertissement: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cc10mfOX.s:914: Avertissement: swp{b} use is deprecated for ARMv6 and ARMv7
followed by this message a lot and after:

Code: Select all

/tmp/cc10mfOX.s:56772: Avertissement: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/cc10mfOX.s:56800: Avertissement: swp{b} use is deprecated for ARMv6 and ARMv7
make[1]: Leaving directory '/home/pi/libtorrent-rasterbar-1.0.10/src'
Makefile:621: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
What should I do?
Is there directly some deb package available for rpi2?

Re: Updating Libtorrent because of Error: short read

Posted: Mon Oct 17, 2016 6:20 pm
by Cas
Likely you are running out of memory if you run make again it should progress further through... Have you searched for a package?

Re: Updating Libtorrent because of Error: short read

Posted: Mon Oct 17, 2016 6:23 pm
by raspdealer
Yes but not so good at this... where can I found it?
I relaunched it but killed deluge before... will see.

Re: Updating Libtorrent because of Error: short read

Posted: Tue Oct 18, 2016 10:42 am
by shamael
Same issue as you, I'm on a RPI 3 with no swap partition and Cas answer was the real issue for my setup. To get a workaround, I used a temp swap file on the SD card (or anywhere you have 1GB free space). FYI I compiled libtorrent-rasterbar-1.0.9 for ARM (raspberry Pi 3) successfully and may still have the deb file if you want. If you want to do it yourself mount the swap as i did:
PS: I'm on OSMC, debian based distribution, all done as root

#create a 1GB file

Code: Select all

dd if=/dev/zero of=/.swapfile bs=1024 count=1M
#create swap area

Code: Select all

mkswap /.swapfile
#enable the swap

Code: Select all

swapon /.swapfile
#check

Code: Select all

swapon -s
and

Code: Select all

free -m
Compile your file

Afterward

#disable the swap

Code: Select all

swapoff /.swapfile
#delete the 1GB file (the .swapfile)

Regards
S

Re: Updating Libtorrent because of Error: short read

Posted: Tue Oct 18, 2016 8:45 pm
by Cas
That's really quite useful Shamael, it would be handy if you have time to add it as a section here: http://dev.deluge-torrent.org/wiki/Building/libtorrent

Re: Updating Libtorrent because of Error: short read

Posted: Wed Oct 19, 2016 10:24 am
by shamael
Cas wrote:That's really quite useful Shamael, it would be handy if you have time to add it as a section here: http://dev.deluge-torrent.org/wiki/Building/libtorrent
Done, Version 31 of the libtorrent documentation submitted.

Re: Updating Libtorrent because of Error: short read

Posted: Thu Oct 20, 2016 3:01 pm
by raspdealer
Thanks for that!
You drove me crazy.. I went back on the guide, saw thenguide and rough it was there before... :D

About the issue, my pi is compiling for more than 20 hours now...but still moving ;)

Re: Updating Libtorrent because of Error: short read

Posted: Thu Oct 20, 2016 4:01 pm
by shamael
;)

Wow 20h? Which Pi is that, the 1? I have a RPI 3 and it was less than 2h (didn't monitor it closely).
Anyway as said before I have the libtorrent-rasterbar-1.0.9 compiled (deb packet to install) already so if you encounter any issue I can share it.

Also I found some useful customization if you encounter performance issue, feel free to come back if needed

Re: Updating Libtorrent because of Error: short read

Posted: Thu Oct 20, 2016 5:47 pm
by raspdealer
I launched it 3 times and going more and more but stucked in a huge file.
Now with swap, it's still going... file per file. Let's see.

It's a pi2.

I will keep you posted. :P

Re: Updating Libtorrent because of Error: short read

Posted: Thu Oct 20, 2016 9:58 pm
by shamael
Fingers crossed :).