Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-22-2011, 03:44 PM   #1
sbdmmg
Junior Member
sbdmmg began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2011
Device: kindle
Assertion `image_info->signature == 0xabacadabUL' failed.

Hello,

I am trying calibre on my laptop (calibre 0.7.46 on Linux 2.6.35-gentoo-r12, Python 2.6.6, gcc 4.4.4). I installed its binaries using

Code:
$ sudo python -c "import urllib2; exec urllib2.urlopen('http://status.calibre-ebook.com/linux_installer').read(); main()"
I can start it and see the "Calibre quick start guide", but when I try to convert even a simple "Lorem ipsum" html file to another format (e.g. epub or mobi) I get the following error:

Code:
$ ebook-convert foo.html foo.epub
1% Converting input to HTML...
InputFormatPlugin: HTML Input running
<...>
67% Creating EPUB Output
        Looking for large trees in foo.html...
        No large trees found
Generating default cover
ebook-convert: coders/png.c:2825: ReadPNGImage: Assertion `image_info->signature == 0xabacadabUL' failed.
/usr/bin/ebook-convert: line 9:  1557 Aborted                 $base/bin/ebook-convert "$@"
This does not happen when I add the option "--no-default-epub-cover".
However, any image which is present in the original html seems to trigger this crash.

Thanks for any suggestion you might have, and thank you for writing calibre!
Cheers,

davide
sbdmmg is offline   Reply With Quote
Old 02-22-2011, 03:51 PM   #2
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Does this happen with any document containing images? What format are the images in?
Manichean is offline   Reply With Quote
Advert
Old 02-22-2011, 04:13 PM   #3
sbdmmg
Junior Member
sbdmmg began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2011
Device: kindle
Hello,

it happens even with documents without any image (for example foo.html, attached); the generation of the default cover (which is performed when I don't specify "--no-default-epub-cover") is enough to trigger the problem.
Including an image in the html is just another way in which I can reproduce the crash; I am attaching one of the images that I used to reproduce this issue, but I don't think that the problem is due to this specific file.

Thanks,

davide
Attached Images
 
Attached Files
File Type: txt foo.html.txt (968 Bytes, 349 views)
sbdmmg is offline   Reply With Quote
Old 02-22-2011, 04:33 PM   #4
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
This is one for the devs, I think.
Manichean is offline   Reply With Quote
Old 02-22-2011, 05:09 PM   #5
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,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You have some sort of library conflict on your system that is breaking ImageMagick.

I suggest running with

LD_DEBUG=libs and making sure that png.so and libpng are being loaded from /opt/calibre

And/or try the the calibre ebuild
kovidgoyal is offline   Reply With Quote
Advert
Old 02-22-2011, 10:22 PM   #6
sbdmmg
Junior Member
sbdmmg began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2011
Device: kindle
Thanks for your suggestion.
I tried both the ebuild too; unfortunately that doesn't get to the end of the installation, and for this reason I was trying the binary installation.

Indeed there seems to be an issue with the image magick libraries. I tried to work around this by setting LD_LIBRARY_PATH, but it looks like some of the libraries are still being picked up from the system. (I installed calibre in /usr/local/calibre/calibre/)

Code:
$ export LD_LIBRARY_PATH=/usr/local/calibre/calibre/lib:/usr/local/calibre/calibre/lib/ImageMagick/modules-Q16/coders/
$ LD_DEBUG=libs ebook-convert foo.html foo.epub

<...a lot of libraries being loaded from /usr/local/calibre...>

     21083:
        Looking for large trees in foo.html...
        No large trees found
Generating default cover
     21083:     find library=liblcms2.so.2 [0]; searching
     21083:      search path=/usr/local/calibre/calibre/lib:/usr/local/calibre/calibre/lib/ImageMagick/modules-Q16/coders               (LD_LIBRARY_PATH)
     21083:       trying file=/usr/local/calibre/calibre/lib/liblcms2.so.2
     21083:
     21083:     find library=libtiff.so.3 [0]; searching
     21083:      search path=/usr/local/calibre/calibre/lib:/usr/local/calibre/calibre/lib/ImageMagick/modules-Q16/coders               (LD_LIBRARY_PATH)
     21083:       trying file=/usr/local/calibre/calibre/lib/libtiff.so.3
     21083:       trying file=/usr/local/calibre/calibre/lib/ImageMagick/modules-Q16/coders/libtiff.so.3
     21083:      search cache=/etc/ld.so.cache
     21083:       trying file=/usr/lib/libtiff.so.3
     21083:
     21083:
     21083:     calling init: /usr/lib/libtiff.so.3
     21083:
     21083:
     21083:     calling init: /usr/local/calibre/calibre/lib/liblcms2.so.2
     21083:
     21083:
     21083:     calling init: /usr/lib/ImageMagick-6.6.5/modules-Q16/coders/png.so
     21083:
     21083:     /usr/lib/ImageMagick-6.6.5/modules-Q16/coders/png.so: error: symbol lookup error: undefined symbol: png_LTX_RegisterPNGImage (fatal)
     21083:     /usr/lib/ImageMagick-6.6.5/modules-Q16/coders/png.so: error: symbol lookup error: undefined symbol: png_LTX_UnregisterPNGImage (fatal)
ebook-convert: coders/png.c:2825: ReadPNGImage: Assertion `image_info->signature == 0xabacadabUL' failed.
/usr/bin/ebook-convert: line 9: 21083 Aborted                 $base/bin/ebook-convert "$@"
     21080:
     21080:     calling fini: /bin/sh [0]
     21080:
     21080:
     21080:     calling fini: /lib/libncurses.so.5 [0]
     21080:
     21080:
     21080:     calling fini: /lib/libdl.so.2 [0]
     21080:
     21080:
     21080:     calling fini: /lib/libc.so.6 [0]
Thanks for any suggestion you may have.
sbdmmg is offline   Reply With Quote
Old 02-22-2011, 10:31 PM   #7
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,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
See http://www.imagemagick.org/script/resources.php for environment variables to control how image magick is loaded
kovidgoyal is offline   Reply With Quote
Old 02-23-2011, 12:53 AM   #8
sbdmmg
Junior Member
sbdmmg began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2011
Device: kindle
Thanks a lot.
I see that the library causing the crash seems to be png.so, so I tried to point both MAGICK_CODER_FILTER_PATH and MAGICK_CODER_MODULE_PATH to the directory containing this file.
Unfortunately I must be doing something wrong, since the error is still there.

Code:
$ find /usr/local/calibre/ -name png.so
/usr/local/calibre/calibre/lib/ImageMagick/modules-Q16/coders/png.so
$ echo $MAGICK_CODER_FILTER_PATH 
/usr/local/calibre/calibre/lib/ImageMagick/modules-Q16/filters/:/usr/local/calibre/calibre/lib/ImageMagick/modules-Q16/coders/
$ echo $MAGICK_CODER_MODULE_PATH
/usr/local/calibre/calibre/lib/ImageMagick/modules-Q16/filters/:/usr/local/calibre/calibre/lib/ImageMagick/modules-Q16/coders/
I am not an ImageMagick expert, and this binary installation seems to be as hard as the ebuild...maybe I should try to go back to the ebuild and see if I can get that to work.
Thanks for any suggestion.
sbdmmg is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No signature sabredog Feedback 1 01-03-2011 10:37 PM
Using the signature Just4kix Writers' Corner 5 10-04-2010 03:08 PM
How to do a signature terraskye Feedback 5 09-29-2010 12:09 PM
Signature? Rique Feedback 24 06-01-2009 02:33 PM


All times are GMT -4. The time now is 03:02 PM.


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