LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-29-2013, 10:15 AM   #1
Miranden
Member
 
Registered: May 2012
Distribution: Slackware 64 14.2
Posts: 213

Rep: Reputation: 20
Error starting deluge, found bug reports


Okay, I have been having some problems with Deluge. I only installed it a couple of days ago, and at first I could not get it to build. (Details are on this thread.) I was using the Deluge and Libtorrent source linked on SBo (deluge-1.3.5 and liborrent-r7459). bartgymnast told me those versions have issues together and helped me get it built with deluge-1.3.6 and libtorrent-rasterbar.

Now, however, I am getting an error when I try to start Deluge. It says it will not start in classic mode, and gives this:

Code:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/deluge/ui/gtkui/gtkui.py", line 329, in _on_reactor_start
    client.start_classic_mode()
  File "/usr/lib64/python2.7/site-packages/deluge/ui/client.py", line 559, in start_classic_mode
    self._daemon_proxy = DaemonClassicProxy(self.__event_handlers)
  File "/usr/lib64/python2.7/site-packages/deluge/ui/client.py", line 432, in __init__
    self.__daemon = deluge.core.daemon.Daemon(classic=True)
  File "/usr/lib64/python2.7/site-packages/deluge/core/daemon.py", line 136, in __init__
    from deluge.core.core import Core
  File "/usr/lib64/python2.7/site-packages/deluge/core/core.py", line 36, in <module>
    from deluge._libtorrent import lt
  File "/usr/lib64/python2.7/site-packages/deluge/_libtorrent.py", line 59, in <module>
    import libtorrent as lt
ImportError: dynamic module does not define init function (initlibtorrent)
If I turn off classic mode and try to start in the other mode, it starts, but will not connect to anything.

So I found some information about this, but I am not sure what to do with it. It looks like this is a known bug that is related to boost:

http://dev.deluge-torrent.org/ticket/2300

https://bugs.archlinux.org/task/34478


However, in the second link, it says it's fixed. But I have a question about this. Why is this bug report on the Arch site? Why would the Arch developers fix a bug in a C library? Does this mean it is only fixed for Arch? Forgive my ignorance, but I am still learning how all this works.

Anyway, now I know about the bug, but what should I do? If I understood the answers to the above questions I might be informed enough to judge, but now I am uncertain. Is the bug fixed in some other version of deluge? Or should I try to get an older version of boost and replace the library I have with it? Would that be a good idea, or will it break something?

Should I submit another bug report, and if so, where?

I would be thankful if someone more experienced could give me guidance how to proceed. Thanks!

Last edited by Miranden; 08-29-2013 at 12:25 PM. Reason: put more info in title
 
Old 08-30-2013, 11:33 AM   #2
jamesf
Member
 
Registered: Dec 2004
Location: USA
Distribution: Slackware 12, Slackware64 14.2
Posts: 236
Blog Entries: 1

Rep: Reputation: 57
Your error, "ImportError: dynamic module does not define init function (initlibtorrent)" is different from the one(s) in the bug reports you linked.

Therefore, you have a different problem.

Selecting the phrase I quoted and googling for that results in hits that suggest that you haven't met all of Deluge's dependencies.

Good luck.
 
Old 08-31-2013, 09:59 AM   #3
Miranden
Member
 
Registered: May 2012
Distribution: Slackware 64 14.2
Posts: 213

