Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 12-26-2014, 12:53 PM   #1
Raimond
Member
Raimond began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Nov 2010
Device: Sony PRS-600, Kindle Paperwhite
Strange compiling error @ odroid

Hi @ all,

I'm trying to get calibre running on an odroid board (running ubuntu 14.04LTS)

All dependencies are installed and working correctly (as far as I was able to test it).

Running the command
Code:
sudo python setup.py install
(command according to calibre website)
leads to the following error (no compilation, the error occures directly)
Code:
Traceback (most recent call last):
  File "setup.py", line 13, in <module>
    import setup.commands as commands
  File "/home/odroid/Documents/calibre-2.14.0/setup/commands.py", line 28, in <module>
    from setup.translations import POT, GetTranslations, Translations, ISO639, ISO3166
  File "/home/odroid/Documents/calibre-2.14.0/setup/translations.py", line 14, in <module>
    from setup.parallel_build import parallel_check_output
  File "/home/odroid/Documents/calibre-2.14.0/setup/parallel_build.py", line 13, in <module>
    from setup.build_environment import cpu_count
  File "/home/odroid/Documents/calibre-2.14.0/setup/build_environment.py", line 84, in <module>
    qraw = subprocess.check_output([QMAKE, '-query']).decode('utf-8')
  File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
But running the command without sudo strangely compiles all of calibre.

Of course the whole thing breaks at the end when calibre tries to install the created files into the system:

Code:
Installing binary: /usr/bin/ebook-device
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 "/home/odroid/Documents/calibre-2.14.0/setup/__init__.py", line 181, in run_all
    self.run_cmd(self, opts)
  File "/home/odroid/Documents/calibre-2.14.0/setup/__init__.py", line 178, in run_cmd
    cmd.run(opts)
  File "/home/odroid/Documents/calibre-2.14.0/setup/install.py", line 135, in run
    self.write_templates()
  File "/home/odroid/Documents/calibre-2.14.0/setup/install.py", line 168, in write_templates
    self.write_template(name, mod, func)
  File "/home/odroid/Documents/calibre-2.14.0/setup/install.py", line 190, in write_template
    open(path, 'wb').write(script)
IOError: [Errno 13] Permission denied: '/usr/bin/ebook-device'
Running the command with sudo leads to the same error as before.

Any hint for solving this problem?
It sounds very strange for me that the whole system breaks when i use sudo.

