Compiled from source 1.3.15 but has libtorrent error.

General support for problems installing or using Deluge
Post Reply
zeadgif
New User
New User
Posts: 6
Joined: Tue Oct 10, 2017 11:11 pm

Compiled from source 1.3.15 but has libtorrent error.

Post by zeadgif »

Hello,
Im sorry to bug you guys but after multiple attempts to compile deluge from source using latest libtorrent, im kind of desperate.
Im new to installing and runing code in raspberry and linux in general, so i followed some guides. At first i ended up installing the old repository version... but after some reading i noticed that i had to install from source in order to update to the latest stable version. (??)
So i followed the guides and proceeded to first installing and compiling the libtorrent, in the step to check the python bindings i receive this error:

Code: Select all

python -c "import libtorrent; print libtorrent.version"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: /usr/local/lib/libtorrent-rasterbar.so.9: undefined symbol: _ZN5boost7atomics6detail8lockpool12get_lock_forEPVKv
I searched for it on the web, and couldnt fins anything that would be related or help... So i tought that maybe if i compiled deluge it may be ok... So i compiled deluge and everything went fine, but when i try to run deluged i get this:

Code: Select all

main:248 /usr/local/lib/libtorrent-rasterbar.so.9: undefined symbol: _ZN5boost7atomics6detail8lockpool12get_lock_forEPVKv
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/deluge-1.3.15-py2.7.egg/deluge/main.py", line 241, in start_daemon
    Daemon(options, args)
  File "/usr/local/lib/python2.7/dist-packages/deluge-1.3.15-py2.7.egg/deluge/core/daemon.py", line 144, in __init__
    from deluge.core.core import Core
  File "/usr/local/lib/python2.7/dist-packages/deluge-1.3.15-py2.7.egg/deluge/core/core.py", line 38, in <module>
    from deluge._libtorrent import lt
  File "/usr/local/lib/python2.7/dist-packages/deluge-1.3.15-py2.7.egg/deluge/_libtorrent.py", line 59, in <module>
    import libtorrent as lt
ImportError: /usr/local/lib/libtorrent-rasterbar.so.9: undefined symbol: _ZN5boost7atomics6detail8lockpool12get_lock_forEPVKv
Can anyone help?
Thanks for your patience....
shamael
Compulsive Poster
Compulsive Poster
Posts: 667
Joined: Sat Oct 08, 2016 9:28 am

Re: Compiled from source 1.3.15 but has libtorrent error.

Post by shamael »

Hi,

Not directly an answer but why not installing the last version of Deluge/libtorrent from PPA repo?
Depending of your OS version and kernel:
- Based on Debian Jessie: http://dev.deluge-torrent.org/wiki/Inst ... ian/Jessie
- Based on the last Debian stretch, a workaround is possible waiting for a new release: http://forum.deluge-torrent.org/viewtop ... ch#p227182
zeadgif
New User
New User
Posts: 6
Joined: Tue Oct 10, 2017 11:11 pm

Re: Compiled from source 1.3.15 but has libtorrent error.

Post by zeadgif »

Hello,
Im going to be honest, I read in other posts about the PPA (i dont fully understand how it works). I actually tried to do that, i couldnt get the command to add the repository to work (i havent tested inserting the deb directly into the lists). And I also read i shouldnt do it and that it could "harm" raspberry in the way of being unoptimize, could ruin performance, so based on that i kind of put that asside due to my expirience...

If you guys say it should be fine, i will try that again and look further.
Im using Retropie, i suppose its os is based on raspbian? (debian jessie)
Im a software developer but i havent really used linux much, i have expirience in assembly, c, c++, and c#. Again im not really into linux... But im curious and im liking it, so please be patient.

EDIT: I think i should add, the libtorrent im compiling is the 1.1.4 latest in the releases.

Thanks for any help.
sinaptika
Member
Member
Posts: 41
Joined: Thu Apr 27, 2017 6:23 pm

Re: Compiled from source 1.3.15 but has libtorrent error.

Post by sinaptika »

1. Don't use libtorrent 1.1.4 ! Use libtorrent 1.0.11
2. Use a PPA.

You say you are using retropie. On their site, they mention (like you said), they are based on raspbian jessie.
With raspbian jessie, there will be no problems using deluge official ppa.
Commands:

Code: Select all

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 249AD24C

Code: Select all

sudo echo "deb http://ppa.launchpad.net/deluge-team/ppa/ubuntu trusty main" >> /etc/apt/sources.list.d/deluge.list

Code: Select all

sudo add-apt-repository 'deb http://ppa.launchpad.net/deluge-team/ppa/ubuntu trusty main'

Code: Select all

sudo apt update

Code: Select all

sudo apt install -t trusty libtorrent-rasterbar8

Code: Select all

sudo apt install -t trusty deluged deluge-web deluge-console
Some more info:
When building from source, you were having issues with libtorrent python bindings.
Are you sure you ran ./configure with --enable-python-binding?
If you did use --enable-python-binding, then you might have issues with previous version of libtorrent,
already installed on the system?
And now some bad news: I'm guessing, you did some trial and error installing, after you were having issues?
If you can, try to reinstall the system before following the instructions above.

If you can't reinstall, we will try to do it manually by deleting libtorrent and deluge files or make uninstall.
zeadgif
New User
New User
Posts: 6
Joined: Tue Oct 10, 2017 11:11 pm

Re: Compiled from source 1.3.15 but has libtorrent error.

Post by zeadgif »