Original Poster
Rep: Reputation: 20
Wow, I see that now. Thanks for pointing that out. What happened there was that I copied and pasted the entire error into Google, and it said that the search string was too long (strange, because it isn't saying that now). Then I copied about the first half of the traceback and came up with the error from the bug report. I looked at it and thought it was the same, especially since it was also about Deluge not starting in Classic mode, but I did not read that very last line so I guess I was wrong. Sorry about that.

Anyway, doing a diff on those two errors, it seems they are identical except for that very last line, and also mine referencing the /usr/lib64 directory instead of /usr/lib. Doesn't it mean something that everything else is the same? I would be very happy if this were only a dependency problem, but the first thing I did when I wanted to install this was make this list of the dependencies from Slackbuilds.org:

Code:
deluge
  pyOpenSSL
  python2-chardet
  pyxdg
  python-twisted
    zope.interface
      pysetuptools
  Mako
    MarkupSafe
      pysetuptools
I then installed everything, starting from the set on the farthest indent and working my way out (i.e pysetuptools, zope.interface, MarkupSafe, pyOpenSSL, python2-chardet, pyxdg, python-twisted, and Mako). I have not yet blacklisted those packages on Slackpkg, so when I run a slackpkg clean-system, you can see them all there (attached).

Or course, these dependencies are for deluge-1.3.5 and liborrent-r7459, and as I said in my first post, I had to use different versions to get it to build. Maybe those other versions require newer versions than what I have here? How can I find out?

Thanks for the help.
Attached Thumbnails
Click image for larger version

Name:	deluge-deps.png
Views:	29
Size:	115.3 KB
ID:	13319  
 
Old 08-31-2013, 03:22 PM   #4
jamesf
Member
 
Registered: Dec 2004
Location: USA
Distribution: Slackware 12, Slackware64 14.2
Posts: 236
Blog Entries: 1

Rep: Reputation: 57
Quote:
Originally Posted by Miranden View Post
... Then I copied about the first half of the traceback and came up with the error from the bug report. I looked at it and thought it was the same, especially since it was also about Deluge not starting in Classic mode, but I did not read that very last line...
At the top of the traceback it says something about 'most recent calls are last'. Since you're interested in what was happening when it died that's where you look. Also, generally error messages are more interesting, informative, and googleable than tracebacks, that's where I started googling.

Quote:
Anyway, doing a diff on those two errors, it seems they are identical except for that very last line, and also mine referencing the /usr/lib64 directory instead of /usr/lib. Doesn't it mean something that everything else is the same?
It means that deluge died in roughly the same area of the code in both. Since deluge was telling you that it couldn't start, then it died, this isn't too surprising.


Quote:
I then installed everything, ... (i.e pysetuptools, zope.interface, MarkupSafe, pyOpenSSL, python2-chardet, pyxdg, python-twisted, and Mako). I have not yet blacklisted those packages on Slackpkg, so when I run a slackpkg clean-system, you can see them all there (attached).
That looks like the right approach for that version of the software.

Quote:
Of course, these dependencies are for deluge-1.3.5 and libtorrent-r7459, and as I said in my first post, I had to use different versions to get it to build. Maybe those other versions require newer versions than what I have here? How can I find out?
I'm sorry, I haven't read your other post very closely and only dropped in because this thread wasn't getting any replies.

The way to start to check those dependencies is to see if there is a Changelog on the respective site(s) of the software you're compiling. If so, examine the changelog to see if any mention is made of library upgrades.

If that doesn't seem to help then google, using the terms deluge, the deluge version number, lib<libname>, and then something like 'initlibtorrent error' to see if that gets any hits.

Next try looking at the makefile(s) of the software you're compiling to see if any specific library version is mentioned in there.

Quote:
Thanks for the help.
Glad to, but this isn't really very good help. I don't have a 64-bit system and I don't use deluge, so you're not getting much beyond general here's-how-I-do-it advice.
 
1 members found this post helpful.
Old 09-01-2013, 11:27 AM   #5
Miranden
Member
 
Registered: May 2012
Distribution: Slackware 64 14.2
Posts: 213

Original Poster
Rep: Reputation: 20
Thank you for answering my questions. Honestly I found that extremely helpful. Even if it doesn't directly solve my problem, it helps me understand what is going on so that I can solve problems in the future.

I tried all of the things you suggested and unfortunately nothing worked. I checked the changelogs for Deluge and all of its dependencies, and could not find any mention of a change in library versions. I found nothing on Google either. I am using only the build scripts from SBo and not makefiles, but I looked in those and found nothing helpful.

I see that SBo has other versions of both libtorrent and libtorrent-rasterbar. I still don't know what the difference is. I also do not know what the difference would be if I built libtorrent as a separate package and installed it, or built it as part of Deluge, as I have been doing. If anyone could tell me what the difference would be, I would appreciate it.

In the meantime I am going to try to build Deluge with some other libtorrent versions, and also build libtorrent and libtorrent-rasterbar on their own and install them (one at a time, I guess, until I learn what the difference is between them and if they should be installed concurrently), just to see if that helps. I hope I don't break anything.
 
Old 09-01-2013, 01:19 PM   #6
jamesf
Member
 
Registered: Dec 2004
Location: USA
Distribution: Slackware 12, Slackware64 14.2
Posts: 236
Blog Entries: 1

Rep: Reputation: 57
Quote:
Originally Posted by Miranden View Post
...I see that SBo has other versions of both libtorrent and libtorrent-rasterbar. I still don't know what the difference is. I also do not know what the difference would be if I built libtorrent as a separate package and installed it, or built it as part of Deluge, as I have been doing. If anyone could tell me what the difference would be, I would appreciate it.

In the meantime I am going to try to build Deluge with some other libtorrent versions, and also build libtorrent and libtorrent-rasterbar on their own and install them (one at a time, I guess, until I learn what the difference is between them and if they should be installed concurrently), just to see if that helps. I hope I don't break anything.
The guy having the same error message in this thread (http://forum.deluge-torrent.org/view...aecf1&start=10) eventually solved his problem, which was having multiple versions of libtorrent installed and the wrong one was being used.

Since you're installing multiple versions (and have already installed them, if I'm reading correctly), this could be your problem, too.

Again, if I'm reading other sites correctly, libtorrent has one version of libtorrent and libtorrent-rasterbar has a different version of libtorrent and a small program bundled with it.
 
Old 09-01-2013, 01:50 PM   #7
Miranden
Member
 
Registered: May 2012
Distribution: Slackware 64 14.2
Posts: 213

Original Poster
Rep: Reputation: 20
It works!

No, I had not already installed different versions of libtorrent. I would not want to install more than one at the same time. I just wanted to see if replacing the version of libtorrent I had with a different one would solve the problem.

The issue was that when I first tried to build Deluge with the Slackbuild on SBo, it linked to deluge-1.3.5 and libtorrent-r7459. But I could not get it to build with those sources. So I opened a thread and someone suggested using deluge-1.3.6 and libtorrent-rasterbar-0.16.11. Libtorrent-rasterbar was supposed to work and was referenced as working in other sources. It did build. But then I couldn't run Deluge due to this error.

I just tried several combinations of Deluge/libtorrent/libtorrent-rasterbar versions, and the combination that worked was libtorrent-0.13.0 and deluge-1.3.6. I could not get it to work with any version of libtorrent-rasterbar.

I just have one more question, if you'll tolerate it. If I were to download the source and slackbuild from here: http://slackbuilds.org/repository/14...es/libtorrent/ it would build a libtorrent package. But if I were to download the stuff from here: http://slackbuilds.org/repository/14.0/network/deluge/, it would build a deluge package using the libtorrent AND deluge source. Can you tell me what this means, really? Would it still create the same libtorrent libraries if either one of those packages were installed?

Just hoping to understand this. Thanks again!
 
Old 09-01-2013, 03:41 PM   #8
cisneros
Member
 
Registered: Jul 2012
Distribution: Slackware
Posts: 95

Rep: Reputation: 5
Quote:
Originally Posted by Miranden View Post
It works!

No, I had not already installed different versions of libtorrent. I would not want to install more than one at the same time. I just wanted to see if replacing the version of libtorrent I had with a different one would solve the problem.

The issue was that when I first tried to build Deluge with the Slackbuild on SBo, it linked to deluge-1.3.5 and libtorrent-r7459. But I could not get it to build with those sources. So I opened a thread and someone suggested using deluge-1.3.6 and libtorrent-rasterbar-0.16.11. Libtorrent-rasterbar was supposed to work and was referenced as working in other sources. It did build. But then I couldn't run Deluge due to this error.

I just tried several combinations of Deluge/libtorrent/libtorrent-rasterbar versions, and the combination that worked was libtorrent-0.13.0 and deluge-1.3.6. I could not get it to work with any version of libtorrent-rasterbar.

I just have one more question, if you'll tolerate it. If I were to download the source and slackbuild from here: http://slackbuilds.org/repository/14...es/libtorrent/ it would build a libtorrent package. But if I were to download the stuff from here: http://slackbuilds.org/repository/14.0/network/deluge/, it would build a deluge package using the libtorrent AND deluge source. Can you tell me what this means, really? Would it still create the same libtorrent libraries if either one of those packages were installed?

Just hoping to understand this. Thanks again!
can you share the deluge.slackbuild and the files that you use please?, im having the same issue.
 
Old 09-01-2013, 03:53 PM   #9
jamesf
Member
 
Registered: Dec 2004
Location: USA
Distribution: Slackware 12, Slackware64 14.2
Posts: 236
Blog Entries: 1

Rep: Reputation: 57
Quote:
I just have one more question, if you'll tolerate it.
I welcome them, because then I'm passing on the ability for you to help yourself and sharing a bit of my hard-won knowledge besides. ;v)

Quote:
If I were to download the source and slackbuild from here: http://slackbuilds.org/repository/14...es/libtorrent/ it would build a libtorrent package. But if I were to download the stuff from here: http://slackbuilds.org/repository/14.0/network/deluge/, it would build a deluge package using the libtorrent AND deluge source.
Those two statements are true. The first way you'd compile (the slackbuild does this) and package (the slackbuild does this, too) a slackware package that would install libtorrent, any accompanying documentation the packager chose to include, and that's all. The second would compile libtorrent, then compile deluge, then package up both, along with anything else the packager wanted to include, and you'd end up with a slackware package that would contain and install the pair as (supposedly) a working application in one package. Either way is acceptable, but slightly different implications.

The implication of the libtorrent package is that you get a libtorrent that several other things could use, -or- that you're installing a specific libtorrent version (perhaps the latest, perhaps not) that you specifically need.

The implication of the second is that you end up with a working application and its dependency(ies), whether or not anything else can use that particular version of libtorrent.

Quote:
Would it still create the same libtorrent libraries if either one of those packages were installed?
Sort of, and no at the same time. See the numbers following the names and links of the source files? ( libtorrent-0.13.0.tar.gz (d499178f72010d5067a77f41fa1a1505) and libtorrent-r7459.tar.xz (871fb322dd0bf5233479b9cf895c04ac) )

Those numbers are the md5sum (a checksumming (easy description) program) of the source files. Those numbers are used to verify that the file on the server and your download of it are identical.

I just downloaded libtorrent-47459.tar.gz and then ran:
Code:
james@tardis:~/Downloads$ md5sum libtorrent-r7459.tar.xz 
871fb322dd0bf5233479b9cf895c04ac  libtorrent-r7459.tar.xz
james@tardis:~/Downloads$
Notice that I got the same number? That means that I my download gave me an exact copy of the file on the server. No line noise or other wonky-ness corrupted the file coming to me. yay! ;vD

Now notice that the numbers (quoted above) following the two libtorrent .tar.xz files are different? That means that those two files are different and that means that the two libraries are almost certainly different versions.

Why "almost certainly?" you ask? Good question!

The .tar means that the file is an archive (like a zip) created with tar (Tape ARchiver). If the contents of the two .tars are identical except for a single character (like an extra carriage return somewhere in the source) then the md5sums would be different, likely very different, but the two sets of sources _could_ compile to exactly the same code.

The .xz indicates the compression program used. .gz uses gzip, .bz uses bzip(?), and .xz uses xz.

Now, the -r7459 in the second libtorrent file name is _likely_ (but not certainly) a "revision number" in some source code control system (or versioning system like subversion, mercurial, git, bazaar, or similar).

_That_ tells us that they're targeting a very specific commit in the life of libtorrent. Likely not a full release like 0.16.0, or 1.10.9, or 23.10.2, but just a commit to the version control system that the libtorrent developers didn't feel was important enough to do a build, version number update, and release from.

If you have any other questions feel free to ask. I've been doing this programming thing for 40+ years through minis, micros, mainframes, Windows, Unix, AIX, embedded systems, and now a bit of Linux. Fun stuff.

EDIT:
So, sort of in that they're both libtorrent and no in that they're different versions of libtorrent, with different deletions, changes, and additions, making them potentially very, very different in requirements and function.

EDIT2:
In fact, that whole initlibtorrent thing working in one version and not the other goes to show how different they are!

Last edited by jamesf; 09-01-2013 at 03:58 PM.
 
1 members found this post helpful.
Old 09-02-2013, 09:55 AM   #10
Miranden
Member
 
Registered: May 2012
Distribution: Slackware 64 14.2
Posts: 213

Original Poster
Rep: Reputation: 20
Jamesf,

Thank you, that makes perfect sense. I appreciate your willingness to share your knowledge! I am just getting started in my exploration of programming, and Linux is a hobby (right now). I hope to have such an understanding myself one day.

So in the case of building the Deluge package and libtorrent with the same Slackbuild (the second way), the package would not be listed in /var/log/packages, correct? If so, then I wonder why it would be done that way? Wouldn't that make it harder to see what you have installed on your system, and to upgrade something if necessary? Why not just have libtorrent listed on SBo as a dependency (like Deluge's other 6 dependencies), instead of writing it into the build script?

