UB-Mannheim / ocrd_pagetopdf

OCR-D wrapper for prima-pagetopdf
Apache License 2.0
7 stars 5 forks source link

Installation fails on Debian 10 #17

Open JKatzwinkel opened 3 years ago

JKatzwinkel commented 3 years ago

Make target deps-ubuntu fails on Debian 10 (buster), due to dependency openjdk-8-jre-headless not being in the standard packages. Is ocrd_pagetopdf compatible with Java 11 and would it be possible to add to your Makefile a conditional along the lines of

ifeq ($(shell lsb_release -rs),10)
apt-get install -y openjdk-11-jre-headless
endif

...or something like this in order to have installation work on Debian 10?

kba commented 3 years ago

The question is whether https://github.com/PRImA-Research-Lab/prima-page-to-pdf is compatible with Java != 8. From past experience with PRImA tools I doubt it, but please try it and find out for yourself with your proposed change.

bertsky commented 3 years ago

The question is whether https://github.com/PRImA-Research-Lab/prima-page-to-pdf is compatible with Java != 8. From past experience with PRImA tools I doubt it, but please try it and find out for yourself with your proposed change.

AFAICT all PRImA libs need to be reuilt for Java 11. It's possible, I've done it. But the whole Eclipse-based build is undocumented, and there are some problems with it – see discussion here

JKatzwinkel commented 3 years ago

Thanks for your quick and informative responses! I'm gonna put a note into our documentation suggesting some kind workaround. Feel free to close!

stweil commented 3 years ago

I just tried Java openjdk version "16-ea" 2021-03-16 [sic] with Debian bullyeye. It created a PDF file and did not complain, so maybe it works better than expected with newer versions of Java.

bertsky commented 3 years ago

I just tried Java openjdk version "16-ea" 2021-03-16 [sic] with Debian bullyeye. It created a PDF file and did not complain, so maybe it works better than expected with newer versions of Java.

In that case, perhaps a neutral default-jdk would be the better dependency for the moment?

stweil commented 3 years ago

Yes, as soon as my preliminary result is confirmed. I got a PDF with the image, but no selectable text. That might be caused by my test data, but could also be caused by the Java version.

stweil commented 3 years ago

I had to add -text-source W when running PageToPdf.jar. Now the generated PDF has a working text layer.

So it seems to work fine.

stweil commented 3 years ago

@JKatzwinkel, @bertsky, I changed Makefile to install default-jre-headless now. That should work and fix this issue.

JKatzwinkel commented 3 years ago

Very nice, I seem to be able to make all of ocrd_all again. Thanks a ton!

mikegerber commented 3 years ago

The question is whether https://github.com/PRImA-Research-Lab/prima-page-to-pdf is compatible with Java != 8. From past experience with PRImA tools I doubt it, but please try it and find out for yourself with your proposed change.

AFAICT all PRImA libs need to be reuilt for Java 11. It's possible, I've done it.

Except for prima-page-converter's dependency PrimaText.jar, which is mostly closed-source.