Hello,
I will try the ppa then using the above commands.
Regarding the ./configure im using this:

Code: Select all

sudo ./configure --enable-python-binding --with-libiconv --with-boost-libdir=/usr/lib/arm-linux-gnueabihf
I followed the full tutorial from the website http://dev.deluge-torrent.org/wiki/Building/libtorrent, i compiled the the 1.1.4, everything went fine, the only thing with error is the "python -c" to check if "everything is ok".

Thinking that maybe i screwed up somewhere, i flashed the sd card and tried with a clean "install", so that there was no previous installation, unless the retropie already comes with libtorrent and im not aware of it.
If needed again i will flash the card again, has many times has needed. I just want to find a solution.
For now il try the ppa, and when i can il report back.

Thanks for the help!
zeadgif
New User
New User
Posts: 6
Joined: Tue Oct 10, 2017 11:11 pm

Re: Compiled from source 1.3.15 but has libtorrent error.

Post by zeadgif »

I tried the commands above.
The first run successfully.
The second gave permission denied, but i managed to add the entry using nano and copy pasting the entry inside. (Maybe i ended up creating because it didnt exist, i mean was it supposed to exist?)
The third after the manual edit gave the error:

Code: Select all

sudo add-apt-repository 'deb http://ppa.launchpad.net/deluge-team/ppa/ubuntu trusty main'
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 167, in <module>
    sp = SoftwareProperties(options=options)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 105, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 595, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 89, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/jessie
Since it didnt work i also tried to add the "deb" to "/etc/apt/sources.list" wich existed and had entries, it gave the same error.

Should i try to compile the 1.0.11?
I only got the idea that it was outdated because the repository one, 1.3.10 with 0.16.xx.xx was having a very very wierd behaviour in the torrents. The download would start but then short after go to 0, then start again, then 0 and so on... At first i tout it was the hdd power issue, but then i read that it was a bug (probably) and thats when i noticed the version was seriously outdated.

Thanks for the help.
sinaptika
Member
Member
Posts: 41
Joined: Thu Apr 27, 2017 6:23 pm

Re: Compiled from source 1.3.15 but has libtorrent error.

Post by sinaptika »

I made a boo boo typo, my bad.

Correct commands:

Code: Select all

sudo apt-get install dirmngr

Code: Select all

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 249AD24C

Code: Select all

sudo su -c "echo "deb http://ppa.launchpad.net/deluge-team/ppa/ubuntu trusty main" >> /etc/apt/sources.list.d/deluge.list"

Code: Select all

sudo apt update

Code: Select all

sudo apt install -t trusty libtorrent-rasterbar8

Code: Select all

sudo apt install -t trusty deluged deluge-web deluge-console
The commands that returned errors shoudl be fixed.
EDIT: Just noticed "notmyplanet" fixed the command, so you should not have issues with the second line.
You can also use a text editor, like you did, this way is just faster.
The first 2 lines take care of everything related to the ppa, so the old 3th line should not even be there.

I suggest you flash the card, and redo the steps in this post.
But first, just for fun (before you flash), if you have the time, try compiling whatever libtorrent source you already have, with:

Code: Select all

./configure \
  --build=$CBUILD \
  --host=$CHOST \
  --prefix=/usr \
  --enable-python-binding \
  --enable-static=no \
  --with-boost-system=boost_system \
  --with-libiconv=yes \
  --enable-debug=no \
--enable-silent-rules && \
make && \
make install-strip && \
If you have the time, I'm curious how long it will take.
Keep in mind, even if it works, I strongly suggest you flash and follow the ppa path.
zeadgif
New User
New User
Posts: 6
Joined: Tue Oct 10, 2017 11:11 pm

Re: Compiled from source 1.3.15 but has libtorrent error.

Post by zeadgif »

I can say that the current compile for 1.1.4, using the 4 cores takes about 2h:10m.
Had to create a swap of 2gb because 1 would crash with gcc killed.
When i have the time i will compile with that and il post the results. :)
zeadgif
New User
New User
Posts: 6
Joined: Tue Oct 10, 2017 11:11 pm

Re: Compiled from source 1.3.15 but has libtorrent error.

Post by zeadgif »

Hello,
The above command gave the following result:

Code: Select all

 sudo ./configure \
>   --build=$CBUILD \
>   --host=$CHOST \
>   --prefix=/usr \
>   --enable-python-binding \
>   --enable-static=no \
>   --with-boost-system=boost_system \
>   --with-libiconv=yes \
>   --enable-debug=no \
> --enable-silent-rules && \
> make && \
> make install-strip
checking whether make supports nested variables... yes

Building libtorrent-rasterbar 1.1.4

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... armv7l-unknown-linux-gnueabihf
checking host system type... armv7l-unknown-linux-gnueabihf
checking target system type... armv7l-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
checking whether to enable maintainer-specific portions of Makefiles... yes

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 armv7l-unknown-linux-gnueabihf file names to armv7l-unknown-linux-gnueabihf format... func_convert_file_noop
checking how to convert armv7l-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... no
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.53... yes
checking whether the Boost::System library is available... yes
checking for exit in -lboost_system... yes
checking whether the Boost::Chrono library is available... yes
configure: error: Boost.Chrono library not found. Try using --with-boost-chrono=lib
I will try the installation with ppa later.

EDIT: The ppa installed successfully!
Thanks everyone for the help!

Im hoping now the "shark tooth" torrent download behaviour is gone, its wierd im sure i have 100mb/s up and down...
Post Reply