Addendum: Now I am confused. Right before I got Deluge working by (I thought) building it with a different version of libtorrent (instead of libtorrent-rasterbar-0.16.11 or libtorrent-r7459, which were not working), I installed the standalone package libtorrent-rasterbar-0.16.3 and it's dependency, GeoIP. I wanted to see if that would make a difference for the error I was getting. It didn't.

I thought I had removed libtorrent-rasterbar-0.16.3 when it didn't work, but in fact I did not. I then decided to build Deluge with deluge-1.3.6 and libtorrent-0.13.0. That built, and when I installed it, it worked with no error. So at this point, I unknowingly had two different versions of libtorrent on my system, and it worked perfectly.

When I discovered what I had done, I removed the standalone package libtorrent-rasterbar-0.16.3. If I follow your explanation correctly, this should have left only the libraries for libtorrent-0.13.0 (which was built with the Deluge Slackbuild that I altered to use this version) on my system. When I did this, Deluge again would not start correctly.

So I thought maybe Deluge needed libtorrent-rasterbar-0.16.3 (and not libtorrent-0.13.0) in order to work. But I did not want two versions of libtorrent on my system, so I removed the deluge package (containing libtorrent-0.13.0) and then built Deluge with libtorrent-rasterbar-0.16.3. When I installed it, it again gave me the error. At this point I had tried both versions of libtorrent separately, but every time I had only one version of libtorrent installed, deluge would not work; when I had them both, everything was fine.

