Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-26-2009, 11:43 AM   #1
krischik
Addict
krischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheese
 
krischik's Avatar
 
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
Unhappy Compile from Source

I just tried to compile calibre from source but I don't get very far:

Code:
>python setup.py --help               
Traceback (most recent call last):
  File "setup.py", line 13, in <module>
    import setup.commands as commands
  File "/opt/local/var/macports/build/_Volumes_Work_MacPorts_dports_ebook_calibre/work/calibre/setup/commands.py", line 28, in <module>
    from setup.translations import POT, GetTranslations, Translations, ISO639
  File "/opt/local/var/macports/build/_Volumes_Work_MacPorts_dports_ebook_calibre/work/calibre/setup/translations.py", line 14, in <module>
    from setup.build_environment import pyqt
  File "/opt/local/var/macports/build/_Volumes_Work_MacPorts_dports_ebook_calibre/work/calibre/setup/build_environment.py", line 124, in <module>
    popplerqt4_inc_dirs = poppler_inc_dirs + [poppler_inc_dirs[0]+'/qt4']
IndexError: list index out of range
If I can't even read the help page than things look bleak indeed. I guess there is a python module missing - but which one.

Martin

Environment: Macports auf OS X 10.6.2
krischik is offline   Reply With Quote
Old 12-26-2009, 01:38 PM   #2
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: 24,768
Karma: 4369667
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That error indicates that the build system could not find the include directory containing the headers for POPPLER. Try setting the POPPLER_INC_DIR variable to something like

/sw/build/poppler-0.12.2/poppler:/sw/build/poppler-0.12.2
kovidgoyal is offline   Reply With Quote
 
Enthusiast
Old 12-27-2009, 03:57 AM   #3
krischik
Addict
krischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheese
 
krischik's Avatar
 
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
Thanks for the help. It worked nicely. However now I just noticed "-arch x86_64 -arch ppc64". This is not very helpful for SnowLeopard. For once universal compile on SnowLeopard is now "-arch x86_64 -arch i386" - ppc libs are not supplied any longer:

Code:
ld: warning: in /opt/local/lib/libpoppler.dylib, missing required architecture ppc64 in file
ld: warning: in /opt/local/lib/libMagickWand.dylib, file is not of required architecture
ld: warning: in /opt/local/lib/libMagickCore.dylib, file is not of required architecture
ld: warning: in /opt/local/lib/libpng12.dylib, missing required architecture ppc64 in file
And then for MacPorts there is not real reason to create a universal application (that's unlike a universal lib) unless the users explicitly requests so.



Is there a way to influence the architecture?

Last edited by krischik; 12-27-2009 at 04:00 AM. Reason: Add linker error output
krischik is offline   Reply With Quote
Old 12-27-2009, 07:24 AM   #4
krischik
Addict
krischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheese
 
krischik's Avatar
 
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
Question

Quote:
Originally Posted by krischik View Post
Is there a way to influence the architecture?
Ok, I got the build files patched. However now I get:

Code:
>python setup.py install --prefix=/tmp/calibre

Setting up a source based development environment is only supported on linux. On other platforms, see the User Manual for help with setting up a development environment.
So no standard installation for OS X. Next try:

Code:
>python setup.py osx   

*
* Running osx32
*

/bin/sh: /etc/init.d/vmware: No such file or directory
/bin/sh: /etc/init.d/vmware: No such file or directory
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 "/opt/local/var/macports/build/_Volumes_Work_MacPorts_dports_ebook_calibre/work/calibre/setup/__init__.py", line 158, in run_all
    self.run_cmd(self, opts)
  File "/opt/local/var/macports/build/_Volumes_Work_MacPorts_dports_ebook_calibre/work/calibre/setup/__init__.py", line 151, in run_cmd
    self.run_cmd(scmd, opts)
  File "/opt/local/var/macports/build/_Volumes_Work_MacPorts_dports_ebook_calibre/work/calibre/setup/__init__.py", line 154, in run_cmd
    cmd.run(opts)
  File "/opt/local/var/macports/build/_Volumes_Work_MacPorts_dports_ebook_calibre/work/calibre/setup/installer/__init__.py", line 114, in run
    self.start_vm()
  File "/opt/local/var/macports/build/_Volumes_Work_MacPorts_dports_ebook_calibre/work/calibre/setup/installer/__init__.py", line 90, in start_vm
    self.run_vm()
  File "/opt/local/var/macports/build/_Volumes_Work_MacPorts_dports_ebook_calibre/work/calibre/setup/installer/__init__.py", line 86, in run_vm
    self.__p = subprocess.Popen([self.vm])
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 621, in __init__
    errread, errwrite)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1126, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
That look like a very special set-up which is close to impossible to replicate.

Martin
krischik is offline   Reply With Quote
Old 12-27-2009, 11:26 AM   #5
krischik
Addict
krischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheese
 
krischik's Avatar
 
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
Hi,

I am a litte further now. I guess OSX-freeze might do the trick. Only: where the heck did you get that libunrar from? Shure google gives tons of hits but I just can't find the master side.

Martin

Last edited by krischik; 12-27-2009 at 11:38 AM.
krischik is offline   Reply With Quote
Old 12-27-2009, 11:49 AM   #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: 24,768
Karma: 4369667
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
osx-freeze should be what you need to create a .app

I compiled libunrar from source when compiling from source you have to set the SILENT define otherwise it wont work with calibre

http://www.rarlab.com/rar_add.htm
kovidgoyal is offline   Reply With Quote
Old 12-28-2009, 03:07 AM   #7
krischik
Addict
krischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheese
 
krischik's Avatar
 
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
Unhappy It does not work after all.

Quote:
Originally Posted by kovidgoyal View Post
osx-freeze should be what you need to create a .app
Indeed. Only the amount of /Volumes/sw and /Users/kovid in setup/installer/osx/freeze.py makes me think that creating an application on anything but your computer is close to impossible.

One really would need a 2nd (simpler) freeze command - which without all the hardcoded copy-commands - which aren't really needed for locally compiled version anyway.

Martin
krischik is offline   Reply With Quote
Old 12-28-2009, 10:19 AM   #8
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: 24,768
Karma: 4369667
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Feel free to write one The hard part is getting the C extensions built if you've done that, you should actually just be able to patch the setup/install.py to remove the linux check and it will do the rest for you.
kovidgoyal is offline   Reply With Quote
Old 06-04-2010, 08:17 AM   #9
marcot
Member
marcot began at the beginning.
 
Posts: 10
Karma: 10
Join Date: May 2010
Device: iPod Touch
Has anyone had any luck building an app? I would try to write an install.py or a machine-independent version of freeze.py myself, but I am relatively new to python.

Last edited by marcot; 06-04-2010 at 08:19 AM.
marcot is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compile for Kindle DX? cdisou Kindle Developer's Corner 5 10-22-2011 07:30 AM
Who can compile a .c program for me? owl123 Workshop 14 04-19-2009 04:26 AM
iLiad Anyone able to compile liberregxml? Adam B. iRex Developer's Corner 11 10-27-2008 07:08 PM
Calibre compile error JeffElkins Calibre 6 10-24-2008 06:59 PM
iLiad Trying to compile xvnc viewer Mythago iRex Developer's Corner 3 03-27-2007 04:20 PM


All times are GMT -4. The time now is 03:00 AM.


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