Mobileread
Having problems building calibre 0.15.4
#1  angevin 06-11-2009, 04:56 PM
Calibre version 0.5.14 won't build on my 64 bit linux distribution. See below please :


Quote
<command prompt>: python setup.py build && sudo python setup.py install

Setup calibre version: 0.5.14
/usr/lib64/python2.6/site-packages/Pyrex/Compiler/Errors.py:17: DeprecationWarni
ng: BaseException.message has been deprecated as of Python 2.6
self.message = message
running build
running resources
WARNING: Could not find Qt transations
Compiling resources...
running translations
Compiling translations...
Compiling ar
Compiling bg
Compiling ca
Compiling cs
Compiling da
Compiling de
Compiling el
Compiling es
Compiling fr
Compiling gl
Compiling he
Compiling hr
Compiling hu
Compiling it
Compiling ja
Compiling nb
Compiling nds
Compiling nl
Compiling pl
Compiling pt
Compiling ro
Compiling ru
Compiling sk
Compiling sl
Compiling sv
Compiling te
Compiling uk
Compiling zh
running gui
Segmentation fault
Second try (more terse error output from stderr this time ):

Quote
python setup.py build && sudo python setup.py install
Setup calibre version: 0.5.14
/usr/lib64/python2.6/site-packages/Pyrex/Compiler/Errors.py:17: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
self.message = message
running build
running resources
WARNING: Could not find Qt transations
Resources are up to date
running translations
Translations up to date
running gui
Segmentation fault

Reply 

#2  kovidgoyal 06-11-2009, 05:34 PM
Try the following in the calibre directory:

