The latest version of Calibre available in the Raspbian (Wheezy) repositories for Raspberry Pi is 0.85, which has some bugs and lacks some features for my use case (a digital sheet music display for a grand piano). So I have been working on building the latest version of Calibre from source.
I was able to satisfy nearly all the dependencies by using libraries already available in the RasPi repositories, with the notable exception of ICU--I downloaded source for ICUv49 and built it successfully (at least no errors reported in make or installation).
However compilation of Calibre fails after the extensions are compiled with an error related to ICU:
Code:
pi@BaldwinR1 ~/opt/calibre_source/calibre $ python setup.py install --prefix=/home/pi/opt
*
* Running build
*
####### Building calibre style #######
make: Nothing to be done for `first'.
####### Building extension hunspell #######
####### Building extension _regex #######
####### Building extension speedup #######
####### Building extension html #######
####### Building extension tokenizer #######
####### Building extension _patiencediff_c #######
####### Building extension icu #######
####### Building extension sqlite_custom #######
####### Building extension chmlib #######
####### Building extension chm_extra #######
####### Building extension magick #######
####### Building extension lzx #######
####### Building extension freetype #######
####### Building extension woff #######
####### Building extension msdes #######
####### Building extension cPalmdoc #######
####### Building extension bzzdec #######
####### Building extension matcher #######
####### Building extension podofo #######
####### Building extension pictureflow #######
####### Building extension progress_indicator #######
####### Building extension unrar #######
####### Building extension libusb #######
####### Building extension libmtp #######
*
* Running gui
*
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/pi/opt/calibre_source/calibre/setup/__init__.py", line 181, in run_all
self.run_cmd(self, opts)
File "/home/pi/opt/calibre_source/calibre/setup/__init__.py", line 175, in run_cmd
self.run_cmd(scmd, opts)
File "/home/pi/opt/calibre_source/calibre/setup/__init__.py", line 178, in run_cmd
cmd.run(opts)
File "/home/pi/opt/calibre_source/calibre/setup/gui.py", line 41, in run
self.build_forms(summary=opts.summary)
File "/home/pi/opt/calibre_source/calibre/setup/gui.py", line 63, in build_forms
from calibre.gui2 import build_forms
File "/home/pi/opt/calibre_source/calibre/src/calibre/__init__.py", line 21, in <module>
from calibre.startup import winutil, winutilerror
File "/home/pi/opt/calibre_source/calibre/src/calibre/startup.py", line 178, in <module>
from calibre.utils.icu import title_case, lower as icu_lower, upper as icu_upper
File "/home/pi/opt/calibre_source/calibre/src/calibre/utils/icu.py", line 28, in <module>
raise RuntimeError('Failed to load icu with error: %s' % err)
RuntimeError: Failed to load icu with error: /home/pi/opt/calibre_source/calibre/src/calibre/plugins/icu.so: undefined symbol: usearch_first
/home/pi/opt/calibre_source/calibre/src/calibre/ptempfile.py:27: RuntimeWarning: Parent module 'calibre' not found while handling absolute import
import shutil
pi@BaldwinR1 ~/opt/calibre_source/calibre $ locate icu.so
/home/pi/opt/calibre_source/calibre/src/calibre/plugins/icu.so
/usr/lib/calibre/calibre/plugins/icu.so
As you can see from the results of the locate command, icu.so does exist in the calibre source tree and plugins folder, but the make routine is unhappy with it for reasons I don't understand.
Any suggestions about how to fix this?