Forum How do I...?

Installing 64 bit Linux generic dynamic version on fedora 20

francus
Installation runs smootly without errors,
But trying to run prince I get the following error:
error while loading shared libraries: libtiff.so.4: cannot open shared object file: No such file or directory

If I try to install libtiff get the following:
Package libtiff-4.0.3-15.fc20.x86_64 already installed and latest version
Nothing to do

Is there a fix?
mikeday
Which Prince package did you install?
francus
prince-9.0r5-linux-amd64.tar.gz

This may improve choosing static package rather than dynamic?
mikeday
Installing one of the CentOS RPMs would probably be better.
francus
Centos 6 prince-9.0-5.centos60.x86_64.rpm gives:
error: Failed dependencies:
libtiff.so.3()(64bit) is needed by prince-9.0-5.x86_64

Centos 5.5 prince-9.0-5.centos55.x86_64.rpm gives the same error + other 4 failed dependencies
mikeday
That is unfortunate. We don't have an RPM specifically for Fedora 20, so I think the statically linked package may be the last resort.
francus
Statically linked package seems to work ok!

My plan is to convert epub to pdf using this script: http://www.mobileread.com/forums/showthread.php?t=89689

Perhaps the static package of Prince is enough for that... or not?
mikeday
It should be fine, usually the only issues for static builds affect HTTP access on some systems.
francus
I spoke too early.
I tried to save your download page (http://www.princexml.com/download/) as test.html and then convert it to pdf. But there are lots of errors. Does this test make sense?

prince test.html -o test.pdf
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 78: saw unknown, expected number
Fontconfig warning: "/etc/fonts/conf.d/65-0-lohit-bengali.conf", line 32: unknown element "langset"
Fontconfig warning: "/etc/fonts/conf.d/69-gnu-free-sans.conf", line 24: unknown element "langset"
Fontconfig warning: "/etc/fonts/conf.d/69-gnu-free-serif.conf", line 24: unknown element "langset"
prince: test.html:17: error: Opening and ending tag mismatch: link line 5 and head
prince: test.html:18: error: Opening and ending tag mismatch: img line 18 and a
prince: test.html:18: error: Opening and ending tag mismatch: a line 18 and div
prince: test.html:394: error: Opening and ending tag mismatch: hr line 382 and div
prince: test.html:396: error: Opening and ending tag mismatch: hr line 56 and div
prince: test.html:398: error: Input is not proper UTF-8, indicate encoding ! Bytes: 0xA9 0x20 0x32 0x30
prince: test.html:400: error: Opening and ending tag mismatch: div line 35 and body
prince: test.html:400: error: Opening and ending tag mismatch: div line 18 and html
prince: test.html:400: error: Premature end of data in tag div line 18
prince: test.html:400: error: Premature end of data in tag body line 18
prince: test.html:400: error: Premature end of data in tag link line 4
prince: test.html:400: error: Premature end of data in tag meta line 2
prince: test.html:400: error: Premature end of data in tag head line 2
prince: test.html:400: error: Premature end of data in tag html line 2
prince: test.html: error: could not load input file
prince: error: no input documents to process
mikeday
The fontconfig warnings are due to static linking, but can probably be ignored.

The remaining warnings are probably because the file is claiming to be XHTML, but actually isn't valid XML at all. You can check the <!DOCTYPE> declaration is accurate, or run Prince with "-i html" to force it to treat the document as HTML, even if it is claiming not to be.
francus
Other errors as you can see. Perhaps it is easier to install Ubuntu in another computer and try it there

prince test.html -o -i html test.pdf
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 78: saw unknown, expected number
Fontconfig warning: "/etc/fonts/conf.d/65-0-lohit-bengali.conf", line 32: unknown element "langset"
Fontconfig warning: "/etc/fonts/conf.d/69-gnu-free-sans.conf", line 24: unknown element "langset"
Fontconfig warning: "/etc/fonts/conf.d/69-gnu-free-serif.conf", line 24: unknown element "langset"
prince: test.html:17: error: Opening and ending tag mismatch: link line 5 and head
prince: test.html:18: error: Opening and ending tag mismatch: img line 18 and a
prince: test.html:18: error: Opening and ending tag mismatch: a line 18 and div
prince: test.html:394: error: Opening and ending tag mismatch: hr line 382 and div
prince: test.html:396: error: Opening and ending tag mismatch: hr line 56 and div
prince: test.html:398: error: Input is not proper UTF-8, indicate encoding ! Bytes: 0xA9 0x20 0x32 0x30
prince: test.html:400: error: Opening and ending tag mismatch: div line 35 and body
prince: test.html:400: error: Opening and ending tag mismatch: div line 18 and html
prince: test.html:400: error: Premature end of data in tag div line 18
prince: test.html:400: error: Premature end of data in tag body line 18
prince: test.html:400: error: Premature end of data in tag link line 4
prince: test.html:400: error: Premature end of data in tag meta line 2
prince: test.html:400: error: Premature end of data in tag head line 2
prince: test.html:400: error: Premature end of data in tag html line 2
prince: test.html: error: could not load input file
prince: warning: failed to load external entity "html"
prince: html: error: could not load input file
prince: warning: failed to load external entity "test.pdf"
prince: test.pdf: error: could not load input file
prince: error: no input documents to process
mikeday
Command-line should be "prince -i html test.html -o test.pdf". The order is not significant, but the -o applies to the test.pdf.
francus
Less errors, but no pdf yet:

prince -i html test.html -o test.pdf
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 78: saw unknown, expected number
Fontconfig warning: "/etc/fonts/conf.d/65-0-lohit-bengali.conf", line 32: unknown element "langset"
Fontconfig warning: "/etc/fonts/conf.d/69-gnu-free-sans.conf", line 24: unknown element "langset"
Fontconfig warning: "/etc/fonts/conf.d/69-gnu-free-serif.conf", line 24: unknown element "langset"

*** Mercury runtime: caught segmentation violation ***
cause: address not mapped to object
address involved: 0x226a
This may have been caused by a stack overflow, due to unbounded recursion.
exiting from signal handler
Segmentation fault (core dumped)
mikeday
Uh oh, that doesn't look good I'm afraid. Perhaps there is an issue running the statically linked build on Fedora that I was not aware of. :(
francus
Anyway, many many thanks for the excellent assistance. I'll try with another OS, but not now. Today we are leaving for the summer vacations. :-) It seems we are the only ones left in town (Montevideo-Uruguay)