Page 1 of 2

[Solved] Problem installing calibre

Posted: 28. Apr 2011, 15:32
by f.bluedevil
When attempting to install calibre I get the following output:

Code: Select all

Traceback (most recent call last):
  File "setup.py", line 13, in <module>
    import setup.commands as commands
  File "/usr/src/slapt-src/office/calibre/calibre/setup/commands.py", line 28, in <module>
    from setup.translations import POT, GetTranslations, Translations, ISO639
  File "/usr/src/slapt-src/office/calibre/calibre/setup/translations.py", line 14, in <module>
    from setup.build_environment import pyqt
  File "/usr/src/slapt-src/office/calibre/calibre/setup/build_environment.py", line 12, in <module>
    from PyQt4 import pyqtconfig
ImportError: No module named PyQt4
fakeroot -- sh calibre.SlackBuild Failed
I then searched the forum for problems related to calibre and found where gapan listed the following dependencies:
pysetuptools, cssutils, lxml, python-dateutil, BeautifulSoup, mechanize, dnspython, icu4c and Podofo.
I installed all of the packages listed, tried again and received the same output. :cry:

I did a search using slapt-src for PyQt4 and did not get any results. Also, fakeroot is installed.

:?:'s
1) Any suggestions/thoughts as to where I can go from here to install calibre.
2) And, on a side note, how do you go about determining dependencies for slapt-src packages?

Re: Problem installing calibre

Posted: 28. Apr 2011, 16:30
by gapan
You should look for packages with slapt-get/gslapt. If you don't find them there, then look with slapt-src/sourcery.

For SlackBuilds, you determine dependencies by reading the accompanying README files. And by checking any error messages you might get too.

Re: Problem installing calibre

Posted: 29. Apr 2011, 00:00
by f.bluedevil
You should look for packages with slapt-get/gslapt.

I used slapt-src after the slapt-get --search, failed.
For SlackBuilds, you determine dependencies by reading the accompanying README files.
If I run slapt-get or slapt-src --show, I can see a list of files including any README files. However, I don't know how to access the readme file without building the package and in this case the build fails.

Also, in this case the build error states it can't find the module PyQt4. It does not say anything about other dependencies. I assume a build fails at the first dependency problem, after you resolve the first dependency problem, it would then continue past the first dependency point but fail at the next unmet dependency (if one exists) etc.

If, that is the case then reading build errors would appear to be an inefficient way to uncover multiple dependency problems.

So, back to the readme problem. Do I use slapt-get --fetch to download the package and then go find the file and read it? Or, is there a easier way to get to SlackBuild readme files?

Thanks

Re: Problem installing calibre

Posted: 29. Apr 2011, 01:34
by mimosa
http://slackbuild.org/ generally has good information about dependencies. You can search according to both apps and Slackware versions, e.g.

http://slackbuilds.org/repository/13.37/office/calibre/

However, I'm not sure if that would have helped in this particular case.

Also, I'm sure there's an easy way to download the readme file (or whatever) separately

EDIT on that particular page, just scroll down.

Re: Problem installing calibre

Posted: 29. Apr 2011, 02:03
by f.bluedevil
mimosa,

Thanks, I will give slackbuild.org a try but as you said it doesn't seem to be a dependency problem at least not with the dependencies listed.

I did a fetch operation, found the file, and read the 'README', which listed the same dependencies that gapan had posted earlier. I rechecked to see that all the packages were installed and I did find that I had left out one of the packages. Unfortunately when I tried to install calibre again using slapt-src, after having installed the missing package, I received the same error message, again.

Also, if anybody knows of a means to read the 'README' file short of downloading the whole package. It would be helpful.

Many Thanks

Re: Problem installing calibre

Posted: 29. Apr 2011, 05:06
by maximus
The package you're missing is PyQt, which is available in the current/13.37 repo at least. A slapt-get -i pyqt should do the trick. I happened to compile calibre just the other day and ran into the same problem.