rm -rf build/* src/calibre/plugins/* && python setup.py build_ext

If that completes successfully, then try the build and install steps
Reply 

#3  angevin 06-11-2009, 05:54 PM
Quote kovidgoyal
Try the following in the calibre directory:

rm -rf build/* src/calibre/plugins/* && python setup.py build_ext

If that completes successfully, then try the build and install steps

The command does not complete successfully and since you did not ask for the possible error output from the command you just asked me to use I won't post the error messages in this post. Actually, I should state that I'm using slackware-current 64 bit linux which is not a stable release so it could possibly be the fault of the linux distro I'm using and not the fault of calibre I suppose (or it could be my fault by possibly not compiling the dependency packages with the right configuration options) . Only reason why I'm using the -current tag release is because slackware 12.2 does not have 64 bit support only the next release of slackware will support 64 bit processors. Although not a stable official release so far slackware-current has given no other problems besides this (seems to be pretty stable to me so far overall).

image »
Reply 

#4  kovidgoyal 06-11-2009, 05:56 PM
I do need the error output
Reply 

#5  angevin 06-11-2009, 06:17 PM
Quote kovidgoyal
I do need the error output
Quote
rm -rf build/* src/calibre/plugins/* && python setup.py build_ext
Setup calibre version: 0.5.14
/usr/lib64/python2.6/site-packages/Pyrex/Compiler/Errors.py:17: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
self.message = message
running build_ext
building 'calibre.plugins.podofo' extension
creating build/temp.linux-x86_64-2.6/src
creating build/temp.linux-x86_64-2.6/src/calibre
creating build/temp.linux-x86_64-2.6/src/calibre/utils
creating build/temp.linux-x86_64-2.6/src/calibre/utils/podofo
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/podofo -I/usr/include/python2.6 -c src/calibre/utils/podofo/podofo.cpp -o build/temp.linux-x86_64-2.6/src/calibre/utils/podofo/podofo.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
src/calibre/utils/podofo/podofo.cpp:268: warning: deprecated conversion from string constant to 'char*'
src/calibre/utils/podofo/podofo.cpp:268: warning: deprecated conversion from string constant to 'char*'
src/calibre/utils/podofo/podofo.cpp:268: warning: deprecated conversion from string constant to 'char*'
src/calibre/utils/podofo/podofo.cpp:268: warning: deprecated conversion from string constant to 'char*'
src/calibre/utils/podofo/podofo.cpp:268: warning: deprecated conversion from string constant to 'char*'
src/calibre/utils/podofo/podofo.cpp:268: warning: deprecated conversion from string constant to 'char*'
src/calibre/utils/podofo/podofo.cpp:268: warning: deprecated conversion from string constant to 'char*'
src/calibre/utils/podofo/podofo.cpp:268: warning: deprecated conversion from string constant to 'char*'
src/calibre/utils/podofo/podofo.cpp:268: warning: deprecated conversion from string constant to 'char*'
src/calibre/utils/podofo/podofo.cpp:268: warning: deprecated conversion from string constant to 'char*'
src/calibre/utils/podofo/podofo.cpp:268: warning: deprecated conversion from string constant to 'char*'
src/calibre/utils/podofo/podofo.cpp:268: warning: deprecated conversion from string constant to 'char*'
g++ -pthread -shared build/temp.linux-x86_64-2.6/src/calibre/utils/podofo/podofo.o -L/usr/lib -L/usr/lib64 -lpodofo -lpython2.6 -o src/calibre/plugins/podofo.so
/usr/lib64/gcc/x86_64-slackware-linux/4.3.3/../../../../x86_64-slackware-linux/bin/ld: /usr/lib/libpodofo.a(PdfDataType.o): relocation R_X86_64_32S against `vtable for PoDoFo::PdfDataType' can not be used when making a shared object; recompile with -fPIC
/usr/lib/libpodofo.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1
Also, I edited my previous post several times so I may have added something you missed the first time you read it e.g. I'm using slackware-current. So you might perhaps want to reread my previous post as well.
Reply 

#6  kovidgoyal 06-11-2009, 06:43 PM
Basically your distro does not include podofo compiled as a shared library, so calibre is failing to compile the podofo extension. You can prevent calibre from trying to compile podofo (which will disable various PDf functionality) by seting the PODOFO_INC_DIR environment variable to /dev/null
Reply 

#7  angevin 06-11-2009, 06:55 PM
Quote kovidgoyal
Basically your distro does not include podofo compiled as a shared library, so calibre is failing to compile the podofo extension. You can prevent calibre from trying to compile podofo (which will disable various PDf functionality) by seting the PODOFO_INC_DIR environment variable to /dev/null
Alright thanks for the information. At least now that I know what is the problem for certain I can try various different strategies for fixing the problem until I get it to work. So I probably won't be needing your help anymore in this thread unless a totally unrelated issue pops up after I fix this issue. Thanks again.

Reply 

#8  angevin 06-12-2009, 05:05 PM
Hello again Kovid :

I fixed the podofo problem but now I ran into another problem :

Quote
................................ g++ -m64 -Wl,-O1 -Wl,-rpath,/usr/lib64/qt/lib -shared -Wl,-soname,libpictureflow.so.1 -o libpictureflow.so.1.0.0 pictureflow.o moc_pictureflow.o -L/usr/lib64/qt/lib -lQtGui -L/usr/lib64/qt/lib -L/usr/X11R6/lib64 -pthread -lpng -lfreetype -lgobject-2.0 -lSM -lICE -pthread -pthread -lXrender -lfontconfig -lXext -lX11 -lQtCore -lz -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -ldl -lpthread
ln -s libpictureflow.so.1.0.0 libpictureflow.so
ln -s libpictureflow.so.1.0.0 libpictureflow.so.1
ln -s libpictureflow.so.1.0.0 libpictureflow.so.1.0
Building sbf...
/usr/bin/sip -c /usr/local/calibre-0.5.14/build/temp.linux-x86_64-2.6/calibre.plugins.pictureflow -b /usr/local/calibre-0.5.14/build/temp.linux-x86_64-2.6/calibre.plugins.pictureflow/pictureflow.sbf -I /usr/share/sip/PyQt4 -x VendorID -t WS_X11 -x PyQt_NoPrintRangeBug -t Qt_4_4_1 -g src/calibre/gui2/pictureflow/pictureflow.sip
sip: /usr/share/sip/PyQt4/QtCore/QtCoremod.sip:115: syntax error
error: command '/usr/bin/sip' failed with exit status 1
Any ideas ? I guess exit status 1 indicates a mismatch or something ? I'm not an expert at reading compilation and configuration error messages yet unfortunately for me.


P.S.

Also I don't know how likely it is someone else will run into the podofo problem I did but I fixed it by configuring it with this configuration command before compilation :

cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/podofo" -DWANT_LIB64:BOOL=TRUE -DPODOFO_BUILD_SHARED:BOOL=TRUE -DPODOFO_BUILD_STATIC:BOOL=TRUE
Reply 

#9  kovidgoyal 06-12-2009, 05:35 PM
What version of sip do you have?

calibre needs atleast sip v4.8

sip -V
Reply 

#10  angevin 06-12-2009, 05:41 PM
Quote kovidgoyal
What version of sip do you have?

calibre needs atleast sip v4.8

sip -V
I'm pretty sure I installed all the dependency packages for calibre all with => version numbers. Anyway :

SIP version : 4.8.1-snapshot-20090611

PyQt-4.4.4

Maybe it was stupid of me to install a snapshot instead of a regular version release since I'm not a developer ? Actually I would have installed a stable version normally but the setuptools package script easy_install pointed to a mirror with the snapshot instead of a stable release of SIP so it might not be my own stupidity or at least not entirely my own stupidity if that is actually the problem here.
Reply 

  Next »  Last »  (1/2)
Today's Posts | Search this Thread | Login | Register