To confirm this, when I reinstalled the Deluge package containing deluge-1.3.6 and libtorrent-0.13.0 and also the standalone package libtorrent-rasterbar-0.16.3, it all worked again.

I hope this has not been too hard to follow. I have tried to be precise to avoid confusion, but in doing so I fear I have written the word "libtorrent" so many times that my narrative will be difficult to read.

The short summary is that it seems to me Deluge will only run when I have two different versions of libtorrent on my system: one that I built Deluge with, and one that I installed as a standalone package. Surely this can't be right. I think I have to figure out what is going on here or I will never understand Linux package management. Can you give me any hints?

P.S. In case you want to ask, yes, I did leave libtorrent-rasterbar's dependency GeoIP during these trials in case that was needed (even though it is not listed as a dependency of Deluge). I tried both with and without it.

@cisneros: I have attached my Slackbuild. You can get the rest of the details of what I have done from this thread. Please let me know if you can get it to work with one version of libtorrent, or if you need both as I seem to. Good luck!
Attached Files
File Type: txt deluge.Slackbuild.txt (3.0 KB, 17 views)

Last edited by Miranden; 09-02-2013 at 03:15 PM. Reason: package number typo
 
Old 09-02-2013, 11:20 AM   #11
cisneros
Member
 
Registered: Jul 2012
Distribution: Slackware
Posts: 95