Re: Problem installing calibre

Posted: 29. Apr 2011, 05:46
by yves04
The command slapt-get -i PyQt is better
Have a nice day.

Re: Problem installing calibre

Posted: 29. Apr 2011, 07:32
by gapan
f.bluedevil wrote:I used slapt-src after the slapt-get --search, failed.
I'm talking about all packages, including dependencies. In this case, it was obvious that you were looking for something called "PyQt". If you ran slapt-get --search pyqt, you would have found it.

f.bluedevil wrote:If I run slapt-get or slapt-src --show, I can see a list of files including any README files. However, I don't know how to access the readme file without building the package and in this case the build fails.
Don't confuse slapt-get with slapt-src. README files don't matter with slapt-get and are not even a part of a prebuilt package. With slapt-src, they usually include instructions on how to build a package from source using the respective SlackBuild. To view the README file, you can either go to the slackbuilds.org website, or fetch all files with slapt-src and locate the README file /usr/src/slapt-src. There will be an easier way in 13.37, using sourcery.
f.bluedevil wrote:Also, in this case the build error states it can't find the module PyQt4. It does not say anything about other dependencies. I assume a build fails at the first dependency problem, after you resolve the first dependency problem, it would then continue past the first dependency point but fail at the next unmet dependency (if one exists) etc.
Right. That's how you compile software from source.
f.bluedevil wrote:If, that is the case then reading build errors would appear to be an inefficient way to uncover multiple dependency problems.
Reading the README file is certainly more efficient. ;)

Re: Problem installing calibre

Posted: 29. Apr 2011, 12:44
by f.bluedevil
Ok, Gentlemen I am learning a lot, which is a very good thing, :D but I'm still experiencing some issues.

I installed pyqt, it appears my original error was searching for pyqt4 instead of pyqt.

Now when I try to install I get the following message:

Code: Select all

/usr/src/slapt-src/office/calibre/calibre/src/calibre/utils/chm/swig_chm.c: At top level:
/usr/src/slapt-src/office/calibre/calibre/src/calibre/utils/chm/swig_chm.c:681:21: fatal error: chm_lib.h: No such file or directory
compilation terminated.
Traceback (most recent call last):
  File "setup.py", line 99, in <module>
    sys.exit(main())
  File "setup.py", line 85, in main
    command.run_all(opts)
  File "/usr/src/slapt-src/office/calibre/calibre/setup/__init__.py", line 159, in run_all
    self.run_cmd(self, opts)
  File "/usr/src/slapt-src/office/calibre/calibre/setup/__init__.py", line 155, in run_cmd
    cmd.run(opts)
  File "/usr/src/slapt-src/office/calibre/calibre/setup/extensions.py", line 294, in run
    self.build(ext, dest)
  File "/usr/src/slapt-src/office/calibre/calibre/setup/extensions.py", line 335, in build
    subprocess.check_call(cmd)
  File "/usr/lib/python2.6/subprocess.py", line 488, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gcc', '-O3', '-Wall', '-DNDEBUG', '-fno-strict-aliasing', '-pipe', '-fPIC', '-O2', '-march=i486', '-mtune=i686', '-pthread', '-I/usr/include/python2.6', '-DSWIG_COBJECT_TYPES', '-c', '/usr/src/slapt-src/office/calibre/calibre/src/calibre/utils/chm/swig_chm.c', '-o', '/usr/src/slapt-src/office/calibre/calibre/build/objects/chmlib/swig_chm.o']' returned non-zero exit status 1
fakeroot -- sh calibre.SlackBuild Failed
Which to me, looks like it's failing due to a missing a header file 'chm_lib.h'. Although if that is the case, I am not sure why maximus would have succeeded with his build since the error does not appear to be machine dependent.

Or, am I barking up the wrong tree?

Re: Problem installing calibre

Posted: 29. Apr 2011, 12:51
by gapan
slapt-get --search chm