(Until now I didn't want to try it with "sudo su").
A possible workaround would be of course to copy the files manually, but that's not realy a nice way...


Rai
Raimond is offline   Reply With Quote
Old 12-26-2014, 02:26 PM   #2
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,160
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
What python level? The web site calls for
Quote:
Make sure your system has python ≥ 2.7.1 not 3.x
PeterT is offline   Reply With Quote
Advert
Old 12-26-2014, 04:31 PM   #3
Raimond
Member
Raimond began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Nov 2010
Device: Sony PRS-600, Kindle Paperwhite
Hi Peter,

thanks for your reply. Python version is 2.7.6 out of the box.

The problem was the build QT version. I set the path variable to include the directory, but sudo doesn't preserve it.

Fixed by calling it this way:
Code:
sudo env "PATH=$PATH" python setup.py install
Building calibre works now, only two warnings left that I'll check tomorrow:

Code:
____________________ WARNING ____________________
Setting up completion failed with error:
__________________________________________________
        Traceback (most recent call last):
          File "/home/odroid/Documents/calibre-2.14.0/src/calibre/linux.py", line 746, in setup_completion
            write_completion(bash_comp_dest, zsh)
          File "/home/odroid/Documents/calibre-2.14.0/src/calibre/linux.py", line 504, in write_completion
            from calibre.gui2.viewer.main import option_parser as viewer_op
          File "/home/odroid/Documents/calibre-2.14.0/src/calibre/gui2/viewer/main.py", line 12, in <module>
            from calibre.gui2.viewer.ui import Main as MainWindow
          File "/home/odroid/Documents/calibre-2.14.0/src/calibre/gui2/viewer/ui.py", line 12, in <module>
            from PyQt5.Qt import (
        ImportError: cannot import name QWebView

Setting up desktop integration...

____________________ WARNING ____________________
Setting up desktop integration failed with error:
__________________________________________________
        Traceback (most recent call last):
          File "/home/odroid/Documents/calibre-2.14.0/src/calibre/linux.py", line 816, in setup_desktop_integration
            from calibre.ebooks.oeb.polish.main import SUPPORTED
          File "/home/odroid/Documents/calibre-2.14.0/src/calibre/ebooks/oeb/polish/main.py", line 15, in <module>
            from calibre.ebooks.oeb.polish.stats import StatsCollector
          File "/home/odroid/Documents/calibre-2.14.0/src/calibre/ebooks/oeb/polish/stats.py", line 18, in <module>
            from PyQt5.QtWebKitWidgets import QWebPage, QWebView
        ImportError: No module named QtWebKitWidgets

Creating un-installer: /usr/bin/calibre-uninstall
Installing calibre environment module: /usr/lib/python2.7/dist-packages/init_calibre.py
But I think I know the cause of this problem.... I've used
Code:
perl init-repository --no-webkit
maybe that wasn't a good idea....

gn8 & thanks
Rai
Raimond is offline   Reply With Quote
Old 12-26-2014, 09:57 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre needs Qt WebKit
kovidgoyal is offline   Reply With Quote
Old 09-25-2015, 01:15 PM   #5
Raimond
Member
Raimond began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Nov 2010
Device: Sony PRS-600, Kindle Paperwhite
Ok, I'm back...

I've updated to ubuntu 15.04 which also solves the new python 2.7.9 dependency.

All other dependencies should be installed correctly (SIP 4.16.9, pyQT 5.4.1, QT 5.4.1)

When compiling calibre(2.38) I get the following error:

Code:
File "setup.py", line 13, in <module>
    import setup.commands as commands
  File "/home/odroid/Downloads/calibre-2.38.0/setup/commands.py", line 28, in <module>
    from setup.translations import POT, GetTranslations, Translations, ISO639, ISO3166
  File "/home/odroid/Downloads/calibre-2.38.0/setup/translations.py", line 14, in <module>
    from setup.parallel_build import parallel_check_output
  File "/home/odroid/Downloads/calibre-2.38.0/setup/parallel_build.py", line 14, in <module>
    from setup.build_environment import cpu_count
  File "/home/odroid/Downloads/calibre-2.38.0/setup/build_environment.py", line 107, in <module>
    glib_flags = subprocess.check_output([PKGCONFIG, '--libs', 'glib-2.0']).strip() if islinux else ''
  File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
AttributeError: 'NoneType' object has no attribute 'rfind'
I've spend the last hours on google but couldn't find a solution.

Maybe someone here could help?

Btw: what was the last version of calibre with python 2.7.1?

Rai
Raimond is offline   Reply With Quote
Advert
Old 09-25-2015, 01:23 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That error means there is no pkg-config on your system.
kovidgoyal is offline   Reply With Quote
Old 09-26-2015, 07:33 AM   #7
Raimond
Member
Raimond began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Nov 2010
Device: Sony PRS-600, Kindle Paperwhite
Hi Kovid,

Thanks for your help, compiling calibre (finally) works on 15.04.

If someone else wants to do it, these packages were also needed:
pkg-config
libgtk2.0-dev
libssl-dev
libsqlite3-dev
libmagickwand-dev

Rai
Raimond is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error when compiling hello.cpp for PW2 Bael Balzac Kindle Developer's Corner 7 08-25-2014 08:36 AM
Compiling QT Error koenieee Kobo Developer's Corner 15 05-25-2013 10:00 AM
error compiling iomari Devices 1 04-15-2013 10:14 PM
Error compiling update to 0.9.21 iomari Calibre 3 03-06-2013 08:47 AM
error while compiling calibre under fedora... samy2 Calibre 3 05-21-2011 01:01 PM


All times are GMT -4. The time now is 12:17 AM.


MobileRead.com is a privately owned, operated and funded community.