Rep: Reputation: 5
it worked, i think the correct order is installing the libtorrent rastebar pkg, then compile and install deluge with libtorrent 0.13.0, then remove the deluge folder in .config, now is working. is not a pretty installation but its working.
 
Old 09-02-2013, 12:01 PM   #12
Miranden
Member
 
Registered: May 2012
Distribution: Slackware 64 14.2
Posts: 213

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by cisneros View Post
it worked, i think the correct order is installing the libtorrent rastebar pkg, then compile and install deluge with libtorrent 0.13.0, then remove the deluge folder in .config, now is working. is not a pretty installation but its working.
In my case the order was not important. It works with those two versions of libtorrent installed. What I am wondering is why both are necessary.
 
Old 09-02-2013, 02:02 PM   #13
cisneros
Member
 
Registered: Jul 2012
Distribution: Slackware
Posts: 95

Rep: Reputation: 5
Quote:
Originally Posted by Miranden View Post
In my case the order was not important. It works with those two versions of libtorrent installed. What I am wondering is why both are necessary.
if you go to the about screen of deluge, you can see that the libtorrent version is 0.16.11.0, so it is using the rasterbar version.. kind of weird, but if you check the tar files, the two are very different. so if you see it like those two are different libs i think its correct... duno.
 
Old 09-02-2013, 03:21 PM   #14
Miranden
Member
 
