Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocrmypdf-alpine not working #426

Closed
jbarlow83 opened this issue Sep 9, 2019 · 14 comments
Closed

ocrmypdf-alpine not working #426

jbarlow83 opened this issue Sep 9, 2019 · 14 comments

Comments

@jbarlow83
Copy link
Collaborator

@jbarlow83 pls help me out.!"
I cant able to pull the latest version of ocrmypdf.
If i use this command - docker pull jbarlow83/ocrmypdf-alpine am in the version of 8.2.2.post10+g6e49bb3.d20190403
How to get the latest version of ocrmypdf in docker.?
Thanks

Originally posted by @AmirthaKrishnan in #419 (comment)

@jbarlow83 jbarlow83 changed the title ocrmypdf-alpine ocrmypdf-alpine not working Sep 9, 2019
@jbarlow83
Copy link
Collaborator Author

@AmirthaKrishnan Please use "New issue" in Github to open a new issue, and please refrain from commenting on issues that are unrelated to the problem you are having.

ocrmypdf-alpine is broken at the moment since the Alpine qpdf has not upgraded to 9.0.0. I suggest using docker pull jbarlow83/ocrmypdf instead for the Ubuntu based image.

@AmirthaKrishnan
Copy link

Thanks for the reply @jbarlow83
Sry for the issues i am commenting unrelated to the problem.
Problem has been fixed by using docker pull jbarlow83/ocrmypdf

@valpo
Copy link

valpo commented Sep 30, 2019

9.0.1-r0 is in edge, so it should be possible to upgrade the image.

@jbarlow83
Copy link
Collaborator Author

I think it's fine now.

@valpo
Copy link

valpo commented Oct 1, 2019

Just pulled the image from docker hub, still getting the same error (trying via the webinterface):

Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/pikepdf/init.py", line 10, in
from . import _qpdf
ImportError: Error loading shared library libqpdf.so.26: No such file or directory (needed by /usr/lib/python3.6/site-packages/pikepdf/_qpdf.cpython-36m-x86_64-linux-gnu.so)

@valpo
Copy link

valpo commented Oct 1, 2019

After building the image by myself (libqpdf.so.26 is in edge, so it should work...) I am getting this error from the web-frontend:

Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/pikepdf/init.py", line 10, in
from . import _qpdf
ImportError: Error relocating /usr/lib/libqpdf.so.26: _ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev: symbol not found

Ok, it is the right version now, but still does not work.

@kykim
Copy link

kykim commented Oct 4, 2019

from the pikepdf docs

This command installs binary wheels. 64-bit wheels are available for Windows, Linux and macOS. (Except Alpine Linux.)

So, this is probably the problem.

@jbarlow83
Copy link
Collaborator Author

@kykim I wish it were that simple. From the build logs pip is already doing the right thing and building pikepdf from source.

I think the issue is that libqpdf is being compiled without C++11 and pikepdf requires C++11. On glibc this doesn't matter but it does for Alpine's musl libc.

@aradhell
Copy link

aradhell commented Oct 17, 2019

@jbarlow83

I think it's fine now.

I am still having an issue with the latest version, 8.2.1 works fine

`Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/pikepdf/init.py", line 10, in
from . import _qpdf
ImportError: Error relocating /usr/lib/libqpdf.so.26: _ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev: symbol not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/ocrmypdf", line 5, in
from ocrmypdf.main import run
File "/usr/lib/python3.6/site-packages/ocrmypdf/init.py", line 45, in
from . import pdfa
File "/usr/lib/python3.6/site-packages/ocrmypdf/pdfa.py", line 41, in
import pikepdf
File "/usr/lib/python3.6/site-packages/pikepdf/init.py", line 12, in
raise ImportError("pikepdf's extension library failed to import")
ImportError: pikepdf's extension library failed to import`

@Vinc89
Copy link

Vinc89 commented Oct 30, 2019

Hello, the :latest version is not working, getting also the pikepdf import error.

Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/pikepdf/init.py", line 10, in
from . import _qpdf
ImportError: Error loading shared library libqpdf.so.26: No such file or directory (needed by /usr/lib/python3.6/site-packages/pikepdf/_qpdf.cpython-36m-x86_64-linux-gnu.so)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/ocrmypdf", line 5, in
from ocrmypdf.main import run
File "/usr/lib/python3.6/site-packages/ocrmypdf/init.py", line 18, in
from . import helpers, hocrtransform, leptonica, pdfa, pdfinfo
File "/usr/lib/python3.6/site-packages/ocrmypdf/pdfa.py", line 40, in
import pikepdf
File "/usr/lib/python3.6/site-packages/pikepdf/init.py", line 12, in
raise ImportError("pikepdf's extension library failed to import")
ImportError: pikepdf's extension library failed to import

v9.0.3 is working fine
Is the latest version working for someone? Is some further setting needed?

@jbarlow83
Copy link
Collaborator Author

jbarlow83 commented Nov 2, 2019

I do apologize for the frustrations people have had with ocrmypdf-alpine these past few months.

Is there anyone who would object to me killing off ocrmypdf-alpine in favor of the Ubuntu based jbarlow83/ocrmypdf image?

@mawi12345 - want to make sure you're part of this discussion since you contributed the alpine image.

  • The main issue is that Alpine Linux doesn't use glibc.
  • The size difference between Alpine and Ubuntu is not that big.
  • The fact that alpine does not support manylinux Python wheels makes it a difficult platform to support for Python, because a lot of dependencies need to be hand-compiled or otherwise require special attention.
  • I'm no expert on Alpine Linux.
  • I'm really busy right now and will be for several months.

I'd rather have a smaller set of installations that work reliably, and the Ubuntu image is quite stable because Travis CI implicitly tests it.

Alternately, is someone willing to volunteer to maintain ocrmypdf-alpine?

@valpo
Copy link

valpo commented Nov 3, 2019

It is fine for me. I also prefer a stable solution over a set of choices which may work or may not work.

@jbarlow83
Copy link
Collaborator Author

I've made some improvements to the Ubuntu version and removed ocrmypdf-alpine.

@mawi12345
Copy link
Contributor

mawi12345 commented Nov 4, 2019

@jbarlow83: The ubuntu image has improved a lot since my first alpine version. I prefer the simpler way to only support one image. Drop the ocrmypdf-alpine image and keep the user friendly ubuntu image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants