12-26-2009, 11:43 AM | #1 |
Addict
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
|
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 Martin Environment: Macports auf OS X 10.6.2 |
12-26-2009, 01:38 PM | #2 |
creator of calibre
Posts: 44,351
Karma: 23661992
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 |
Advert | |
|
12-27-2009, 03:57 AM | #3 |
Addict
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 Is there a way to influence the architecture? Last edited by krischik; 12-27-2009 at 04:00 AM. Reason: Add linker error output |
12-27-2009, 07:24 AM | #4 |
Addict
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
|
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. 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 Martin |
12-27-2009, 11:26 AM | #5 |
Addict
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. |
Advert | |
|
12-27-2009, 11:49 AM | #6 |
creator of calibre
Posts: 44,351
Karma: 23661992
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 |
12-28-2009, 03:07 AM | #7 |
Addict
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
|
It does not work after all.
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 |
12-28-2009, 10:19 AM | #8 |
creator of calibre
Posts: 44,351
Karma: 23661992
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.
|
06-04-2010, 08:17 AM | #9 |
Member
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. |
|
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 |