Registered: May 2012
Distribution: Slackware 64 14.2
Posts: 213

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by cisneros View Post
if you go to the about screen of deluge, you can see that the libtorrent version is 0.16.11.0, so it is using the rasterbar version.. kind of weird, but if you check the tar files, the two are very different. so if you see it like those two are different libs i think its correct... duno.
Hmm. It looks like I made a typo in my post #10 about the package number and consequently you are using a different version of libtorrent-rasterbar than I am. But yes, if I go to the about screen in Deluge, it says it is using libtorrent version 0.16.3.0, which is my version of rasterbar.

Still, If it were only using the reasterbar version, then I would think it should function with only that version built in. But as I said in my post #10, it does not. It seems to want be built with some libtorrent and then have libtorrent-rasterbar as a standalone package, even though it is not listed as a dependency. That is what I am not really understanding.
 
Old 09-02-2013, 06:08 PM   #15
cisneros
Member
 
Registered: Jul 2012
Distribution: Slackware
Posts: 95

Rep: Reputation: 5
Quote:
Originally Posted by Miranden View Post
Hmm. It looks like I made a typo in my post #10 about the package number and consequently you are using a different version of libtorrent-rasterbar than I am. But yes, if I go to the about screen in Deluge, it says it is using libtorrent version 0.16.3.0, which is my version of rasterbar.

Still, If it were only using the reasterbar version, then I would think it should function with only that version built in. But as I said in my post #10, it does not. It seems to want be built with some libtorrent and then have libtorrent-rasterbar as a standalone package, even though it is not listed as a dependency. That is what I am not really understanding.
yes, it is indeed weird, maybe the slackbuild just need to be updated.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Error building Deluge with Slackbuild Miranden Slackware 10 08-29-2013 09:22 AM
Kernel error - Error in starting splunk forwarder in linux machine sumanth89 Linux - Newbie 1 03-19-2013 09:49 AM
[SOLVED] Deluge error. TheShadowFog Slackware 2 02-10-2012 02:44 PM
Deluge Won't Start - Keep Getting An Error taurusx5 Linux - Software 1 08-03-2008 10:31 AM
Problem compiling Deluge (gcc error) Rehumanize Linux - Software 7 03-17-2008 03:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration